cab404f6 by Jeff Balicki

sss

Signed-off-by: Jeff <jeff@gotenzing.com>
1 parent 7e740cb2
...@@ -11,26 +11,63 @@ ...@@ -11,26 +11,63 @@
11 11
12 ?> 12 ?>
13 <?php if( have_rows('work') ): ?> 13 <?php if( have_rows('work') ): ?>
14 <?php $rowCount = count( get_field('work') ); //GET THE COUNT ?> 14 <?php $rowCount = count( get_field('work') ); //GET THE COUNT ?>
15
16 <?php $i = 1; ?> 15 <?php $i = 1; ?>
17 <div class="tiles"> 16 <div class="tiles">
18 <?php while( the_repeater_field('work') ): ?> 17 <?php while( the_repeater_field('work') ): ?>
19 <div class="tile <?php if($i == $rowCount): ?> last <?php endif; ?>"> 18 <div class="tile <?php if($i == $rowCount): ?> last <?php endif; ?>">
20 <div class="tile_image" style="background-image:url(<?php the_sub_field('background_image'); ?>);"> 19 <div class="tile_image" style="background-image:url(<?php the_sub_field('background_image'); ?>);">
21 <div class="hover_content"> 20 <div class="hover_content">
22 <?php the_sub_field('hover_text'); ?> 21 <?php the_sub_field('hover_text'); ?>
23 </div> 22 </div>
24 <div class="tile_content"> 23 <div class="tile_content">
25 <?php the_sub_field('content'); ?> 24 <div class="title-mobile">
25 <h3> <?php the_sub_field('content_title'); ?> </h3>
26 </div>
27 <div class="image">
28 <?php $image = get_sub_field('content_image'); ?>
29 <img src="<?php echo $image['url']; ?>" alt="<?php echo $image['alt']; ?>" />
30 </div>
31 <div class="text">
32 <div>
33 <h3><?php the_sub_field('content_title'); ?> </h3>
34 <?php the_sub_field('content'); ?>
35 </div>
36 <a class="whole-story" href="#">Get the whole story… </a>
37 </div>
38 </div>
26 </div> 39 </div>
27 </div> 40 <div class="tile_content mobile">
28 </div> 41 <div class="title-mobile">
42 <h3> <?php the_sub_field('content_title'); ?> </h3>
43 </div>
44 <div class="image">
45 <?php $image = get_sub_field('content_image'); ?>
46 <img src="<?php echo $image['url']; ?>" alt="<?php echo $image['alt']; ?>" />
47 </div>
48 <div class="text">
49 <div>
50 <h3><?php the_sub_field('content_title'); ?> </h3>
51 <?php the_sub_field('content'); ?>
52 </div>
53 <a class="whole-story" href="#">Get the whole story… </a>
54 </div>
55 </div>
56 </div>
29 <?php $i++; ?> 57 <?php $i++; ?>
30 <?php endwhile; ?> 58 <?php endwhile; ?>
31 <br clear="both"> 59 <br clear="both">
32 </div> 60 </div>
61
33 <?php endif; ?> 62 <?php endif; ?>
34 63
35 64
36 65 <!--
66 <div class="tiles">
67 <div class="tile"><span>1</span></div>
68 <div class="tile"><span>2</span></div>
69 <div class="tile"><span>3</span></div>
70 <div class="tile"><span>4</span></div>
71 <div class="tile"><span>5</span></div>
72 <div class="tile last"><span>6</span></div>
73 </div> -->
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -15764,14 +15764,30 @@ body.understrap-no-sidebar .wp-block-cover.alignwide { ...@@ -15764,14 +15764,30 @@ body.understrap-no-sidebar .wp-block-cover.alignwide {
15764 margin-left: -12px; 15764 margin-left: -12px;
15765 margin-right: -12px; 15765 margin-right: -12px;
15766 } 15766 }
15767 @media (max-width: 900px) {
15768 .the-numbers {
15769 margin-left: -50px;
15770 margin-right: -50px;
15771 }
15772 }
15767 .the-numbers .wp-block-columns { 15773 .the-numbers .wp-block-columns {
15768 gap: 0em; 15774 gap: 0em;
15769 } 15775 }
15776 @media (max-width: 900px) {
15777 .the-numbers .wp-block-columns {
15778 flex-wrap: wrap !important;
15779 }
15780 }
15770 .the-numbers .wp-block-column { 15781 .the-numbers .wp-block-column {
15771 padding: 50px; 15782 padding: 50px;
15772 background-color: #7AA6AD; 15783 background-color: #7AA6AD;
15773 color: #fff; 15784 color: #fff;
15774 } 15785 }
15786 @media (max-width: 900px) {
15787 .the-numbers .wp-block-column {
15788 flex-basis: 50% !important;
15789 }
15790 }
15775 .the-numbers .wp-block-column:nth-of-type(2) { 15791 .the-numbers .wp-block-column:nth-of-type(2) {
15776 background-color: #C2B59B; 15792 background-color: #C2B59B;
15777 color: #666666; 15793 color: #666666;
...@@ -15820,13 +15836,13 @@ body.understrap-no-sidebar .wp-block-cover.alignwide { ...@@ -15820,13 +15836,13 @@ body.understrap-no-sidebar .wp-block-cover.alignwide {
15820 line-height: 72px; 15836 line-height: 72px;
15821 font-weight: 400; 15837 font-weight: 400;
15822 margin-bottom: 20px; 15838 margin-bottom: 20px;
15823 padding: 0px 2%; 15839 padding: 0px 25%;
15824 } 15840 }
15825 .the-work p.first-of-type { 15841 .the-work p.first-of-type {
15826 color: #fff; 15842 color: #fff;
15827 font-size: 20px; 15843 font-size: 20px;
15828 line-height: 24px; 15844 line-height: 24px;
15829 padding: 0px 20%; 15845 padding: 0px 25%;
15830 } 15846 }
15831 15847
15832 .wp-block-getwid-tabs__nav-link { 15848 .wp-block-getwid-tabs__nav-link {
...@@ -15917,19 +15933,30 @@ body.understrap-no-sidebar .wp-block-cover.alignwide { ...@@ -15917,19 +15933,30 @@ body.understrap-no-sidebar .wp-block-cover.alignwide {
15917 15933
15918 .tiles { 15934 .tiles {
15919 display: grid; 15935 display: grid;
15920 grid-template-columns: auto auto auto; 15936 grid-template-columns: 33.3% 33.3% 33.3%;
15921 -moz-column-width: 33%; 15937 -moz-column-width: 33.3%;
15922 column-width: 33%; 15938 column-width: 33.3%;
15923 -moz-column-gap: 0px; 15939 -moz-column-gap: 0px;
15924 column-gap: 0px; 15940 column-gap: 0px;
15925 grid-auto-flow: dense; 15941 grid-auto-flow: dense;
15926 grid-template-rows: masonry; 15942 max-width: 1300px;
15927 margin-top: 40px;
15928 max-width: 100vw;
15929 margin: auto; 15943 margin: auto;
15944 margin-top: 40px;
15930 transition: 0.5s; 15945 transition: 0.5s;
15931 background: #333; 15946 background: #333;
15932 } 15947 }
15948 @media (max-width: 1300px) {
15949 .tiles {
15950 max-width: 100vw;
15951 }
15952 }
15953 @media (max-width: 800px) {
15954 .tiles {
15955 width: 100vw;
15956 display: block;
15957 height: auto;
15958 }
15959 }
15933 15960
15934 .tile { 15961 .tile {
15935 display: inline-grid; 15962 display: inline-grid;
...@@ -15940,6 +15967,12 @@ body.understrap-no-sidebar .wp-block-cover.alignwide { ...@@ -15940,6 +15967,12 @@ body.understrap-no-sidebar .wp-block-cover.alignwide {
15940 vertical-align: top; 15967 vertical-align: top;
15941 grid-column-end: span 1; 15968 grid-column-end: span 1;
15942 grid-row-end: span 1; 15969 grid-row-end: span 1;
15970 height: 275px;
15971 }
15972 @media (max-width: 800px) {
15973 .tile {
15974 display: block;
15975 }
15943 } 15976 }
15944 .tile .tile_image { 15977 .tile .tile_image {
15945 background-size: cover; 15978 background-size: cover;
...@@ -15950,41 +15983,200 @@ body.understrap-no-sidebar .wp-block-cover.alignwide { ...@@ -15950,41 +15983,200 @@ body.understrap-no-sidebar .wp-block-cover.alignwide {
15950 } 15983 }
15951 .tile .hover_content { 15984 .tile .hover_content {
15952 opacity: 0; 15985 opacity: 0;
15986 display: flex;
15987 flex-direction: column;
15988 justify-content: flex-end;
15989 align-items: flex-start;
15990 align-content: flex-start;
15991 flex-wrap: wrap;
15992 padding: 20px;
15993 background-color: rgba(0, 0, 0, 0.6);
15994 height: 100%;
15995 }
15996 @media (max-width: 800px) {
15997 .tile .hover_content {
15998 opacity: 1;
15999 }
16000 }
16001 .tile .hover_content h3, .tile .hover_content .h3 {
16002 color: #fff;
16003 font-size: 20px;
16004 line-height: 24px;
16005 text-transform: uppercase;
16006 font-family: "TradeGothic";
16007 text-align: left;
16008 }
16009 .tile .hover_content p {
16010 color: #fff;
16011 font-size: 20px;
16012 line-height: 24px;
16013 font-weight: 400;
16014 font-family: "TradeGothic";
16015 max-width: 70%;
16016 text-align: left;
15953 } 16017 }
15954 .tile .tile_content { 16018 .tile .tile_content {
15955 display: none; 16019 display: none;
16020 flex-direction: column;
16021 align-items: flex-start;
16022 align-content: flex-start;
16023 flex-wrap: wrap;
16024 padding: 70px;
16025 }
16026 @media (max-width: 1300px) {
16027 .tile .tile_content {
16028 padding: 40px;
16029 }
16030 }
16031 .tile .tile_content h3, .tile .tile_content .h3 {
16032 color: #fff;
16033 font-size: 30px;
16034 line-height: 36px;
16035 text-transform: uppercase;
16036 font-family: "TradeGothic";
16037 text-align: left;
16038 }
16039 @media (max-width: 800px) {
16040 .tile .tile_content h3, .tile .tile_content .h3 {
16041 text-align: center;
16042 font-size: 20px;
16043 line-height: 24px;
16044 margin-bottom: 30px;
16045 }
16046 }
16047 .tile .tile_content p {
16048 color: #fff;
16049 font-size: 20px;
16050 line-height: 24px;
16051 font-weight: 400;
16052 font-family: "TradeGothic";
16053 text-align: left;
16054 }
16055 @media (max-width: 800px) {
16056 .tile .tile_content p {
16057 text-align: center;
16058 font-size: 16px;
16059 line-height: 19px;
16060 }
16061 }
16062 .tile .tile_content .image {
16063 height: 100%;
16064 width: 40%;
16065 display: inline-block;
16066 margin-right: 30px;
16067 }
16068 @media (max-width: 800px) {
16069 .tile .tile_content .image {
16070 width: 80%;
16071 height: auto;
16072 margin: auto;
16073 }
16074 }
16075 .tile .tile_content .tile_content.mobile {
16076 display: none;
16077 }
16078 .tile .tile_content .title-mobile {
16079 display: none;
16080 }
16081 @media (max-width: 800px) {
16082 .tile .tile_content .title-mobile {
16083 display: block;
16084 }
16085 }
16086 .tile .tile_content .text {
16087 display: flex;
16088 flex-direction: column;
16089 width: 55%;
16090 justify-content: space-between;
16091 flex-wrap: wrap;
16092 height: 90%;
16093 }
16094 @media (max-width: 800px) {
16095 .tile .tile_content .text {
16096 display: block;
16097 margin-top: 30px;
16098 height: auto;
16099 width: 100%;
16100 }
16101 }
16102 @media (max-width: 800px) {
16103 .tile .tile_content .text h3, .tile .tile_content .text .h3 {
16104 display: none;
16105 }
16106 }
16107 .tile .tile_content .text .whole-story {
16108 align-items: flex-end;
16109 display: flex;
16110 align-content: flex-end;
16111 flex-wrap: wrap;
16112 font-size: 24px;
16113 line-height: 29px;
16114 color: #fff;
16115 text-decoration: none;
16116 font-weight: 400;
16117 }
16118 @media (max-width: 800px) {
16119 .tile .tile_content .text .whole-story {
16120 display: block;
16121 text-align: center;
16122 margin-top: 100px;
16123 }
16124 }
16125 .tile .tile_content .text .whole-story:hover {
16126 text-decoration: underline;
15956 } 16127 }
15957 16128
15958 .tile:hover .hover_content { 16129 .tile:hover .hover_content {
15959 opacity: 1; 16130 opacity: 1;
15960 background-color: rgba(0, 0, 0, 0.6);
15961 height: 100%;
15962 } 16131 }
15963 16132
15964 .tile.expand { 16133 .tile.expand {
15965 grid-column-end: span 2; 16134 grid-column-end: span 2;
15966 grid-row-end: span 2; 16135 grid-row-end: span 2;
16136 height: 550px;
16137 }
16138 @media (max-width: 800px) {
16139 .tile.expand {
16140 height: auto;
16141 }
15967 } 16142 }
15968 .tile.expand .hover_content { 16143 .tile.expand .hover_content {
15969 display: none; 16144 display: none;
15970 } 16145 }
15971 .tile.expand .tile_content { 16146 .tile.expand .tile_content {
15972 margin-top: -16px; 16147 display: flex;
15973 display: block;
15974 height: 100%; 16148 height: 100%;
15975 background-color: rgba(0, 0, 0, 0.7); 16149 background-color: rgba(0, 0, 0, 0.7);
15976 } 16150 }
16151 @media (max-width: 800px) {
16152 .tile.expand .tile_content {
16153 display: none;
16154 }
16155 }
15977 .tile.expand .tile_image { 16156 .tile.expand .tile_image {
15978 height: 550px; 16157 height: 550px;
15979 } 16158 }
15980 16159 @media (max-width: 800px) {
15981 .tile.expand:hover .hover_content { 16160 .tile.expand .tile_image {
16161 height: 275px;
16162 }
16163 }
16164 .tile.expand .tile_content.mobile {
15982 display: none; 16165 display: none;
16166 background-color: #333;
15983 } 16167 }
15984 .tile.expand:hover .tile_content { 16168 @media (max-width: 800px) {
15985 display: block; 16169 .tile.expand .tile_content.mobile {
15986 height: 100%; 16170 display: block;
15987 background-color: rgba(0, 0, 0, 0.7); 16171 }
16172 }
16173
16174 .last-expand .tile:nth-of-type(4) {
16175 grid-column-end: 2;
16176 }
16177 .last-expand .tile:nth-of-type(5) {
16178 grid-row-end: 4;
16179 grid-column-end: 2;
15988 } 16180 }
15989 16181
15990 /*# sourceMappingURL=child-theme.css.map */ 16182 /*# sourceMappingURL=child-theme.css.map */
...\ No newline at end of file ...\ No newline at end of file
......
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
...@@ -24,17 +24,17 @@ $container = get_theme_mod( 'understrap_container_type' ); ...@@ -24,17 +24,17 @@ $container = get_theme_mod( 'understrap_container_type' );
24 <!-- Your site branding in the menu --> 24 <!-- Your site branding in the menu -->
25 <?php get_template_part( 'global-templates/navbar-branding' ); ?> 25 <?php get_template_part( 'global-templates/navbar-branding' ); ?>
26 26
27 <button 27 <!-- <button
28 class="navbar-toggler" 28 class="navbar-toggler"
29 type="button" 29 type="button"
30 data-bs-toggle="collapse" 30 data-bs-toggle="collapse"
31 data-bs-target="#navbarNavDropdown" 31 data-bs-target="#navbarNavDropdown"
32 aria-controls="navbarNavDropdown" 32 aria-controls="navbarNavDropdown"
33 aria-expanded="false" 33 aria-expanded="false"
34 aria-label="<?php esc_attr_e( 'Toggle navigation', 'understrap' ); ?>" 34 aria-label="<?php // esc_attr_e( 'Toggle navigation', 'understrap' ); ?>"
35 > 35 >
36 <span class="navbar-toggler-icon"></span> 36 <span class="navbar-toggler-icon"></span>
37 </button> 37 </button> -->
38 38
39 <!-- The WordPress Menu goes here --> 39 <!-- The WordPress Menu goes here -->
40 <?php 40 <?php
......
...@@ -3422,7 +3422,7 @@ ...@@ -3422,7 +3422,7 @@
3422 }, []); 3422 }, []);
3423 } 3423 }
3424 3424
3425 function debounce(fn) { 3425 function debounce$1(fn) {
3426 var pending; 3426 var pending;
3427 return function () { 3427 return function () {
3428 if (!pending) { 3428 if (!pending) {
...@@ -3571,7 +3571,7 @@ ...@@ -3571,7 +3571,7 @@
3571 }, 3571 },
3572 // Async and optimistically optimized update – it will not be executed if 3572 // Async and optimistically optimized update – it will not be executed if
3573 // not necessary (debounced to run at most once-per-tick) 3573 // not necessary (debounced to run at most once-per-tick)
3574 update: debounce(function () { 3574 update: debounce$1(function () {
3575 return new Promise(function (resolve) { 3575 return new Promise(function (resolve) {
3576 instance.forceUpdate(); 3576 instance.forceUpdate();
3577 resolve(state); 3577 resolve(state);
...@@ -7321,7 +7321,7 @@ ...@@ -7321,7 +7321,7 @@
7321 return !_isString$1(value) || !(v = _unitExp.exec(value)) ? "" : v[1]; 7321 return !_isString$1(value) || !(v = _unitExp.exec(value)) ? "" : v[1];
7322 }, 7322 },
7323 // note: protect against padded numbers as strings, like "100.100". That shouldn't return "00" as the unit. If it's numeric, return no unit. 7323 // note: protect against padded numbers as strings, like "100.100". That shouldn't return "00" as the unit. If it's numeric, return no unit.
7324 clamp = function clamp(min, max, value) { 7324 clamp$3 = function clamp(min, max, value) {
7325 return _conditionalReturn(value, function (v) { 7325 return _conditionalReturn(value, function (v) {
7326 return _clamp$1(min, max, v); 7326 return _clamp$1(min, max, v);
7327 }); 7327 });
...@@ -7485,7 +7485,7 @@ ...@@ -7485,7 +7485,7 @@
7485 return _isArray(min) ? min[~~(Math.random() * min.length)] : (roundingIncrement = roundingIncrement || 1e-5) && (returnFunction = roundingIncrement < 1 ? Math.pow(10, (roundingIncrement + "").length - 2) : 1) && Math.floor(Math.round((min - roundingIncrement / 2 + Math.random() * (max - min + roundingIncrement * .99)) / roundingIncrement) * roundingIncrement * returnFunction) / returnFunction; 7485 return _isArray(min) ? min[~~(Math.random() * min.length)] : (roundingIncrement = roundingIncrement || 1e-5) && (returnFunction = roundingIncrement < 1 ? Math.pow(10, (roundingIncrement + "").length - 2) : 1) && Math.floor(Math.round((min - roundingIncrement / 2 + Math.random() * (max - min + roundingIncrement * .99)) / roundingIncrement) * roundingIncrement * returnFunction) / returnFunction;
7486 }); 7486 });
7487 }, 7487 },
7488 pipe = function pipe() { 7488 pipe$1 = function pipe() {
7489 for (var _len = arguments.length, functions = new Array(_len), _key = 0; _key < _len; _key++) { 7489 for (var _len = arguments.length, functions = new Array(_len), _key = 0; _key < _len; _key++) {
7490 functions[_key] = arguments[_key]; 7490 functions[_key] = arguments[_key];
7491 } 7491 }
...@@ -10404,12 +10404,12 @@ ...@@ -10404,12 +10404,12 @@
10404 snap: snap, 10404 snap: snap,
10405 normalize: normalize, 10405 normalize: normalize,
10406 getUnit: getUnit, 10406 getUnit: getUnit,
10407 clamp: clamp, 10407 clamp: clamp$3,
10408 splitColor: splitColor, 10408 splitColor: splitColor,
10409 toArray: toArray, 10409 toArray: toArray,
10410 selector: selector, 10410 selector: selector,
10411 mapRange: mapRange, 10411 mapRange: mapRange,
10412 pipe: pipe, 10412 pipe: pipe$1,
10413 unitize: unitize, 10413 unitize: unitize,
10414 interpolate: interpolate, 10414 interpolate: interpolate,
10415 shuffle: shuffle 10415 shuffle: shuffle
...@@ -12136,8 +12136,8 @@ ...@@ -12136,8 +12136,8 @@
12136 _context$1 = gsap$1.core.context || function () {}; 12136 _context$1 = gsap$1.core.context || function () {};
12137 _pointerType = "onpointerenter" in _body$1 ? "pointer" : "mouse"; // isTouch is 0 if no touch, 1 if ONLY touch, and 2 if it can accommodate touch but also other types like mouse/pointer. 12137 _pointerType = "onpointerenter" in _body$1 ? "pointer" : "mouse"; // isTouch is 0 if no touch, 1 if ONLY touch, and 2 if it can accommodate touch but also other types like mouse/pointer.
12138 12138
12139 _isTouch = Observer.isTouch = _win$1.matchMedia && _win$1.matchMedia("(hover: none), (pointer: coarse)").matches ? 1 : "ontouchstart" in _win$1 || navigator.maxTouchPoints > 0 || navigator.msMaxTouchPoints > 0 ? 2 : 0; 12139 _isTouch = Observer$1.isTouch = _win$1.matchMedia && _win$1.matchMedia("(hover: none), (pointer: coarse)").matches ? 1 : "ontouchstart" in _win$1 || navigator.maxTouchPoints > 0 || navigator.msMaxTouchPoints > 0 ? 2 : 0;
12140 _eventTypes = Observer.eventTypes = ("ontouchstart" in _docEl$1 ? "touchstart,touchmove,touchcancel,touchend" : !("onpointerdown" in _docEl$1) ? "mousedown,mousemove,mouseup,mouseup" : "pointerdown,pointermove,pointercancel,pointerup").split(","); 12140 _eventTypes = Observer$1.eventTypes = ("ontouchstart" in _docEl$1 ? "touchstart,touchmove,touchcancel,touchend" : !("onpointerdown" in _docEl$1) ? "mousedown,mousemove,mouseup,mouseup" : "pointerdown,pointermove,pointercancel,pointerup").split(",");
12141 setTimeout(function () { 12141 setTimeout(function () {
12142 return _startup$1 = 0; 12142 return _startup$1 = 0;
12143 }, 500); 12143 }, 500);
...@@ -12148,7 +12148,7 @@ ...@@ -12148,7 +12148,7 @@
12148 }; 12148 };
12149 _horizontal.op = _vertical; 12149 _horizontal.op = _vertical;
12150 _scrollers.cache = 0; 12150 _scrollers.cache = 0;
12151 var Observer = /*#__PURE__*/function () { 12151 var Observer$1 = /*#__PURE__*/function () {
12152 function Observer(vars) { 12152 function Observer(vars) {
12153 this.init(vars); 12153 this.init(vars);
12154 } 12154 }
...@@ -12507,20 +12507,20 @@ ...@@ -12507,20 +12507,20 @@
12507 }]); 12507 }]);
12508 return Observer; 12508 return Observer;
12509 }(); 12509 }();
12510 Observer.version = "3.11.4"; 12510 Observer$1.version = "3.11.4";
12511 Observer.create = function (vars) { 12511 Observer$1.create = function (vars) {
12512 return new Observer(vars); 12512 return new Observer$1(vars);
12513 }; 12513 };
12514 Observer.register = _initCore; 12514 Observer$1.register = _initCore;
12515 Observer.getAll = function () { 12515 Observer$1.getAll = function () {
12516 return _observers.slice(); 12516 return _observers.slice();
12517 }; 12517 };
12518 Observer.getById = function (id) { 12518 Observer$1.getById = function (id) {
12519 return _observers.filter(function (o) { 12519 return _observers.filter(function (o) {
12520 return o.vars.id === id; 12520 return o.vars.id === id;
12521 })[0]; 12521 })[0];
12522 }; 12522 };
12523 _getGSAP$1() && gsap$1.registerPlugin(Observer); 12523 _getGSAP$1() && gsap$1.registerPlugin(Observer$1);
12524 12524
12525 /*! 12525 /*!
12526 * ScrollTrigger 3.11.4 12526 * ScrollTrigger 3.11.4
...@@ -14116,10 +14116,10 @@ ...@@ -14116,10 +14116,10 @@
14116 14116
14117 if (_body) { 14117 if (_body) {
14118 _enabled = 1; 14118 _enabled = 1;
14119 Observer.register(gsap); // isTouch is 0 if no touch, 1 if ONLY touch, and 2 if it can accommodate touch but also other types like mouse/pointer. 14119 Observer$1.register(gsap); // isTouch is 0 if no touch, 1 if ONLY touch, and 2 if it can accommodate touch but also other types like mouse/pointer.
14120 14120
14121 ScrollTrigger.isTouch = Observer.isTouch; 14121 ScrollTrigger.isTouch = Observer$1.isTouch;
14122 _fixIOSBug = Observer.isTouch && /(iPad|iPhone|iPod|Mac)/g.test(navigator.userAgent); // since 2017, iOS has had a bug that causes event.clientX/Y to be inaccurate when a scroll occurs, thus we must alternate ignoring every other touchmove event to work around it. See https://bugs.webkit.org/show_bug.cgi?id=181954 and https://codepen.io/GreenSock/pen/ExbrPNa/087cef197dc35445a0951e8935c41503 14122 _fixIOSBug = Observer$1.isTouch && /(iPad|iPhone|iPod|Mac)/g.test(navigator.userAgent); // since 2017, iOS has had a bug that causes event.clientX/Y to be inaccurate when a scroll occurs, thus we must alternate ignoring every other touchmove event to work around it. See https://bugs.webkit.org/show_bug.cgi?id=181954 and https://codepen.io/GreenSock/pen/ExbrPNa/087cef197dc35445a0951e8935c41503
14123 14123
14124 _addListener(_win, "wheel", _onScroll); // mostly for 3rd party smooth scrolling libraries. 14124 _addListener(_win, "wheel", _onScroll); // mostly for 3rd party smooth scrolling libraries.
14125 14125
...@@ -14361,7 +14361,7 @@ ...@@ -14361,7 +14361,7 @@
14361 if (direction === true) { 14361 if (direction === true) {
14362 target.style.removeProperty("touch-action"); 14362 target.style.removeProperty("touch-action");
14363 } else { 14363 } else {
14364 target.style.touchAction = direction === true ? "auto" : direction ? "pan-" + direction + (Observer.isTouch ? " pinch-zoom" : "") : "none"; // note: Firefox doesn't support it pinch-zoom properly, at least in addition to a pan-x or pan-y. 14364 target.style.touchAction = direction === true ? "auto" : direction ? "pan-" + direction + (Observer$1.isTouch ? " pinch-zoom" : "") : "none"; // note: Firefox doesn't support it pinch-zoom properly, at least in addition to a pan-x or pan-y.
14365 } 14365 }
14366 14366
14367 target === _docEl && _allowNativePanning(_body, direction); 14367 target === _docEl && _allowNativePanning(_body, direction);
...@@ -14393,7 +14393,7 @@ ...@@ -14393,7 +14393,7 @@
14393 }, 14393 },
14394 // capture events on scrollable elements INSIDE the <body> and allow those by calling stopPropagation() when we find a scrollable ancestor 14394 // capture events on scrollable elements INSIDE the <body> and allow those by calling stopPropagation() when we find a scrollable ancestor
14395 _inputObserver = function _inputObserver(target, type, inputs, nested) { 14395 _inputObserver = function _inputObserver(target, type, inputs, nested) {
14396 return Observer.create({ 14396 return Observer$1.create({
14397 target: target, 14397 target: target,
14398 capture: true, 14398 capture: true,
14399 debounce: false, 14399 debounce: false,
...@@ -14404,10 +14404,10 @@ ...@@ -14404,10 +14404,10 @@
14404 onDrag: nested, 14404 onDrag: nested,
14405 onScroll: nested, 14405 onScroll: nested,
14406 onEnable: function onEnable() { 14406 onEnable: function onEnable() {
14407 return inputs && _addListener(_doc, Observer.eventTypes[0], _captureInputs, false, true); 14407 return inputs && _addListener(_doc, Observer$1.eventTypes[0], _captureInputs, false, true);
14408 }, 14408 },
14409 onDisable: function onDisable() { 14409 onDisable: function onDisable() {
14410 return _removeListener(_doc, Observer.eventTypes[0], _captureInputs, true); 14410 return _removeListener(_doc, Observer$1.eventTypes[0], _captureInputs, true);
14411 } 14411 }
14412 }); 14412 });
14413 }, 14413 },
...@@ -14439,7 +14439,7 @@ ...@@ -14439,7 +14439,7 @@
14439 scrollFuncY = _getScrollFunc(target, _vertical), 14439 scrollFuncY = _getScrollFunc(target, _vertical),
14440 scrollFuncX = _getScrollFunc(target, _horizontal), 14440 scrollFuncX = _getScrollFunc(target, _horizontal),
14441 scale = 1, 14441 scale = 1,
14442 initialScale = (Observer.isTouch && _win.visualViewport ? _win.visualViewport.scale * _win.visualViewport.width : _win.outerWidth) / _win.innerWidth, 14442 initialScale = (Observer$1.isTouch && _win.visualViewport ? _win.visualViewport.scale * _win.visualViewport.width : _win.outerWidth) / _win.innerWidth,
14443 wheelRefresh = 0, 14443 wheelRefresh = 0,
14444 resolveMomentumDuration = _isFunction(momentum) ? function () { 14444 resolveMomentumDuration = _isFunction(momentum) ? function () {
14445 return momentum(self); 14445 return momentum(self);
...@@ -14583,7 +14583,7 @@ ...@@ -14583,7 +14583,7 @@
14583 inputObserver.kill(); 14583 inputObserver.kill();
14584 }; 14584 };
14585 vars.lockAxis = vars.lockAxis !== false; 14585 vars.lockAxis = vars.lockAxis !== false;
14586 self = new Observer(vars); 14586 self = new Observer$1(vars);
14587 self.iOS = _fixIOSBug; // used in the Observer getCachedScroll() function to work around an iOS bug that wreaks havoc with TouchEvent.clientY if we allow scroll to go all the way back to 0. 14587 self.iOS = _fixIOSBug; // used in the Observer getCachedScroll() function to work around an iOS bug that wreaks havoc with TouchEvent.clientY if we allow scroll to go all the way back to 0.
14588 14588
14589 _fixIOSBug && !scrollFuncY() && scrollFuncY(1); // iOS bug causes event.clientY values to freak out (wildly inaccurate) if the scroll position is exactly 0. 14589 _fixIOSBug && !scrollFuncY() && scrollFuncY(1); // iOS bug causes event.clientY values to freak out (wildly inaccurate) if the scroll position is exactly 0.
...@@ -14606,7 +14606,7 @@ ...@@ -14606,7 +14606,7 @@
14606 }); 14606 });
14607 }; 14607 };
14608 ScrollTrigger.observe = function (vars) { 14608 ScrollTrigger.observe = function (vars) {
14609 return new Observer(vars); 14609 return new Observer$1(vars);
14610 }; 14610 };
14611 ScrollTrigger.normalizeScroll = function (vars) { 14611 ScrollTrigger.normalizeScroll = function (vars) {
14612 if (typeof vars === "undefined") { 14612 if (typeof vars === "undefined") {
...@@ -14618,7 +14618,7 @@ ...@@ -14618,7 +14618,7 @@
14618 if (vars === false) { 14618 if (vars === false) {
14619 return _normalizer && _normalizer.kill(); 14619 return _normalizer && _normalizer.kill();
14620 } 14620 }
14621 var normalizer = vars instanceof Observer ? vars : _getScrollNormalizer(vars); 14621 var normalizer = vars instanceof Observer$1 ? vars : _getScrollNormalizer(vars);
14622 _normalizer && _normalizer.target === normalizer.target && _normalizer.kill(); 14622 _normalizer && _normalizer.target === normalizer.target && _normalizer.kill();
14623 _isViewport(normalizer.target) && (_normalizer = normalizer); 14623 _isViewport(normalizer.target) && (_normalizer = normalizer);
14624 return normalizer; 14624 return normalizer;
...@@ -14643,26 +14643,2342 @@ ...@@ -14643,26 +14643,2342 @@
14643 }; 14643 };
14644 _getGSAP() && gsap.registerPlugin(ScrollTrigger); 14644 _getGSAP() && gsap.registerPlugin(ScrollTrigger);
14645 14645
14646 //const grid = document.querySelector(".tiles"); 14646 var DEFAULT_OVERSHOOT_STRENGTH = 1.525;
14647 //wrapGrid(grid); 14647 var reversed = function (easing) {
14648 return function (p) {
14649 return 1 - easing(1 - p);
14650 };
14651 };
14652 var mirrored = function (easing) {
14653 return function (p) {
14654 return p <= 0.5 ? easing(2 * p) / 2 : (2 - easing(2 * (1 - p))) / 2;
14655 };
14656 };
14657 var createReversedEasing = reversed;
14658 var createExpoIn = function (power) {
14659 return function (p) {
14660 return Math.pow(p, power);
14661 };
14662 };
14663 var createBackIn = function (power) {
14664 return function (p) {
14665 return p * p * ((power + 1) * p - power);
14666 };
14667 };
14668 var createAnticipateEasing = function (power) {
14669 var backEasing = createBackIn(power);
14670 return function (p) {
14671 return (p *= 2) < 1 ? 0.5 * backEasing(p) : 0.5 * (2 - Math.pow(2, -10 * (p - 1)));
14672 };
14673 };
14674 var linear = function (p) {
14675 return p;
14676 };
14677 var easeIn = /*#__PURE__*/createExpoIn(2);
14678 var easeOut = /*#__PURE__*/reversed(easeIn);
14679 var easeInOut = /*#__PURE__*/mirrored(easeIn);
14680 var circIn = function (p) {
14681 return 1 - Math.sin(Math.acos(p));
14682 };
14683 var circOut = /*#__PURE__*/reversed(circIn);
14684 var circInOut = /*#__PURE__*/mirrored(circOut);
14685 var backIn = /*#__PURE__*/createBackIn(DEFAULT_OVERSHOOT_STRENGTH);
14686 var backOut = /*#__PURE__*/reversed(backIn);
14687 var backInOut = /*#__PURE__*/mirrored(backIn);
14688 var anticipate = /*#__PURE__*/createAnticipateEasing(DEFAULT_OVERSHOOT_STRENGTH);
14689
14690 const defaultTimestep = 1 / 60 * 1000;
14691 const getCurrentTime = typeof performance !== "undefined" ? () => performance.now() : () => Date.now();
14692 const onNextFrame$1 = typeof window !== "undefined" ? callback => window.requestAnimationFrame(callback) : callback => setTimeout(() => callback(getCurrentTime()), defaultTimestep);
14693
14694 function createRenderStep(runNextFrame) {
14695 let toRun = [];
14696 let toRunNextFrame = [];
14697 let numToRun = 0;
14698 let isProcessing = false;
14699 let flushNextFrame = false;
14700 const toKeepAlive = new WeakSet();
14701 const step = {
14702 schedule: (callback, keepAlive = false, immediate = false) => {
14703 const addToCurrentFrame = immediate && isProcessing;
14704 const buffer = addToCurrentFrame ? toRun : toRunNextFrame;
14705 if (keepAlive) toKeepAlive.add(callback);
14706 if (buffer.indexOf(callback) === -1) {
14707 buffer.push(callback);
14708 if (addToCurrentFrame && isProcessing) numToRun = toRun.length;
14709 }
14710 return callback;
14711 },
14712 cancel: callback => {
14713 const index = toRunNextFrame.indexOf(callback);
14714 if (index !== -1) toRunNextFrame.splice(index, 1);
14715 toKeepAlive.delete(callback);
14716 },
14717 process: frameData => {
14718 if (isProcessing) {
14719 flushNextFrame = true;
14720 return;
14721 }
14722 isProcessing = true;
14723 [toRun, toRunNextFrame] = [toRunNextFrame, toRun];
14724 toRunNextFrame.length = 0;
14725 numToRun = toRun.length;
14726 if (numToRun) {
14727 for (let i = 0; i < numToRun; i++) {
14728 const callback = toRun[i];
14729 callback(frameData);
14730 if (toKeepAlive.has(callback)) {
14731 step.schedule(callback);
14732 runNextFrame();
14733 }
14734 }
14735 }
14736 isProcessing = false;
14737 if (flushNextFrame) {
14738 flushNextFrame = false;
14739 step.process(frameData);
14740 }
14741 }
14742 };
14743 return step;
14744 }
14648 14745
14649 //const scroll = new LocomotiveScroll(); 14746 const maxElapsed$1 = 40;
14747 let useDefaultElapsed$1 = true;
14748 let runNextFrame = false;
14749 let isProcessing$1 = false;
14750 const frame$1 = {
14751 delta: 0,
14752 timestamp: 0
14753 };
14754 const stepsOrder$1 = ["read", "update", "preRender", "render", "postRender"];
14755 const steps$1 = stepsOrder$1.reduce((acc, key) => {
14756 acc[key] = createRenderStep(() => runNextFrame = true);
14757 return acc;
14758 }, {});
14759 const sync$1 = stepsOrder$1.reduce((acc, key) => {
14760 const step = steps$1[key];
14761 acc[key] = (process, keepAlive = false, immediate = false) => {
14762 if (!runNextFrame) startLoop$1();
14763 return step.schedule(process, keepAlive, immediate);
14764 };
14765 return acc;
14766 }, {});
14767 stepsOrder$1.reduce((acc, key) => {
14768 acc[key] = steps$1[key].cancel;
14769 return acc;
14770 }, {});
14771 stepsOrder$1.reduce((acc, key) => {
14772 acc[key] = () => steps$1[key].process(frame$1);
14773 return acc;
14774 }, {});
14775 const processStep$1 = stepId => steps$1[stepId].process(frame$1);
14776 const processFrame$1 = timestamp => {
14777 runNextFrame = false;
14778 frame$1.delta = useDefaultElapsed$1 ? defaultTimestep : Math.max(Math.min(timestamp - frame$1.timestamp, maxElapsed$1), 1);
14779 frame$1.timestamp = timestamp;
14780 isProcessing$1 = true;
14781 stepsOrder$1.forEach(processStep$1);
14782 isProcessing$1 = false;
14783 if (runNextFrame) {
14784 useDefaultElapsed$1 = false;
14785 onNextFrame$1(processFrame$1);
14786 }
14787 };
14788 const startLoop$1 = () => {
14789 runNextFrame = true;
14790 useDefaultElapsed$1 = true;
14791 if (!isProcessing$1) onNextFrame$1(processFrame$1);
14792 };
14650 14793
14651 document.addEventListener("DOMContentLoaded", function () { 14794 /**
14652 window.addEventListener('scroll', function () { 14795 * lodash (Custom Build) <https://lodash.com/>
14653 if (window.scrollY > 57) { 14796 * Build: `lodash modularize exports="npm" -o ./`
14654 document.getElementById('main-nav').classList.add('fixed-top'); 14797 * Copyright jQuery Foundation and other contributors <https://jquery.org/>
14655 } else { 14798 * Released under MIT license <https://lodash.com/license>
14656 document.getElementById('main-nav').classList.remove('fixed-top'); 14799 * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
14800 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
14801 */
14802
14803 /** Used as the `TypeError` message for "Functions" methods. */
14804 var FUNC_ERROR_TEXT = 'Expected a function';
14805
14806 /** Used as references for various `Number` constants. */
14807 var NAN = 0 / 0;
14808
14809 /** `Object#toString` result references. */
14810 var symbolTag = '[object Symbol]';
14811
14812 /** Used to match leading and trailing whitespace. */
14813 var reTrim = /^\s+|\s+$/g;
14814
14815 /** Used to detect bad signed hexadecimal string values. */
14816 var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
14817
14818 /** Used to detect binary string values. */
14819 var reIsBinary = /^0b[01]+$/i;
14820
14821 /** Used to detect octal string values. */
14822 var reIsOctal = /^0o[0-7]+$/i;
14823
14824 /** Built-in method references without a dependency on `root`. */
14825 var freeParseInt = parseInt;
14826
14827 /** Detect free variable `global` from Node.js. */
14828 var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
14829
14830 /** Detect free variable `self`. */
14831 var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
14832
14833 /** Used as a reference to the global object. */
14834 var root = freeGlobal || freeSelf || Function('return this')();
14835
14836 /** Used for built-in method references. */
14837 var objectProto = Object.prototype;
14838
14839 /**
14840 * Used to resolve the
14841 * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
14842 * of values.
14843 */
14844 var objectToString = objectProto.toString;
14845
14846 /* Built-in method references for those with the same name as other `lodash` methods. */
14847 var nativeMax = Math.max,
14848 nativeMin = Math.min;
14849
14850 /**
14851 * Gets the timestamp of the number of milliseconds that have elapsed since
14852 * the Unix epoch (1 January 1970 00:00:00 UTC).
14853 *
14854 * @static
14855 * @memberOf _
14856 * @since 2.4.0
14857 * @category Date
14858 * @returns {number} Returns the timestamp.
14859 * @example
14860 *
14861 * _.defer(function(stamp) {
14862 * console.log(_.now() - stamp);
14863 * }, _.now());
14864 * // => Logs the number of milliseconds it took for the deferred invocation.
14865 */
14866 var now = function () {
14867 return root.Date.now();
14868 };
14869
14870 /**
14871 * Creates a debounced function that delays invoking `func` until after `wait`
14872 * milliseconds have elapsed since the last time the debounced function was
14873 * invoked. The debounced function comes with a `cancel` method to cancel
14874 * delayed `func` invocations and a `flush` method to immediately invoke them.
14875 * Provide `options` to indicate whether `func` should be invoked on the
14876 * leading and/or trailing edge of the `wait` timeout. The `func` is invoked
14877 * with the last arguments provided to the debounced function. Subsequent
14878 * calls to the debounced function return the result of the last `func`
14879 * invocation.
14880 *
14881 * **Note:** If `leading` and `trailing` options are `true`, `func` is
14882 * invoked on the trailing edge of the timeout only if the debounced function
14883 * is invoked more than once during the `wait` timeout.
14884 *
14885 * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
14886 * until to the next tick, similar to `setTimeout` with a timeout of `0`.
14887 *
14888 * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
14889 * for details over the differences between `_.debounce` and `_.throttle`.
14890 *
14891 * @static
14892 * @memberOf _
14893 * @since 0.1.0
14894 * @category Function
14895 * @param {Function} func The function to debounce.
14896 * @param {number} [wait=0] The number of milliseconds to delay.
14897 * @param {Object} [options={}] The options object.
14898 * @param {boolean} [options.leading=false]
14899 * Specify invoking on the leading edge of the timeout.
14900 * @param {number} [options.maxWait]
14901 * The maximum time `func` is allowed to be delayed before it's invoked.
14902 * @param {boolean} [options.trailing=true]
14903 * Specify invoking on the trailing edge of the timeout.
14904 * @returns {Function} Returns the new debounced function.
14905 * @example
14906 *
14907 * // Avoid costly calculations while the window size is in flux.
14908 * jQuery(window).on('resize', _.debounce(calculateLayout, 150));
14909 *
14910 * // Invoke `sendMail` when clicked, debouncing subsequent calls.
14911 * jQuery(element).on('click', _.debounce(sendMail, 300, {
14912 * 'leading': true,
14913 * 'trailing': false
14914 * }));
14915 *
14916 * // Ensure `batchLog` is invoked once after 1 second of debounced calls.
14917 * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });
14918 * var source = new EventSource('/stream');
14919 * jQuery(source).on('message', debounced);
14920 *
14921 * // Cancel the trailing debounced invocation.
14922 * jQuery(window).on('popstate', debounced.cancel);
14923 */
14924 function debounce(func, wait, options) {
14925 var lastArgs,
14926 lastThis,
14927 maxWait,
14928 result,
14929 timerId,
14930 lastCallTime,
14931 lastInvokeTime = 0,
14932 leading = false,
14933 maxing = false,
14934 trailing = true;
14935 if (typeof func != 'function') {
14936 throw new TypeError(FUNC_ERROR_TEXT);
14937 }
14938 wait = toNumber(wait) || 0;
14939 if (isObject(options)) {
14940 leading = !!options.leading;
14941 maxing = 'maxWait' in options;
14942 maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
14943 trailing = 'trailing' in options ? !!options.trailing : trailing;
14944 }
14945 function invokeFunc(time) {
14946 var args = lastArgs,
14947 thisArg = lastThis;
14948 lastArgs = lastThis = undefined;
14949 lastInvokeTime = time;
14950 result = func.apply(thisArg, args);
14951 return result;
14952 }
14953 function leadingEdge(time) {
14954 // Reset any `maxWait` timer.
14955 lastInvokeTime = time;
14956 // Start the timer for the trailing edge.
14957 timerId = setTimeout(timerExpired, wait);
14958 // Invoke the leading edge.
14959 return leading ? invokeFunc(time) : result;
14960 }
14961 function remainingWait(time) {
14962 var timeSinceLastCall = time - lastCallTime,
14963 timeSinceLastInvoke = time - lastInvokeTime,
14964 result = wait - timeSinceLastCall;
14965 return maxing ? nativeMin(result, maxWait - timeSinceLastInvoke) : result;
14966 }
14967 function shouldInvoke(time) {
14968 var timeSinceLastCall = time - lastCallTime,
14969 timeSinceLastInvoke = time - lastInvokeTime;
14970
14971 // Either this is the first call, activity has stopped and we're at the
14972 // trailing edge, the system time has gone backwards and we're treating
14973 // it as the trailing edge, or we've hit the `maxWait` limit.
14974 return lastCallTime === undefined || timeSinceLastCall >= wait || timeSinceLastCall < 0 || maxing && timeSinceLastInvoke >= maxWait;
14975 }
14976 function timerExpired() {
14977 var time = now();
14978 if (shouldInvoke(time)) {
14979 return trailingEdge(time);
14657 } 14980 }
14981 // Restart the timer.
14982 timerId = setTimeout(timerExpired, remainingWait(time));
14983 }
14984 function trailingEdge(time) {
14985 timerId = undefined;
14986
14987 // Only invoke if we have `lastArgs` which means `func` has been
14988 // debounced at least once.
14989 if (trailing && lastArgs) {
14990 return invokeFunc(time);
14991 }
14992 lastArgs = lastThis = undefined;
14993 return result;
14994 }
14995 function cancel() {
14996 if (timerId !== undefined) {
14997 clearTimeout(timerId);
14998 }
14999 lastInvokeTime = 0;
15000 lastArgs = lastCallTime = lastThis = timerId = undefined;
15001 }
15002 function flush() {
15003 return timerId === undefined ? result : trailingEdge(now());
15004 }
15005 function debounced() {
15006 var time = now(),
15007 isInvoking = shouldInvoke(time);
15008 lastArgs = arguments;
15009 lastThis = this;
15010 lastCallTime = time;
15011 if (isInvoking) {
15012 if (timerId === undefined) {
15013 return leadingEdge(lastCallTime);
15014 }
15015 if (maxing) {
15016 // Handle invocations in a tight loop.
15017 timerId = setTimeout(timerExpired, wait);
15018 return invokeFunc(lastCallTime);
15019 }
15020 }
15021 if (timerId === undefined) {
15022 timerId = setTimeout(timerExpired, wait);
15023 }
15024 return result;
15025 }
15026 debounced.cancel = cancel;
15027 debounced.flush = flush;
15028 return debounced;
15029 }
15030
15031 /**
15032 * Creates a throttled function that only invokes `func` at most once per
15033 * every `wait` milliseconds. The throttled function comes with a `cancel`
15034 * method to cancel delayed `func` invocations and a `flush` method to
15035 * immediately invoke them. Provide `options` to indicate whether `func`
15036 * should be invoked on the leading and/or trailing edge of the `wait`
15037 * timeout. The `func` is invoked with the last arguments provided to the
15038 * throttled function. Subsequent calls to the throttled function return the
15039 * result of the last `func` invocation.
15040 *
15041 * **Note:** If `leading` and `trailing` options are `true`, `func` is
15042 * invoked on the trailing edge of the timeout only if the throttled function
15043 * is invoked more than once during the `wait` timeout.
15044 *
15045 * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
15046 * until to the next tick, similar to `setTimeout` with a timeout of `0`.
15047 *
15048 * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
15049 * for details over the differences between `_.throttle` and `_.debounce`.
15050 *
15051 * @static
15052 * @memberOf _
15053 * @since 0.1.0
15054 * @category Function
15055 * @param {Function} func The function to throttle.
15056 * @param {number} [wait=0] The number of milliseconds to throttle invocations to.
15057 * @param {Object} [options={}] The options object.
15058 * @param {boolean} [options.leading=true]
15059 * Specify invoking on the leading edge of the timeout.
15060 * @param {boolean} [options.trailing=true]
15061 * Specify invoking on the trailing edge of the timeout.
15062 * @returns {Function} Returns the new throttled function.
15063 * @example
15064 *
15065 * // Avoid excessively updating the position while scrolling.
15066 * jQuery(window).on('scroll', _.throttle(updatePosition, 100));
15067 *
15068 * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.
15069 * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });
15070 * jQuery(element).on('click', throttled);
15071 *
15072 * // Cancel the trailing throttled invocation.
15073 * jQuery(window).on('popstate', throttled.cancel);
15074 */
15075 function throttle(func, wait, options) {
15076 var leading = true,
15077 trailing = true;
15078 if (typeof func != 'function') {
15079 throw new TypeError(FUNC_ERROR_TEXT);
15080 }
15081 if (isObject(options)) {
15082 leading = 'leading' in options ? !!options.leading : leading;
15083 trailing = 'trailing' in options ? !!options.trailing : trailing;
15084 }
15085 return debounce(func, wait, {
15086 'leading': leading,
15087 'maxWait': wait,
15088 'trailing': trailing
14658 }); 15089 });
15090 }
15091
15092 /**
15093 * Checks if `value` is the
15094 * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
15095 * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
15096 *
15097 * @static
15098 * @memberOf _
15099 * @since 0.1.0
15100 * @category Lang
15101 * @param {*} value The value to check.
15102 * @returns {boolean} Returns `true` if `value` is an object, else `false`.
15103 * @example
15104 *
15105 * _.isObject({});
15106 * // => true
15107 *
15108 * _.isObject([1, 2, 3]);
15109 * // => true
15110 *
15111 * _.isObject(_.noop);
15112 * // => true
15113 *
15114 * _.isObject(null);
15115 * // => false
15116 */
15117 function isObject(value) {
15118 var type = typeof value;
15119 return !!value && (type == 'object' || type == 'function');
15120 }
15121
15122 /**
15123 * Checks if `value` is object-like. A value is object-like if it's not `null`
15124 * and has a `typeof` result of "object".
15125 *
15126 * @static
15127 * @memberOf _
15128 * @since 4.0.0
15129 * @category Lang
15130 * @param {*} value The value to check.
15131 * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
15132 * @example
15133 *
15134 * _.isObjectLike({});
15135 * // => true
15136 *
15137 * _.isObjectLike([1, 2, 3]);
15138 * // => true
15139 *
15140 * _.isObjectLike(_.noop);
15141 * // => false
15142 *
15143 * _.isObjectLike(null);
15144 * // => false
15145 */
15146 function isObjectLike(value) {
15147 return !!value && typeof value == 'object';
15148 }
15149
15150 /**
15151 * Checks if `value` is classified as a `Symbol` primitive or object.
15152 *
15153 * @static
15154 * @memberOf _
15155 * @since 4.0.0
15156 * @category Lang
15157 * @param {*} value The value to check.
15158 * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
15159 * @example
15160 *
15161 * _.isSymbol(Symbol.iterator);
15162 * // => true
15163 *
15164 * _.isSymbol('abc');
15165 * // => false
15166 */
15167 function isSymbol(value) {
15168 return typeof value == 'symbol' || isObjectLike(value) && objectToString.call(value) == symbolTag;
15169 }
15170
15171 /**
15172 * Converts `value` to a number.
15173 *
15174 * @static
15175 * @memberOf _
15176 * @since 4.0.0
15177 * @category Lang
15178 * @param {*} value The value to process.
15179 * @returns {number} Returns the number.
15180 * @example
15181 *
15182 * _.toNumber(3.2);
15183 * // => 3.2
15184 *
15185 * _.toNumber(Number.MIN_VALUE);
15186 * // => 5e-324
15187 *
15188 * _.toNumber(Infinity);
15189 * // => Infinity
15190 *
15191 * _.toNumber('3.2');
15192 * // => 3.2
15193 */
15194 function toNumber(value) {
15195 if (typeof value == 'number') {
15196 return value;
15197 }
15198 if (isSymbol(value)) {
15199 return NAN;
15200 }
15201 if (isObject(value)) {
15202 var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
15203 value = isObject(other) ? other + '' : other;
15204 }
15205 if (typeof value != 'string') {
15206 return value === 0 ? value : +value;
15207 }
15208 value = value.replace(reTrim, '');
15209 var isBinary = reIsBinary.test(value);
15210 return isBinary || reIsOctal.test(value) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : reIsBadHex.test(value) ? NAN : +value;
15211 }
15212 var lodash_throttle = throttle;
15213
15214 /*! *****************************************************************************
15215 Copyright (c) Microsoft Corporation.
15216
15217 Permission to use, copy, modify, and/or distribute this software for any
15218 purpose with or without fee is hereby granted.
15219
15220 THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
15221 REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
15222 AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
15223 INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
15224 LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
15225 OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
15226 PERFORMANCE OF THIS SOFTWARE.
15227 ***************************************************************************** */
15228 /* global Reflect, Promise */
15229
15230 var extendStatics = function (d, b) {
15231 extendStatics = Object.setPrototypeOf || {
15232 __proto__: []
15233 } instanceof Array && function (d, b) {
15234 d.__proto__ = b;
15235 } || function (d, b) {
15236 for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
15237 };
15238 return extendStatics(d, b);
15239 };
15240 function __extends(d, b) {
15241 extendStatics(d, b);
15242 function __() {
15243 this.constructor = d;
15244 }
15245 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15246 }
15247 var __assign$2 = function () {
15248 __assign$2 = Object.assign || function __assign(t) {
15249 for (var s, i = 1, n = arguments.length; i < n; i++) {
15250 s = arguments[i];
15251 for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
15252 }
15253 return t;
15254 };
15255 return __assign$2.apply(this, arguments);
15256 };
15257 function __rest(s, e) {
15258 var t = {};
15259 for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
15260 if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
15261 if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
15262 }
15263 return t;
15264 }
15265 function __spreadArrays() {
15266 for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
15267 for (var r = Array(s), k = 0, i = 0; i < il; i++) for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) r[k] = a[j];
15268 return r;
15269 }
15270
15271 /*! *****************************************************************************
15272 Copyright (c) Microsoft Corporation.
15273
15274 Permission to use, copy, modify, and/or distribute this software for any
15275 purpose with or without fee is hereby granted.
15276
15277 THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
15278 REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
15279 AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
15280 INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
15281 LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
15282 OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
15283 PERFORMANCE OF THIS SOFTWARE.
15284 ***************************************************************************** */
15285 var __assign$1 = function () {
15286 __assign$1 = Object.assign || function __assign(t) {
15287 for (var s, i = 1, n = arguments.length; i < n; i++) {
15288 s = arguments[i];
15289 for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
15290 }
15291 return t;
15292 };
15293 return __assign$1.apply(this, arguments);
15294 };
15295
15296 var clamp$2 = function (min, max) {
15297 return function (v) {
15298 return Math.max(Math.min(v, max), min);
15299 };
15300 };
15301 var sanitize = function (v) {
15302 return v % 1 ? Number(v.toFixed(5)) : v;
15303 };
15304 var floatRegex = /(-)?(\d[\d\.]*)/g;
15305 var colorRegex = /(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))/gi;
15306 var singleColorRegex = /^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))$/i;
15307 var number = {
15308 test: function (v) {
15309 return typeof v === 'number';
15310 },
15311 parse: parseFloat,
15312 transform: function (v) {
15313 return v;
15314 }
15315 };
15316 var alpha = __assign$1(__assign$1({}, number), {
15317 transform: clamp$2(0, 1)
14659 }); 15318 });
14660 jQuery(document).ready(function ($) { 15319 __assign$1(__assign$1({}, number), {
14661 $('.the-numbers .wp-block-columns .wp-block-column:first-of-type').css('margin-left', "-" + $('#content').css('margin-left')); 15320 default: 1
14662 $('.the-numbers .wp-block-columns .wp-block-column:last-of-type').css('margin-right', "-" + $('#content').css('margin-right')); 15321 });
14663 window.addEventListener('resize', function () { 15322 var createUnitType = function (unit) {
14664 $('.the-numbers .wp-block-columns .wp-block-column:first-of-type').css('margin-left', "-" + $('#content').css('margin-left')); 15323 return {
14665 $('.the-numbers .wp-block-columns .wp-block-column:last-of-type').css('margin-right', "-" + $('#content').css('margin-right')); 15324 test: function (v) {
15325 return typeof v === 'string' && v.endsWith(unit) && v.split(' ').length === 1;
15326 },
15327 parse: parseFloat,
15328 transform: function (v) {
15329 return "" + v + unit;
15330 }
15331 };
15332 };
15333 var degrees = createUnitType('deg');
15334 var percent = createUnitType('%');
15335 var px = createUnitType('px');
15336 var vh = createUnitType('vh');
15337 var vw = createUnitType('vw');
15338 __assign$1(__assign$1({}, percent), {
15339 parse: function (v) {
15340 return percent.parse(v) / 100;
15341 },
15342 transform: function (v) {
15343 return percent.transform(v * 100);
15344 }
15345 });
15346 var getValueFromFunctionString = function (value) {
15347 return value.substring(value.indexOf('(') + 1, value.lastIndexOf(')'));
15348 };
15349 var clampRgbUnit = clamp$2(0, 255);
15350 var isRgba = function (v) {
15351 return v.red !== undefined;
15352 };
15353 var isHsla = function (v) {
15354 return v.hue !== undefined;
15355 };
15356 function getValuesAsArray(value) {
15357 return getValueFromFunctionString(value).replace(/(,|\/)/g, ' ').split(/ \s*/);
15358 }
15359 var splitColorValues = function (terms) {
15360 return function (v) {
15361 if (typeof v !== 'string') return v;
15362 var values = {};
15363 var valuesArray = getValuesAsArray(v);
15364 for (var i = 0; i < 4; i++) {
15365 values[terms[i]] = valuesArray[i] !== undefined ? parseFloat(valuesArray[i]) : 1;
15366 }
15367 return values;
15368 };
15369 };
15370 var rgbaTemplate = function (_a) {
15371 var red = _a.red,
15372 green = _a.green,
15373 blue = _a.blue,
15374 _b = _a.alpha,
15375 alpha = _b === void 0 ? 1 : _b;
15376 return "rgba(" + red + ", " + green + ", " + blue + ", " + alpha + ")";
15377 };
15378 var hslaTemplate = function (_a) {
15379 var hue = _a.hue,
15380 saturation = _a.saturation,
15381 lightness = _a.lightness,
15382 _b = _a.alpha,
15383 alpha = _b === void 0 ? 1 : _b;
15384 return "hsla(" + hue + ", " + saturation + ", " + lightness + ", " + alpha + ")";
15385 };
15386 var rgbUnit = __assign$1(__assign$1({}, number), {
15387 transform: function (v) {
15388 return Math.round(clampRgbUnit(v));
15389 }
15390 });
15391 function isColorString(color, colorType) {
15392 return color.startsWith(colorType) && singleColorRegex.test(color);
15393 }
15394 var rgba = {
15395 test: function (v) {
15396 return typeof v === 'string' ? isColorString(v, 'rgb') : isRgba(v);
15397 },
15398 parse: splitColorValues(['red', 'green', 'blue', 'alpha']),
15399 transform: function (_a) {
15400 var red = _a.red,
15401 green = _a.green,
15402 blue = _a.blue,
15403 _b = _a.alpha,
15404 alpha$1 = _b === void 0 ? 1 : _b;
15405 return rgbaTemplate({
15406 red: rgbUnit.transform(red),
15407 green: rgbUnit.transform(green),
15408 blue: rgbUnit.transform(blue),
15409 alpha: sanitize(alpha.transform(alpha$1))
15410 });
15411 }
15412 };
15413 var hsla = {
15414 test: function (v) {
15415 return typeof v === 'string' ? isColorString(v, 'hsl') : isHsla(v);
15416 },
15417 parse: splitColorValues(['hue', 'saturation', 'lightness', 'alpha']),
15418 transform: function (_a) {
15419 var hue = _a.hue,
15420 saturation = _a.saturation,
15421 lightness = _a.lightness,
15422 _b = _a.alpha,
15423 alpha$1 = _b === void 0 ? 1 : _b;
15424 return hslaTemplate({
15425 hue: Math.round(hue),
15426 saturation: percent.transform(sanitize(saturation)),
15427 lightness: percent.transform(sanitize(lightness)),
15428 alpha: sanitize(alpha.transform(alpha$1))
15429 });
15430 }
15431 };
15432 var hex = __assign$1(__assign$1({}, rgba), {
15433 test: function (v) {
15434 return typeof v === 'string' && isColorString(v, '#');
15435 },
15436 parse: function (v) {
15437 var r = '';
15438 var g = '';
15439 var b = '';
15440 if (v.length > 4) {
15441 r = v.substr(1, 2);
15442 g = v.substr(3, 2);
15443 b = v.substr(5, 2);
15444 } else {
15445 r = v.substr(1, 1);
15446 g = v.substr(2, 1);
15447 b = v.substr(3, 1);
15448 r += r;
15449 g += g;
15450 b += b;
15451 }
15452 return {
15453 red: parseInt(r, 16),
15454 green: parseInt(g, 16),
15455 blue: parseInt(b, 16),
15456 alpha: 1
15457 };
15458 }
15459 });
15460 var color = {
15461 test: function (v) {
15462 return typeof v === 'string' && singleColorRegex.test(v) || isRgba(v) || isHsla(v);
15463 },
15464 parse: function (v) {
15465 if (rgba.test(v)) {
15466 return rgba.parse(v);
15467 } else if (hsla.test(v)) {
15468 return hsla.parse(v);
15469 } else if (hex.test(v)) {
15470 return hex.parse(v);
15471 }
15472 return v;
15473 },
15474 transform: function (v) {
15475 if (isRgba(v)) {
15476 return rgba.transform(v);
15477 } else if (isHsla(v)) {
15478 return hsla.transform(v);
15479 }
15480 return v;
15481 }
15482 };
15483 var COLOR_TOKEN = '${c}';
15484 var NUMBER_TOKEN = '${n}';
15485 var convertNumbersToZero = function (v) {
15486 return typeof v === 'number' ? 0 : v;
15487 };
15488 var complex = {
15489 test: function (v) {
15490 if (typeof v !== 'string' || !isNaN(v)) return false;
15491 var numValues = 0;
15492 var foundNumbers = v.match(floatRegex);
15493 var foundColors = v.match(colorRegex);
15494 if (foundNumbers) numValues += foundNumbers.length;
15495 if (foundColors) numValues += foundColors.length;
15496 return numValues > 0;
15497 },
15498 parse: function (v) {
15499 var input = v;
15500 var parsed = [];
15501 var foundColors = input.match(colorRegex);
15502 if (foundColors) {
15503 input = input.replace(colorRegex, COLOR_TOKEN);
15504 parsed.push.apply(parsed, foundColors.map(color.parse));
15505 }
15506 var foundNumbers = input.match(floatRegex);
15507 if (foundNumbers) {
15508 parsed.push.apply(parsed, foundNumbers.map(number.parse));
15509 }
15510 return parsed;
15511 },
15512 createTransformer: function (prop) {
15513 var template = prop;
15514 var token = 0;
15515 var foundColors = prop.match(colorRegex);
15516 var numColors = foundColors ? foundColors.length : 0;
15517 if (foundColors) {
15518 for (var i = 0; i < numColors; i++) {
15519 template = template.replace(foundColors[i], COLOR_TOKEN);
15520 token++;
15521 }
15522 }
15523 var foundNumbers = template.match(floatRegex);
15524 var numNumbers = foundNumbers ? foundNumbers.length : 0;
15525 if (foundNumbers) {
15526 for (var i = 0; i < numNumbers; i++) {
15527 template = template.replace(foundNumbers[i], NUMBER_TOKEN);
15528 token++;
15529 }
15530 }
15531 return function (v) {
15532 var output = template;
15533 for (var i = 0; i < token; i++) {
15534 output = output.replace(i < numColors ? COLOR_TOKEN : NUMBER_TOKEN, i < numColors ? color.transform(v[i]) : sanitize(v[i]));
15535 }
15536 return output;
15537 };
15538 },
15539 getAnimatableNone: function (target) {
15540 var parsedTarget = complex.parse(target);
15541 var targetTransformer = complex.createTransformer(target);
15542 return targetTransformer(parsedTarget.map(convertNumbersToZero));
15543 }
15544 };
15545
15546 var invariant = function () {};
15547
15548 var isNum = function (v) {
15549 return typeof v === 'number';
15550 };
15551 var curryRange = function (func) {
15552 return function (min, max, v) {
15553 return v !== undefined ? func(min, max, v) : function (cv) {
15554 return func(min, max, cv);
15555 };
15556 };
15557 };
15558 var clamp = function (min, max, v) {
15559 return Math.min(Math.max(v, min), max);
15560 };
15561 var clamp$1 = curryRange(clamp);
15562 var progress = function (from, to, value) {
15563 var toFromDifference = to - from;
15564 return toFromDifference === 0 ? 1 : (value - from) / toFromDifference;
15565 };
15566 var mix = function (from, to, progress) {
15567 return -progress * from + progress * to + from;
15568 };
15569
15570 /*! *****************************************************************************
15571 Copyright (c) Microsoft Corporation. All rights reserved.
15572 Licensed under the Apache License, Version 2.0 (the "License"); you may not use
15573 this file except in compliance with the License. You may obtain a copy of the
15574 License at http://www.apache.org/licenses/LICENSE-2.0
15575
15576 THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15577 KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
15578 WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
15579 MERCHANTABLITY OR NON-INFRINGEMENT.
15580
15581 See the Apache Version 2.0 License for specific language governing permissions
15582 and limitations under the License.
15583 ***************************************************************************** */
15584
15585 var __assign = function () {
15586 __assign = Object.assign || function __assign(t) {
15587 for (var s, i = 1, n = arguments.length; i < n; i++) {
15588 s = arguments[i];
15589 for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
15590 }
15591 return t;
15592 };
15593 return __assign.apply(this, arguments);
15594 };
15595 var mixLinearColor = function (from, to, v) {
15596 var fromExpo = from * from;
15597 var toExpo = to * to;
15598 return Math.sqrt(Math.max(0, v * (toExpo - fromExpo) + fromExpo));
15599 };
15600 var colorTypes = [hex, rgba, hsla];
15601 var getColorType = function (v) {
15602 return colorTypes.find(function (type) {
15603 return type.test(v);
15604 });
15605 };
15606 var mixColor = function (from, to) {
15607 var fromColorType = getColorType(from);
15608 var toColorType = getColorType(to);
15609 invariant(fromColorType.transform === toColorType.transform);
15610 var fromColor = fromColorType.parse(from);
15611 var toColor = toColorType.parse(to);
15612 var blended = __assign({}, fromColor);
15613 var mixFunc = fromColorType === hsla ? mix : mixLinearColor;
15614 return function (v) {
15615 for (var key in blended) {
15616 if (key !== 'alpha') {
15617 blended[key] = mixFunc(fromColor[key], toColor[key], v);
15618 }
15619 }
15620 blended.alpha = mix(fromColor.alpha, toColor.alpha, v);
15621 return fromColorType.transform(blended);
15622 };
15623 };
15624 var combineFunctions = function (a, b) {
15625 return function (v) {
15626 return b(a(v));
15627 };
15628 };
15629 var pipe = function () {
15630 var transformers = [];
15631 for (var _i = 0; _i < arguments.length; _i++) {
15632 transformers[_i] = arguments[_i];
15633 }
15634 return transformers.reduce(combineFunctions);
15635 };
15636 function getMixer(origin, target) {
15637 if (isNum(origin)) {
15638 return function (v) {
15639 return mix(origin, target, v);
15640 };
15641 } else if (color.test(origin)) {
15642 return mixColor(origin, target);
15643 } else {
15644 return mixComplex(origin, target);
15645 }
15646 }
15647 var mixArray = function (from, to) {
15648 var output = from.slice();
15649 var numValues = output.length;
15650 var blendValue = from.map(function (fromThis, i) {
15651 return getMixer(fromThis, to[i]);
15652 });
15653 return function (v) {
15654 for (var i = 0; i < numValues; i++) {
15655 output[i] = blendValue[i](v);
15656 }
15657 return output;
15658 };
15659 };
15660 function analyse(value) {
15661 var parsed = complex.parse(value);
15662 var numValues = parsed.length;
15663 var numNumbers = 0;
15664 var numRGB = 0;
15665 var numHSL = 0;
15666 for (var i = 0; i < numValues; i++) {
15667 if (numNumbers || typeof parsed[i] === 'number') {
15668 numNumbers++;
15669 } else {
15670 if (parsed[i].hue !== undefined) {
15671 numHSL++;
15672 } else {
15673 numRGB++;
15674 }
15675 }
15676 }
15677 return {
15678 parsed: parsed,
15679 numNumbers: numNumbers,
15680 numRGB: numRGB,
15681 numHSL: numHSL
15682 };
15683 }
15684 var mixComplex = function (origin, target) {
15685 var template = complex.createTransformer(target);
15686 var originStats = analyse(origin);
15687 var targetStats = analyse(target);
15688 return pipe(mixArray(originStats.parsed, targetStats.parsed), template);
15689 };
15690 var velocityPerFrame = function (xps, frameDuration) {
15691 return isNum(xps) ? xps / (1000 / frameDuration) : 0;
15692 };
15693 var velocityPerSecond = function (velocity, frameDuration) {
15694 return frameDuration ? velocity * (1000 / frameDuration) : 0;
15695 };
15696 clamp$1(0, 1);
15697
15698 var prevTime = 0;
15699 var onNextFrame = typeof window !== 'undefined' && window.requestAnimationFrame !== undefined ? function (callback) {
15700 return window.requestAnimationFrame(callback);
15701 } : function (callback) {
15702 var timestamp = Date.now();
15703 var timeToCall = Math.max(0, 16.7 - (timestamp - prevTime));
15704 prevTime = timestamp + timeToCall;
15705 setTimeout(function () {
15706 return callback(prevTime);
15707 }, timeToCall);
15708 };
15709 var createStep = function (setRunNextFrame) {
15710 var processToRun = [];
15711 var processToRunNextFrame = [];
15712 var numThisFrame = 0;
15713 var isProcessing = false;
15714 var i = 0;
15715 var cancelled = new WeakSet();
15716 var toKeepAlive = new WeakSet();
15717 var renderStep = {
15718 cancel: function (process) {
15719 var indexOfCallback = processToRunNextFrame.indexOf(process);
15720 cancelled.add(process);
15721 if (indexOfCallback !== -1) {
15722 processToRunNextFrame.splice(indexOfCallback, 1);
15723 }
15724 },
15725 process: function (frame) {
15726 var _a;
15727 isProcessing = true;
15728 _a = [processToRunNextFrame, processToRun], processToRun = _a[0], processToRunNextFrame = _a[1];
15729 processToRunNextFrame.length = 0;
15730 numThisFrame = processToRun.length;
15731 if (numThisFrame) {
15732 var process_1;
15733 for (i = 0; i < numThisFrame; i++) {
15734 process_1 = processToRun[i];
15735 process_1(frame);
15736 if (toKeepAlive.has(process_1) === true && !cancelled.has(process_1)) {
15737 renderStep.schedule(process_1);
15738 setRunNextFrame(true);
15739 }
15740 }
15741 }
15742 isProcessing = false;
15743 },
15744 schedule: function (process, keepAlive, immediate) {
15745 if (keepAlive === void 0) {
15746 keepAlive = false;
15747 }
15748 if (immediate === void 0) {
15749 immediate = false;
15750 }
15751 var addToCurrentBuffer = immediate && isProcessing;
15752 var buffer = addToCurrentBuffer ? processToRun : processToRunNextFrame;
15753 cancelled.delete(process);
15754 if (keepAlive) toKeepAlive.add(process);
15755 if (buffer.indexOf(process) === -1) {
15756 buffer.push(process);
15757 if (addToCurrentBuffer) numThisFrame = processToRun.length;
15758 }
15759 }
15760 };
15761 return renderStep;
15762 };
15763 var maxElapsed = 40;
15764 var defaultElapsed = 1 / 60 * 1000;
15765 var useDefaultElapsed = true;
15766 var willRunNextFrame = false;
15767 var isProcessing = false;
15768 var frame = {
15769 delta: 0,
15770 timestamp: 0
15771 };
15772 var stepsOrder = ["read", "update", "preRender", "render", "postRender"];
15773 var setWillRunNextFrame = function (willRun) {
15774 return willRunNextFrame = willRun;
15775 };
15776 var steps = /*#__PURE__*/stepsOrder.reduce(function (acc, key) {
15777 acc[key] = createStep(setWillRunNextFrame);
15778 return acc;
15779 }, {});
15780 var sync = /*#__PURE__*/stepsOrder.reduce(function (acc, key) {
15781 var step = steps[key];
15782 acc[key] = function (process, keepAlive, immediate) {
15783 if (keepAlive === void 0) {
15784 keepAlive = false;
15785 }
15786 if (immediate === void 0) {
15787 immediate = false;
15788 }
15789 if (!willRunNextFrame) startLoop();
15790 step.schedule(process, keepAlive, immediate);
15791 return process;
15792 };
15793 return acc;
15794 }, {});
15795 var cancelSync = /*#__PURE__*/stepsOrder.reduce(function (acc, key) {
15796 acc[key] = steps[key].cancel;
15797 return acc;
15798 }, {});
15799 var processStep = function (stepId) {
15800 return steps[stepId].process(frame);
15801 };
15802 var processFrame = function (timestamp) {
15803 willRunNextFrame = false;
15804 frame.delta = useDefaultElapsed ? defaultElapsed : Math.max(Math.min(timestamp - frame.timestamp, maxElapsed), 1);
15805 if (!useDefaultElapsed) defaultElapsed = frame.delta;
15806 frame.timestamp = timestamp;
15807 isProcessing = true;
15808 stepsOrder.forEach(processStep);
15809 isProcessing = false;
15810 if (willRunNextFrame) {
15811 useDefaultElapsed = false;
15812 onNextFrame(processFrame);
15813 }
15814 };
15815 var startLoop = function () {
15816 willRunNextFrame = true;
15817 useDefaultElapsed = true;
15818 if (!isProcessing) onNextFrame(processFrame);
15819 };
15820 var getFrameData = function () {
15821 return frame;
15822 };
15823
15824 var Chainable = /*#__PURE__*/function () {
15825 function Chainable(props) {
15826 if (props === void 0) {
15827 props = {};
15828 }
15829 this.props = props;
15830 }
15831 Chainable.prototype.applyMiddleware = function (middleware) {
15832 return this.create(__assign$2(__assign$2({}, this.props), {
15833 middleware: this.props.middleware ? __spreadArrays([middleware], this.props.middleware) : [middleware]
15834 }));
15835 };
15836 Chainable.prototype.pipe = function () {
15837 var funcs = [];
15838 for (var _i = 0; _i < arguments.length; _i++) {
15839 funcs[_i] = arguments[_i];
15840 }
15841 var pipedUpdate = funcs.length === 1 ? funcs[0] : pipe.apply(void 0, funcs);
15842 return this.applyMiddleware(function (update) {
15843 return function (v) {
15844 return update(pipedUpdate(v));
15845 };
15846 });
15847 };
15848 Chainable.prototype.while = function (predicate) {
15849 return this.applyMiddleware(function (update, complete) {
15850 return function (v) {
15851 return predicate(v) ? update(v) : complete();
15852 };
15853 });
15854 };
15855 Chainable.prototype.filter = function (predicate) {
15856 return this.applyMiddleware(function (update) {
15857 return function (v) {
15858 return predicate(v) && update(v);
15859 };
15860 });
15861 };
15862 return Chainable;
15863 }();
15864 var Observer = /*#__PURE__*/function () {
15865 function Observer(_a, observer) {
15866 var _this = this;
15867 var middleware = _a.middleware,
15868 onComplete = _a.onComplete;
15869 this.isActive = true;
15870 this.update = function (v) {
15871 if (_this.observer.update) _this.updateObserver(v);
15872 };
15873 this.complete = function () {
15874 if (_this.observer.complete && _this.isActive) _this.observer.complete();
15875 if (_this.onComplete) _this.onComplete();
15876 _this.isActive = false;
15877 };
15878 this.error = function (err) {
15879 if (_this.observer.error && _this.isActive) _this.observer.error(err);
15880 _this.isActive = false;
15881 };
15882 this.observer = observer;
15883 this.updateObserver = function (v) {
15884 return observer.update(v);
15885 };
15886 this.onComplete = onComplete;
15887 if (observer.update && middleware && middleware.length) {
15888 middleware.forEach(function (m) {
15889 return _this.updateObserver = m(_this.updateObserver, _this.complete);
15890 });
15891 }
15892 }
15893 return Observer;
15894 }();
15895 var createObserver = function (observerCandidate, _a, onComplete) {
15896 var middleware = _a.middleware;
15897 if (typeof observerCandidate === 'function') {
15898 return new Observer({
15899 middleware: middleware,
15900 onComplete: onComplete
15901 }, {
15902 update: observerCandidate
15903 });
15904 } else {
15905 return new Observer({
15906 middleware: middleware,
15907 onComplete: onComplete
15908 }, observerCandidate);
15909 }
15910 };
15911 var Action = /*#__PURE__*/function (_super) {
15912 __extends(Action, _super);
15913 function Action() {
15914 return _super !== null && _super.apply(this, arguments) || this;
15915 }
15916 Action.prototype.create = function (props) {
15917 return new Action(props);
15918 };
15919 Action.prototype.start = function (observerCandidate) {
15920 if (observerCandidate === void 0) {
15921 observerCandidate = {};
15922 }
15923 var isComplete = false;
15924 var subscription = {
15925 stop: function () {
15926 return undefined;
15927 }
15928 };
15929 var _a = this.props,
15930 init = _a.init,
15931 observerProps = __rest(_a, ["init"]);
15932 var observer = createObserver(observerCandidate, observerProps, function () {
15933 isComplete = true;
15934 subscription.stop();
15935 });
15936 var api = init(observer);
15937 subscription = api ? __assign$2(__assign$2({}, subscription), api) : subscription;
15938 if (observerCandidate.registerParent) {
15939 observerCandidate.registerParent(subscription);
15940 }
15941 if (isComplete) subscription.stop();
15942 return subscription;
15943 };
15944 return Action;
15945 }(Chainable);
15946 var action = function (init) {
15947 return new Action({
15948 init: init
15949 });
15950 };
15951 var multi = function (_a) {
15952 var getCount = _a.getCount,
15953 getFirst = _a.getFirst,
15954 getOutput = _a.getOutput,
15955 mapApi = _a.mapApi,
15956 setProp = _a.setProp,
15957 startActions = _a.startActions;
15958 return function (actions) {
15959 return action(function (_a) {
15960 var update = _a.update,
15961 complete = _a.complete,
15962 error = _a.error;
15963 var numActions = getCount(actions);
15964 var output = getOutput();
15965 var updateOutput = function () {
15966 return update(output);
15967 };
15968 var numCompletedActions = 0;
15969 var subs = startActions(actions, function (a, name) {
15970 var hasCompleted = false;
15971 return a.start({
15972 complete: function () {
15973 if (!hasCompleted) {
15974 hasCompleted = true;
15975 numCompletedActions++;
15976 if (numCompletedActions === numActions) sync.update(complete);
15977 }
15978 },
15979 error: error,
15980 update: function (v) {
15981 setProp(output, name, v);
15982 sync.update(updateOutput, false, true);
15983 }
15984 });
15985 });
15986 return Object.keys(getFirst(subs)).reduce(function (api, methodName) {
15987 api[methodName] = mapApi(subs, methodName);
15988 return api;
15989 }, {});
15990 });
15991 };
15992 };
15993 var composite = /*#__PURE__*/multi({
15994 getOutput: function () {
15995 return {};
15996 },
15997 getCount: function (subs) {
15998 return Object.keys(subs).length;
15999 },
16000 getFirst: function (subs) {
16001 return subs[Object.keys(subs)[0]];
16002 },
16003 mapApi: function (subs, methodName) {
16004 return function () {
16005 var args = [];
16006 for (var _i = 0; _i < arguments.length; _i++) {
16007 args[_i] = arguments[_i];
16008 }
16009 return Object.keys(subs).reduce(function (output, propKey) {
16010 var _a;
16011 if (subs[propKey][methodName]) {
16012 args[0] && args[0][propKey] !== undefined ? output[propKey] = subs[propKey][methodName](args[0][propKey]) : output[propKey] = (_a = subs[propKey])[methodName].apply(_a, args);
16013 }
16014 return output;
16015 }, {});
16016 };
16017 },
16018 setProp: function (output, name, v) {
16019 return output[name] = v;
16020 },
16021 startActions: function (actions, starter) {
16022 return Object.keys(actions).reduce(function (subs, key) {
16023 subs[key] = starter(actions[key], key);
16024 return subs;
16025 }, {});
16026 }
16027 });
16028 var parallel = /*#__PURE__*/multi({
16029 getOutput: function () {
16030 return [];
16031 },
16032 getCount: function (subs) {
16033 return subs.length;
16034 },
16035 getFirst: function (subs) {
16036 return subs[0];
16037 },
16038 mapApi: function (subs, methodName) {
16039 return function () {
16040 var args = [];
16041 for (var _i = 0; _i < arguments.length; _i++) {
16042 args[_i] = arguments[_i];
16043 }
16044 return subs.map(function (sub, i) {
16045 if (sub[methodName]) {
16046 return Array.isArray(args[0]) ? sub[methodName](args[0][i]) : sub[methodName].apply(sub, args);
16047 }
16048 });
16049 };
16050 },
16051 setProp: function (output, name, v) {
16052 return output[name] = v;
16053 },
16054 startActions: function (actions, starter) {
16055 return actions.map(function (action, i) {
16056 return starter(action, i);
16057 });
16058 }
16059 });
16060 var parallel$1 = function () {
16061 var actions = [];
16062 for (var _i = 0; _i < arguments.length; _i++) {
16063 actions[_i] = arguments[_i];
16064 }
16065 return parallel(actions);
16066 };
16067 var createVectorTests = function (typeTests) {
16068 var testNames = Object.keys(typeTests);
16069 var isVectorProp = function (prop, key) {
16070 return prop !== undefined && !typeTests[key](prop);
16071 };
16072 var getVectorKeys = function (props) {
16073 return testNames.reduce(function (vectorKeys, key) {
16074 if (isVectorProp(props[key], key)) vectorKeys.push(key);
16075 return vectorKeys;
16076 }, []);
16077 };
16078 var testVectorProps = function (props) {
16079 return props && testNames.some(function (key) {
16080 return isVectorProp(props[key], key);
16081 });
16082 };
16083 return {
16084 getVectorKeys: getVectorKeys,
16085 testVectorProps: testVectorProps
16086 };
16087 };
16088 var unitTypes = [px, percent, degrees, vh, vw];
16089 var findUnitType = function (prop) {
16090 return unitTypes.find(function (type) {
16091 return type.test(prop);
16092 });
16093 };
16094 var isUnitProp = function (prop) {
16095 return Boolean(findUnitType(prop));
16096 };
16097 var createAction = function (action, props) {
16098 return action(props);
16099 };
16100 var reduceArrayValue = function (i) {
16101 return function (props, key) {
16102 props[key] = props[key][i];
16103 return props;
16104 };
16105 };
16106 var createArrayAction = function (action, props, vectorKeys) {
16107 var firstVectorKey = vectorKeys[0];
16108 var actionList = props[firstVectorKey].map(function (v, i) {
16109 var childActionProps = vectorKeys.reduce(reduceArrayValue(i), __assign$2({}, props));
16110 return getActionCreator(v)(action, childActionProps);
16111 });
16112 return parallel$1.apply(void 0, actionList);
16113 };
16114 var reduceObjectValue = function (key) {
16115 return function (props, propKey) {
16116 props[propKey] = props[propKey][key];
16117 return props;
16118 };
16119 };
16120 var createObjectAction = function (action, props, vectorKeys) {
16121 var firstVectorKey = vectorKeys[0];
16122 var actionMap = Object.keys(props[firstVectorKey]).reduce(function (map, key) {
16123 var childActionProps = vectorKeys.reduce(reduceObjectValue(key), __assign$2({}, props));
16124 map[key] = getActionCreator(props[firstVectorKey][key])(action, childActionProps);
16125 return map;
16126 }, {});
16127 return composite(actionMap);
16128 };
16129 var createUnitAction = function (action, _a) {
16130 var from = _a.from,
16131 to = _a.to,
16132 props = __rest(_a, ["from", "to"]);
16133 var unitType = findUnitType(from) || findUnitType(to);
16134 var transform = unitType.transform,
16135 parse = unitType.parse;
16136 return action(__assign$2(__assign$2({}, props), {
16137 from: typeof from === 'string' ? parse(from) : from,
16138 to: typeof to === 'string' ? parse(to) : to
16139 })).pipe(transform);
16140 };
16141 var createMixerAction = function (mixer) {
16142 return function (action, _a) {
16143 var from = _a.from,
16144 to = _a.to,
16145 props = __rest(_a, ["from", "to"]);
16146 return action(__assign$2(__assign$2({}, props), {
16147 from: 0,
16148 to: 1
16149 })).pipe(mixer(from, to));
16150 };
16151 };
16152 var createColorAction = /*#__PURE__*/createMixerAction(mixColor);
16153 var createComplexAction = /*#__PURE__*/createMixerAction(mixComplex);
16154 var createVectorAction = function (action, typeTests) {
16155 var _a = createVectorTests(typeTests),
16156 testVectorProps = _a.testVectorProps,
16157 getVectorKeys = _a.getVectorKeys;
16158 var vectorAction = function (props) {
16159 var isVector = testVectorProps(props);
16160 if (!isVector) return action(props);
16161 var vectorKeys = getVectorKeys(props);
16162 var testKey = vectorKeys[0];
16163 var testProp = props[testKey];
16164 return getActionCreator(testProp)(action, props, vectorKeys);
16165 };
16166 return vectorAction;
16167 };
16168 var getActionCreator = function (prop) {
16169 if (typeof prop === 'number') {
16170 return createAction;
16171 } else if (Array.isArray(prop)) {
16172 return createArrayAction;
16173 } else if (isUnitProp(prop)) {
16174 return createUnitAction;
16175 } else if (color.test(prop)) {
16176 return createColorAction;
16177 } else if (complex.test(prop)) {
16178 return createComplexAction;
16179 } else if (typeof prop === 'object') {
16180 return createObjectAction;
16181 } else {
16182 return createAction;
16183 }
16184 };
16185 var decay = function (props) {
16186 if (props === void 0) {
16187 props = {};
16188 }
16189 return action(function (_a) {
16190 var complete = _a.complete,
16191 update = _a.update;
16192 var _b = props.velocity,
16193 velocity = _b === void 0 ? 0 : _b,
16194 _c = props.from,
16195 from = _c === void 0 ? 0 : _c,
16196 _d = props.power,
16197 power = _d === void 0 ? 0.8 : _d,
16198 _e = props.timeConstant,
16199 timeConstant = _e === void 0 ? 350 : _e,
16200 _f = props.restDelta,
16201 restDelta = _f === void 0 ? 0.5 : _f,
16202 modifyTarget = props.modifyTarget;
16203 var elapsed = 0;
16204 var amplitude = power * velocity;
16205 var idealTarget = from + amplitude;
16206 var target = typeof modifyTarget === 'undefined' ? idealTarget : modifyTarget(idealTarget);
16207 if (target !== idealTarget) amplitude = target - from;
16208 var process = sync.update(function (_a) {
16209 var frameDelta = _a.delta;
16210 elapsed += frameDelta;
16211 var delta = -amplitude * Math.exp(-elapsed / timeConstant);
16212 var isMoving = delta > restDelta || delta < -restDelta;
16213 var current = isMoving ? target + delta : target;
16214 update(current);
16215 if (!isMoving) {
16216 cancelSync.update(process);
16217 complete();
16218 }
16219 }, true);
16220 return {
16221 stop: function () {
16222 return cancelSync.update(process);
16223 }
16224 };
16225 });
16226 };
16227 /*#__PURE__*/createVectorAction(decay, {
16228 from: number.test,
16229 modifyTarget: function (func) {
16230 return typeof func === 'function';
16231 },
16232 velocity: number.test
16233 });
16234 var spring = function (props) {
16235 if (props === void 0) {
16236 props = {};
16237 }
16238 return action(function (_a) {
16239 var update = _a.update,
16240 complete = _a.complete;
16241 var _b = props.velocity,
16242 velocity = _b === void 0 ? 0.0 : _b;
16243 var _c = props.from,
16244 from = _c === void 0 ? 0.0 : _c,
16245 _d = props.to,
16246 to = _d === void 0 ? 0.0 : _d,
16247 _e = props.stiffness,
16248 stiffness = _e === void 0 ? 100 : _e,
16249 _f = props.damping,
16250 damping = _f === void 0 ? 10 : _f,
16251 _g = props.mass,
16252 mass = _g === void 0 ? 1.0 : _g,
16253 _h = props.restSpeed,
16254 restSpeed = _h === void 0 ? 0.01 : _h,
16255 _j = props.restDelta,
16256 restDelta = _j === void 0 ? 0.01 : _j;
16257 var initialVelocity = velocity ? -(velocity / 1000) : 0.0;
16258 var t = 0;
16259 var delta = to - from;
16260 var position = from;
16261 var prevPosition = position;
16262 var process = sync.update(function (_a) {
16263 var timeDelta = _a.delta;
16264 t += timeDelta;
16265 var dampingRatio = damping / (2 * Math.sqrt(stiffness * mass));
16266 var angularFreq = Math.sqrt(stiffness / mass) / 1000;
16267 prevPosition = position;
16268 if (dampingRatio < 1) {
16269 var envelope = Math.exp(-dampingRatio * angularFreq * t);
16270 var expoDecay = angularFreq * Math.sqrt(1.0 - dampingRatio * dampingRatio);
16271 position = to - envelope * ((initialVelocity + dampingRatio * angularFreq * delta) / expoDecay * Math.sin(expoDecay * t) + delta * Math.cos(expoDecay * t));
16272 } else {
16273 var envelope = Math.exp(-angularFreq * t);
16274 position = to - envelope * (delta + (initialVelocity + angularFreq * delta) * t);
16275 }
16276 velocity = velocityPerSecond(position - prevPosition, timeDelta);
16277 var isBelowVelocityThreshold = Math.abs(velocity) <= restSpeed;
16278 var isBelowDisplacementThreshold = Math.abs(to - position) <= restDelta;
16279 if (isBelowVelocityThreshold && isBelowDisplacementThreshold) {
16280 position = to;
16281 update(position);
16282 cancelSync.update(process);
16283 complete();
16284 } else {
16285 update(position);
16286 }
16287 }, true);
16288 return {
16289 stop: function () {
16290 return cancelSync.update(process);
16291 }
16292 };
16293 });
16294 };
16295 /*#__PURE__*/createVectorAction(spring, {
16296 from: number.test,
16297 to: number.test,
16298 stiffness: number.test,
16299 damping: number.test,
16300 mass: number.test,
16301 velocity: number.test
16302 });
16303 var inertia = function (_a) {
16304 var _b = _a.from,
16305 from = _b === void 0 ? 0 : _b,
16306 _c = _a.velocity,
16307 velocity = _c === void 0 ? 0 : _c,
16308 min = _a.min,
16309 max = _a.max,
16310 _d = _a.power,
16311 power = _d === void 0 ? 0.8 : _d,
16312 _e = _a.timeConstant,
16313 timeConstant = _e === void 0 ? 700 : _e,
16314 _f = _a.bounceStiffness,
16315 bounceStiffness = _f === void 0 ? 500 : _f,
16316 _g = _a.bounceDamping,
16317 bounceDamping = _g === void 0 ? 10 : _g,
16318 _h = _a.restDelta,
16319 restDelta = _h === void 0 ? 1 : _h,
16320 modifyTarget = _a.modifyTarget;
16321 return action(function (_a) {
16322 var update = _a.update,
16323 complete = _a.complete;
16324 var prev = from;
16325 var current = from;
16326 var activeAnimation;
16327 var isOutOfBounds = function (v) {
16328 return min !== undefined && v < min || max !== undefined && v > max;
16329 };
16330 var boundaryNearest = function (v) {
16331 return Math.abs(min - v) < Math.abs(max - v) ? min : max;
16332 };
16333 var startAnimation = function (animation, next) {
16334 activeAnimation && activeAnimation.stop();
16335 activeAnimation = animation.start({
16336 update: update,
16337 complete: function () {
16338 if (next) {
16339 next();
16340 return;
16341 }
16342 complete();
16343 }
16344 });
16345 };
16346 var startSpring = function (props) {
16347 startAnimation(spring(__assign$2(__assign$2({}, props), {
16348 stiffness: bounceStiffness,
16349 damping: bounceDamping,
16350 restDelta: restDelta
16351 })));
16352 };
16353 if (isOutOfBounds(from)) {
16354 startSpring({
16355 from: from,
16356 velocity: velocity,
16357 to: boundaryNearest(from)
16358 });
16359 } else {
16360 var to = power * velocity + from;
16361 if (typeof modifyTarget !== 'undefined') {
16362 to = modifyTarget(to);
16363 modifyTarget = void 0;
16364 velocity = (to - from) / power;
16365 }
16366 var animation = decay({
16367 from: from,
16368 velocity: velocity,
16369 timeConstant: timeConstant,
16370 power: power,
16371 restDelta: restDelta,
16372 modifyTarget: modifyTarget
16373 });
16374 var next = void 0;
16375 if (isOutOfBounds(to)) {
16376 var boundary_1 = boundaryNearest(to);
16377 var heading_1 = boundary_1 == min ? -1 : 1;
16378 animation = animation.while(function (v) {
16379 prev = current;
16380 velocity = velocityPerSecond(v - prev, getFrameData().delta);
16381 current = v;
16382 return boundary_1 - v * heading_1 > 0;
16383 });
16384 next = function () {
16385 return startSpring({
16386 from: current,
16387 to: boundary_1,
16388 velocity: velocity
16389 });
16390 };
16391 }
16392 startAnimation(animation, next);
16393 }
16394 return {
16395 stop: function () {
16396 return activeAnimation && activeAnimation.stop();
16397 }
16398 };
16399 });
16400 };
16401 /*#__PURE__*/createVectorAction(inertia, {
16402 from: number.test,
16403 velocity: number.test,
16404 min: number.test,
16405 max: number.test,
16406 damping: number.test,
16407 stiffness: number.test,
16408 modifyTarget: function (func) {
16409 return typeof func === 'function';
16410 }
16411 });
16412 var scrubber = function (_a) {
16413 var _b = _a.from,
16414 from = _b === void 0 ? 0 : _b,
16415 _c = _a.to,
16416 to = _c === void 0 ? 1 : _c,
16417 _d = _a.ease,
16418 ease = _d === void 0 ? linear : _d,
16419 _e = _a.reverseEase,
16420 reverseEase = _e === void 0 ? false : _e;
16421 if (reverseEase) {
16422 ease = createReversedEasing(ease);
16423 }
16424 return action(function (_a) {
16425 var update = _a.update;
16426 return {
16427 seek: function (progress) {
16428 return update(progress);
16429 }
16430 };
16431 }).pipe(ease, function (v) {
16432 return mix(from, to, v);
16433 });
16434 };
16435 var vectorScrubber = /*#__PURE__*/createVectorAction(scrubber, {
16436 ease: function (func) {
16437 return typeof func === 'function';
16438 },
16439 from: number.test,
16440 to: number.test
16441 });
16442 var clampProgress = /*#__PURE__*/clamp$1(0, 1);
16443 var tween = function (props) {
16444 if (props === void 0) {
16445 props = {};
16446 }
16447 return action(function (_a) {
16448 var update = _a.update,
16449 complete = _a.complete;
16450 var _b = props.duration,
16451 duration = _b === void 0 ? 300 : _b,
16452 _c = props.ease,
16453 ease = _c === void 0 ? easeOut : _c,
16454 _d = props.flip,
16455 flip = _d === void 0 ? 0 : _d,
16456 _e = props.loop,
16457 loop = _e === void 0 ? 0 : _e,
16458 _f = props.yoyo,
16459 yoyo = _f === void 0 ? 0 : _f,
16460 _g = props.repeatDelay,
16461 repeatDelay = _g === void 0 ? 0 : _g;
16462 var _h = props.from,
16463 from = _h === void 0 ? 0 : _h,
16464 _j = props.to,
16465 to = _j === void 0 ? 1 : _j,
16466 _k = props.elapsed,
16467 elapsed = _k === void 0 ? 0 : _k,
16468 _l = props.flipCount,
16469 flipCount = _l === void 0 ? 0 : _l,
16470 _m = props.yoyoCount,
16471 yoyoCount = _m === void 0 ? 0 : _m,
16472 _o = props.loopCount,
16473 loopCount = _o === void 0 ? 0 : _o;
16474 var playhead = vectorScrubber({
16475 from: from,
16476 to: to,
16477 ease: ease
16478 }).start(update);
16479 var currentProgress = 0;
16480 var process;
16481 var isActive = false;
16482 var reverseAnimation = function (reverseEase) {
16483 var _a;
16484 if (reverseEase === void 0) {
16485 reverseEase = false;
16486 }
16487 _a = [to, from], from = _a[0], to = _a[1];
16488 playhead = vectorScrubber({
16489 from: from,
16490 to: to,
16491 ease: ease,
16492 reverseEase: reverseEase
16493 }).start(update);
16494 };
16495 var isTweenComplete = function () {
16496 var isComplete = isActive && elapsed > duration + repeatDelay;
16497 if (!isComplete) return false;
16498 if (isComplete && !loop && !flip && !yoyo) return true;
16499 elapsed = duration - (elapsed - repeatDelay);
16500 if (loop && loopCount < loop) {
16501 loopCount++;
16502 return false;
16503 } else if (flip && flipCount < flip) {
16504 flipCount++;
16505 reverseAnimation();
16506 return false;
16507 } else if (yoyo && yoyoCount < yoyo) {
16508 yoyoCount++;
16509 reverseAnimation(yoyoCount % 2 !== 0);
16510 return false;
16511 }
16512 return true;
16513 };
16514 var updateTween = function () {
16515 currentProgress = clampProgress(progress(0, duration, elapsed));
16516 playhead.seek(currentProgress);
16517 };
16518 var startTimer = function () {
16519 isActive = true;
16520 process = sync.update(function (_a) {
16521 var delta = _a.delta;
16522 elapsed += delta;
16523 updateTween();
16524 if (isTweenComplete()) {
16525 cancelSync.update(process);
16526 complete && sync.update(complete, false, true);
16527 }
16528 }, true);
16529 };
16530 var stopTimer = function () {
16531 isActive = false;
16532 if (process) cancelSync.update(process);
16533 };
16534 startTimer();
16535 return {
16536 isActive: function () {
16537 return isActive;
16538 },
16539 getElapsed: function () {
16540 return clamp$1(0, duration, elapsed);
16541 },
16542 getProgress: function () {
16543 return currentProgress;
16544 },
16545 stop: function () {
16546 stopTimer();
16547 },
16548 pause: function () {
16549 stopTimer();
16550 return this;
16551 },
16552 resume: function () {
16553 if (!isActive) startTimer();
16554 return this;
16555 },
16556 seek: function (newProgress) {
16557 elapsed = mix(0, duration, newProgress);
16558 sync.update(updateTween, false, true);
16559 return this;
16560 },
16561 reverse: function () {
16562 reverseAnimation();
16563 return this;
16564 }
16565 };
16566 });
16567 };
16568 var physics = function (props) {
16569 if (props === void 0) {
16570 props = {};
16571 }
16572 return action(function (_a) {
16573 var complete = _a.complete,
16574 update = _a.update;
16575 var _b = props.acceleration,
16576 acceleration = _b === void 0 ? 0 : _b,
16577 _c = props.friction,
16578 friction = _c === void 0 ? 0 : _c,
16579 _d = props.velocity,
16580 velocity = _d === void 0 ? 0 : _d,
16581 springStrength = props.springStrength,
16582 to = props.to;
16583 var _e = props.restSpeed,
16584 restSpeed = _e === void 0 ? 0.001 : _e,
16585 _f = props.from,
16586 from = _f === void 0 ? 0 : _f;
16587 var current = from;
16588 var process = sync.update(function (_a) {
16589 var delta = _a.delta;
16590 var elapsed = Math.max(delta, 16);
16591 if (acceleration) velocity += velocityPerFrame(acceleration, elapsed);
16592 if (friction) velocity *= Math.pow(1 - friction, elapsed / 100);
16593 if (springStrength !== undefined && to !== undefined) {
16594 var distanceToTarget = to - current;
16595 velocity += distanceToTarget * velocityPerFrame(springStrength, elapsed);
16596 }
16597 current += velocityPerFrame(velocity, elapsed);
16598 update(current);
16599 var isComplete = restSpeed !== false && (!velocity || Math.abs(velocity) <= restSpeed);
16600 if (isComplete) {
16601 cancelSync.update(process);
16602 complete();
16603 }
16604 }, true);
16605 return {
16606 set: function (v) {
16607 current = v;
16608 return this;
16609 },
16610 setAcceleration: function (v) {
16611 acceleration = v;
16612 return this;
16613 },
16614 setFriction: function (v) {
16615 friction = v;
16616 return this;
16617 },
16618 setSpringStrength: function (v) {
16619 springStrength = v;
16620 return this;
16621 },
16622 setSpringTarget: function (v) {
16623 to = v;
16624 return this;
16625 },
16626 setVelocity: function (v) {
16627 velocity = v;
16628 return this;
16629 },
16630 stop: function () {
16631 return cancelSync.update(process);
16632 }
16633 };
16634 });
16635 };
16636 /*#__PURE__*/createVectorAction(physics, {
16637 acceleration: number.test,
16638 friction: number.test,
16639 velocity: number.test,
16640 from: number.test,
16641 to: number.test,
16642 springStrength: number.test
16643 });
16644 var listen = function (element, events, options) {
16645 return action(function (_a) {
16646 var update = _a.update;
16647 var eventNames = events.split(' ').map(function (eventName) {
16648 element.addEventListener(eventName, update, options);
16649 return eventName;
16650 });
16651 return {
16652 stop: function () {
16653 return eventNames.forEach(function (eventName) {
16654 return element.removeEventListener(eventName, update, options);
16655 });
16656 }
16657 };
16658 });
16659 };
16660 var defaultPointerPos = function () {
16661 return {
16662 clientX: 0,
16663 clientY: 0,
16664 pageX: 0,
16665 pageY: 0,
16666 x: 0,
16667 y: 0
16668 };
16669 };
16670 var eventToPoint = function (e, point) {
16671 if (point === void 0) {
16672 point = defaultPointerPos();
16673 }
16674 point.clientX = point.x = e.clientX;
16675 point.clientY = point.y = e.clientY;
16676 point.pageX = e.pageX;
16677 point.pageY = e.pageY;
16678 return point;
16679 };
16680 var points = [/*#__PURE__*/defaultPointerPos()];
16681 if (typeof document !== 'undefined') {
16682 var updatePointsLocation = function (_a) {
16683 var touches = _a.touches;
16684 var numTouches = touches.length;
16685 points.length = 0;
16686 for (var i = 0; i < numTouches; i++) {
16687 var thisTouch = touches[i];
16688 points.push(eventToPoint(thisTouch));
16689 }
16690 };
16691 listen(document, 'touchstart touchmove', {
16692 passive: true,
16693 capture: true
16694 }).start(updatePointsLocation);
16695 }
16696 var point = /*#__PURE__*/defaultPointerPos();
16697 if (typeof document !== 'undefined') {
16698 var updatePointLocation = function (e) {
16699 eventToPoint(e, point);
16700 };
16701 listen(document, 'mousedown mousemove', true).start(updatePointLocation);
16702 }
16703
16704 /* eslint-disable @typescript-eslint/no-empty-function */
16705
16706 const $149c1bd638913645$var$popmotionEasing = {
16707 anticipate: anticipate,
16708 backIn: backIn,
16709 backInOut: backInOut,
16710 backOut: backOut,
16711 circIn: circIn,
16712 circInOut: circInOut,
16713 circOut: circOut,
16714 easeIn: easeIn,
16715 easeInOut: easeInOut,
16716 easeOut: easeOut,
16717 linear: linear
16718 };
16719 const $149c1bd638913645$var$DATASET_KEY = "animateGridId";
16720 // in order to account for scroll, (which we're not listening for)
16721 // always cache the item's position relative
16722 // to the top and left of the grid container
16723 const $149c1bd638913645$var$getGridAwareBoundingClientRect = (gridBoundingClientRect, el) => {
16724 const {
16725 top: top,
16726 left: left,
16727 width: width,
16728 height: height
16729 } = el.getBoundingClientRect();
16730 const rect = {
16731 top: top,
16732 left: left,
16733 width: width,
16734 height: height
16735 };
16736 rect.top -= gridBoundingClientRect.top;
16737 rect.left -= gridBoundingClientRect.left;
16738 // if an element is display:none it will return top: 0 and left:0
16739 // rather than saying it's still in the containing element
16740 // so we need to use Math.max to make sure the coordinates stay
16741 // within the container
16742 rect.top = Math.max(rect.top, 0);
16743 rect.left = Math.max(rect.left, 0);
16744 return rect;
16745 };
16746 // the function used during the tweening
16747 const $149c1bd638913645$var$applyCoordTransform = (el, {
16748 translateX: translateX,
16749 translateY: translateY,
16750 scaleX: scaleX,
16751 scaleY: scaleY
16752 }, {
16753 immediate: immediate
16754 } = {}) => {
16755 const isFinished = translateX === 0 && translateY === 0 && scaleX === 1 && scaleY === 1;
16756 const styleEl = () => {
16757 el.style.transform = isFinished ? "" : `translateX(${translateX}px) translateY(${translateY}px) scaleX(${scaleX}) scaleY(${scaleY})`;
16758 };
16759 if (immediate) styleEl();else (sync$1).render(styleEl);
16760 const firstChild = el.children[0];
16761 if (firstChild) {
16762 const styleChild = () => {
16763 firstChild.style.transform = isFinished ? "" : `scaleX(${1 / scaleX}) scaleY(${1 / scaleY})`;
16764 };
16765 if (immediate) styleChild();else (sync$1).render(styleChild);
16766 }
16767 };
16768 const $149c1bd638913645$export$cfa74da6327324bf = (container, {
16769 duration = 250,
16770 stagger = 0,
16771 easing = "easeInOut",
16772 onStart = () => {},
16773 onEnd = () => {}
16774 } = {}) => {
16775 if (!$149c1bd638913645$var$popmotionEasing[easing]) throw new Error(`${easing} is not a valid easing name`);
16776 let mutationsDisabled = false;
16777 const disableMutationsWhileFunctionRuns = func => {
16778 mutationsDisabled = true;
16779 func();
16780 setTimeout(() => {
16781 mutationsDisabled = false;
16782 }, 0);
16783 };
16784 // all cached position data, and in-progress tween data, is stored here
16785 const cachedPositionData = {};
16786 // initially and after every transition, record element positions
16787 const recordPositions = elements => {
16788 const gridBoundingClientRect = container.getBoundingClientRect();
16789 Array.from(elements).forEach(el => {
16790 if (typeof el.getBoundingClientRect !== "function") return;
16791 if (!el.dataset[$149c1bd638913645$var$DATASET_KEY]) {
16792 const newId = `${Math.random()}`;
16793 el.dataset[$149c1bd638913645$var$DATASET_KEY] = newId;
16794 }
16795 const animateGridId = el.dataset[$149c1bd638913645$var$DATASET_KEY];
16796 if (!cachedPositionData[animateGridId]) cachedPositionData[animateGridId] = {};
16797 const rect = $149c1bd638913645$var$getGridAwareBoundingClientRect(gridBoundingClientRect, el);
16798 cachedPositionData[animateGridId].rect = rect;
16799 cachedPositionData[animateGridId].gridBoundingClientRect = gridBoundingClientRect;
16800 });
16801 };
16802 recordPositions(container.children);
16803 const throttledResizeListener = (lodash_throttle)(() => {
16804 const bodyElement = document.querySelector("body");
16805 const containerIsNoLongerInPage = bodyElement && !bodyElement.contains(container);
16806 if (!container || containerIsNoLongerInPage) window.removeEventListener("resize", throttledResizeListener);
16807 recordPositions(container.children);
16808 }, 250);
16809 window.addEventListener("resize", throttledResizeListener);
16810 const throttledScrollListener = (lodash_throttle)(() => {
16811 recordPositions(container.children);
16812 }, 20);
16813 container.addEventListener("scroll", throttledScrollListener);
16814 const mutationCallback = mutationsList => {
16815 if (mutationsList !== "forceGridAnimation") {
16816 // check if we care about the mutation
16817 const relevantMutationHappened = mutationsList.filter(m => m.attributeName === "class" || m.addedNodes.length || m.removedNodes.length).length;
16818 if (!relevantMutationHappened) return;
16819 if (mutationsDisabled) return;
16820 }
16821 const gridBoundingClientRect = container.getBoundingClientRect();
16822 const childrenElements = Array.from(container.children);
16823 // stop current transitions and remove transforms on transitioning elements
16824 childrenElements.filter(el => {
16825 const itemPosition = cachedPositionData[el.dataset[$149c1bd638913645$var$DATASET_KEY]];
16826 if (itemPosition && itemPosition.stopTween) {
16827 itemPosition.stopTween();
16828 delete itemPosition.stopTween;
16829 return true;
16830 }
16831 }).forEach(el => {
16832 el.style.transform = "";
16833 const firstChild = el.children[0];
16834 if (firstChild) firstChild.style.transform = "";
16835 });
16836 const animatedGridChildren = childrenElements.map(el => ({
16837 childCoords: {},
16838 el: el,
16839 boundingClientRect: $149c1bd638913645$var$getGridAwareBoundingClientRect(gridBoundingClientRect, el)
16840 })).filter(({
16841 el: el,
16842 boundingClientRect: boundingClientRect
16843 }) => {
16844 const itemPosition = cachedPositionData[el.dataset[$149c1bd638913645$var$DATASET_KEY]];
16845 // don't animate the initial appearance of elements,
16846 // just cache their position so they can be animated later
16847 if (!itemPosition) {
16848 recordPositions([el]);
16849 return false;
16850 } else if (boundingClientRect.top === itemPosition.rect.top && boundingClientRect.left === itemPosition.rect.left && boundingClientRect.width === itemPosition.rect.width && boundingClientRect.height === itemPosition.rect.height)
16851 // if it hasn't moved, dont animate it
16852 return false;
16853 return true;
16854 });
16855 // having more than one child in the animated item is not supported
16856 animatedGridChildren.forEach(({
16857 el: el
16858 }) => {
16859 if (Array.from(el.children).length > 1) throw new Error("Make sure every grid item has a single container element surrounding its children");
16860 });
16861 if (!animatedGridChildren.length) return;
16862 const animatedElements = animatedGridChildren.map(({
16863 el: el
16864 }) => el);
16865 disableMutationsWhileFunctionRuns(() => onStart(animatedElements));
16866 const completionPromises = [];
16867 animatedGridChildren // do this measurement first so as not to cause layout thrashing
16868 .map(data => {
16869 const firstChild = data.el.children[0];
16870 // different transform origins give different effects. "50% 50%" is default
16871 if (firstChild) data.childCoords = $149c1bd638913645$var$getGridAwareBoundingClientRect(gridBoundingClientRect, firstChild);
16872 return data;
16873 }).forEach(({
16874 el: el,
16875 boundingClientRect: {
16876 top: top,
16877 left: left,
16878 width: width,
16879 height: height
16880 },
16881 childCoords: {
16882 top: childTop,
16883 left: childLeft
16884 }
16885 }, i) => {
16886 const firstChild = el.children[0];
16887 const itemPosition = cachedPositionData[el.dataset[$149c1bd638913645$var$DATASET_KEY]];
16888 const coords = {
16889 scaleX: itemPosition.rect.width / width,
16890 scaleY: itemPosition.rect.height / height,
16891 translateX: itemPosition.rect.left - left,
16892 translateY: itemPosition.rect.top - top
16893 };
16894 el.style.transformOrigin = "0 0";
16895 if (firstChild && childLeft === left && childTop === top) firstChild.style.transformOrigin = "0 0";
16896 let cachedResolve;
16897 const completionPromise = new Promise(resolve => {
16898 cachedResolve = resolve;
16899 });
16900 completionPromises.push(completionPromise);
16901 $149c1bd638913645$var$applyCoordTransform(el, coords, {
16902 immediate: true
16903 });
16904 // now start the animation
16905 const startAnimation = () => {
16906 const {
16907 stop: stop
16908 } = (tween)({
16909 from: coords,
16910 to: {
16911 translateX: 0,
16912 translateY: 0,
16913 scaleX: 1,
16914 scaleY: 1
16915 },
16916 duration: duration,
16917 ease: $149c1bd638913645$var$popmotionEasing[easing]
16918 }).start({
16919 update: transforms => {
16920 $149c1bd638913645$var$applyCoordTransform(el, transforms);
16921 // this helps prevent layout thrashing
16922 (sync$1).postRender(() => recordPositions([el]));
16923 },
16924 complete: cachedResolve
16925 });
16926 itemPosition.stopTween = stop;
16927 };
16928 if (typeof stagger !== "number") startAnimation();else {
16929 const timeoutId = setTimeout(() => {
16930 (sync$1).update(startAnimation);
16931 }, stagger * i);
16932 itemPosition.stopTween = () => clearTimeout(timeoutId);
16933 }
16934 });
16935 Promise.all(completionPromises).then(() => {
16936 onEnd(animatedElements);
16937 });
16938 };
16939 const observer = new MutationObserver(mutationCallback);
16940 observer.observe(container, {
16941 childList: true,
16942 attributes: true,
16943 subtree: true,
16944 attributeFilter: ["class"]
16945 });
16946 const unwrapGrid = () => {
16947 window.removeEventListener("resize", throttledResizeListener);
16948 container.removeEventListener("scroll", throttledScrollListener);
16949 observer.disconnect();
16950 };
16951 const forceGridAnimation = () => mutationCallback("forceGridAnimation");
16952 return {
16953 unwrapGrid: unwrapGrid,
16954 forceGridAnimation: forceGridAnimation
16955 };
16956 };
16957
16958 const grid = document.querySelector(".tiles");
16959 $149c1bd638913645$export$cfa74da6327324bf(grid);
16960
16961 //const scroll = new LocomotiveScroll();
16962
16963 document.addEventListener("DOMContentLoaded", function () {
16964 window.addEventListener('scroll', function () {
16965 if (window.scrollY > 57) {
16966 document.getElementById('main-nav').classList.add('fixed-top');
16967 } else {
16968 document.getElementById('main-nav').classList.remove('fixed-top');
16969 }
16970 });
16971 });
16972 jQuery(document).ready(function ($) {
16973 if ($(window).width() > 900) {
16974 $('.the-numbers .wp-block-columns .wp-block-column:first-of-type').css('margin-left', "-" + $('#content').css('margin-left'));
16975 $('.the-numbers .wp-block-columns .wp-block-column:last-of-type').css('margin-right', "-" + $('#content').css('margin-right'));
16976 }
16977 window.addEventListener('resize', function () {
16978 if ($(window).width() > 900) {
16979 $('.the-numbers .wp-block-columns .wp-block-column:first-of-type').css('margin-left', "-" + $('#content').css('margin-left'));
16980 $('.the-numbers .wp-block-columns .wp-block-column:last-of-type').css('margin-right', "-" + $('#content').css('margin-right'));
16981 }
14666 }); 16982 });
14667 function expandTiles() { 16983 function expandTiles() {
14668 var tiles = $('.tile'); 16984 var tiles = $('.tile');
......
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
...@@ -6,8 +6,8 @@ import "_count-up"; ...@@ -6,8 +6,8 @@ import "_count-up";
6 6
7 import { wrapGrid } from 'animate-css-grid' 7 import { wrapGrid } from 'animate-css-grid'
8 8
9 //const grid = document.querySelector(".tiles"); 9 const grid = document.querySelector(".tiles");
10 //wrapGrid(grid); 10 wrapGrid(grid);
11 11
12 //const scroll = new LocomotiveScroll(); 12 //const scroll = new LocomotiveScroll();
13 13
...@@ -23,12 +23,19 @@ document.addEventListener("DOMContentLoaded", function() { ...@@ -23,12 +23,19 @@ document.addEventListener("DOMContentLoaded", function() {
23 23
24 24
25 jQuery(document).ready(function($) { 25 jQuery(document).ready(function($) {
26 $('.the-numbers .wp-block-columns .wp-block-column:first-of-type').css('margin-left',"-"+$('#content').css('margin-left')); 26
27 $('.the-numbers .wp-block-columns .wp-block-column:last-of-type').css('margin-right',"-"+$('#content').css('margin-right')); 27
28 window.addEventListener('resize', function() { 28 if ($(window).width() > 900) {
29 $('.the-numbers .wp-block-columns .wp-block-column:first-of-type').css('margin-left',"-"+$('#content').css('margin-left')); 29 $('.the-numbers .wp-block-columns .wp-block-column:first-of-type').css('margin-left',"-"+$('#content').css('margin-left'));
30 $('.the-numbers .wp-block-columns .wp-block-column:last-of-type').css('margin-right',"-"+$('#content').css('margin-right')); 30 $('.the-numbers .wp-block-columns .wp-block-column:last-of-type').css('margin-right',"-"+$('#content').css('margin-right'));
31 }
32 window.addEventListener('resize', function() {
33 if ($(window).width() > 900) {
34 $('.the-numbers .wp-block-columns .wp-block-column:first-of-type').css('margin-left',"-"+$('#content').css('margin-left'));
35 $('.the-numbers .wp-block-columns .wp-block-column:last-of-type').css('margin-right',"-"+$('#content').css('margin-right'));
36 }
31 }); 37 });
38
32 39
33 function expandTiles(){ 40 function expandTiles(){
34 var tiles = $('.tile'); 41 var tiles = $('.tile');
......
...@@ -66,12 +66,12 @@ ...@@ -66,12 +66,12 @@
66 overflow: hidden; 66 overflow: hidden;
67 margin-bottom: 15px; 67 margin-bottom: 15px;
68 } 68 }
69 .large{ 69 .large{
70 color: #333333; 70 color: #333333;
71 font-size: 40px; 71 font-size: 40px;
72 line-height: 48px; 72 line-height: 48px;
73 73
74 } 74 }
75 75
76 } 76 }
77 77
...@@ -235,14 +235,24 @@ ...@@ -235,14 +235,24 @@
235 .the-numbers{ 235 .the-numbers{
236 margin-left: -12px; 236 margin-left: -12px;
237 margin-right: -12px; 237 margin-right: -12px;
238 @media (max-width: 900px) {
239 margin-left: -50px;
240 margin-right: -50px;
241 }
238 .wp-block-columns{ 242 .wp-block-columns{
239 gap: 0em; 243 gap: 0em;
244 @media (max-width: 900px) {
245 flex-wrap: wrap!important;
246 }
240 } 247 }
241 248
242 .wp-block-column{ 249 .wp-block-column{
243 padding: 50px; 250 padding: 50px;
244 background-color: #7AA6AD; 251 background-color: #7AA6AD;
245 color: #fff; 252 color: #fff;
253 @media (max-width: 900px) {
254 flex-basis: 50% !important;
255 }
246 } 256 }
247 .wp-block-column:nth-of-type(2){ 257 .wp-block-column:nth-of-type(2){
248 background-color: #C2B59B; 258 background-color: #C2B59B;
...@@ -283,6 +293,7 @@ ...@@ -283,6 +293,7 @@
283 background-color: #333333; 293 background-color: #333333;
284 margin: 0px -25%; 294 margin: 0px -25%;
285 padding: 40px 0%; 295 padding: 40px 0%;
296
286 h2{ 297 h2{
287 text-transform: uppercase; 298 text-transform: uppercase;
288 color: #fff; 299 color: #fff;
...@@ -290,12 +301,15 @@ ...@@ -290,12 +301,15 @@
290 line-height: 72px; 301 line-height: 72px;
291 font-weight: 400; 302 font-weight: 400;
292 margin-bottom: 20px; 303 margin-bottom: 20px;
293 padding: 0px 2%; 304 padding: 0px 25%;
294 } 305 }
295 p.first-of-type{ 306 p.first-of-type{
296 color: #fff; 307 color: #fff;
297 font-size: 20px; 308 font-size: 20px;
298 line-height: 24px; 309 line-height: 24px;
299 padding: 0px 20%; 310 padding: 0px 25%;
300 } 311 }
301 } 312 }
313
314
315
......
1
2
1 .tiles{ 3 .tiles{
2 display: grid; 4 display: grid;
3 grid-template-columns: auto auto auto; 5 grid-template-columns: 33.3% 33.3% 33.3%;
4 column-width: 33%; 6 column-width: 33.3%;
5 column-gap: 0px; 7 column-gap: 0px;
6 grid-auto-flow: dense; 8 grid-auto-flow: dense;
7 grid-template-rows: masonry; 9 max-width: 1300px;
8 margin-top: 40px;
9 max-width: 100vw;
10 margin: auto; 10 margin: auto;
11 margin-top: 40px;
11 transition: .5s; 12 transition: .5s;
12 background: #333; 13 background: #333;
14 @media (max-width: 1300px) {
15 max-width:100vw;
16 }
17 @media (max-width: 800px) {
18 width: 100vw;
19 display: block;
20 height: auto;
21 }
13 } 22 }
23
14 .tile { 24 .tile {
15 display: inline-grid; 25 display: inline-grid;
16 margin: 0px; 26 margin: 0px;
...@@ -20,6 +30,10 @@ ...@@ -20,6 +30,10 @@
20 vertical-align: top; 30 vertical-align: top;
21 grid-column-end: span 1; 31 grid-column-end: span 1;
22 grid-row-end: span 1; 32 grid-row-end: span 1;
33 height: 275px;
34 @media (max-width: 800px) {
35 display: block;
36 }
23 .tile_image{ 37 .tile_image{
24 background-size: cover; 38 background-size: cover;
25 background-position: center; 39 background-position: center;
...@@ -29,9 +43,132 @@ ...@@ -29,9 +43,132 @@
29 } 43 }
30 .hover_content{ 44 .hover_content{
31 opacity: 0; 45 opacity: 0;
46 @media (max-width: 800px) {
47 opacity: 1;
48 }
49 display: flex;
50 flex-direction: column;
51 justify-content: flex-end;
52 align-items: flex-start;
53 align-content: flex-start;
54 flex-wrap: wrap;
55 padding: 20px;
56 background-color: rgba(0,0,0,0.6);
57 height: 100%;
58 h3{
59 color: #fff;
60 font-size: 20px;
61 line-height: 24px;
62 text-transform: uppercase;
63 font-family: 'TradeGothic';
64 text-align: left;
65 }
66 p{
67 color: #fff;
68 font-size: 20px;
69 line-height: 24px;
70 font-weight: 400;
71 font-family: 'TradeGothic';
72 max-width: 70%;
73 text-align: left;
74 }
75
32 } 76 }
33 .tile_content{ 77 .tile_content{
34 display: none; 78 display: none;
79 flex-direction: column;
80 align-items: flex-start;
81 align-content: flex-start;
82 flex-wrap: wrap;
83 padding: 70px;
84 @media (max-width: 1300px) {
85 padding: 40px;
86 }
87 h3{
88 color: #fff;
89 font-size: 30px;
90 line-height: 36px;
91 text-transform: uppercase;
92 font-family: 'TradeGothic';
93 text-align: left;
94 @media (max-width: 800px) {
95 text-align: center;
96 font-size: 20px;
97 line-height: 24px;
98 margin-bottom: 30px;
99 }
100 }
101 p{
102 color: #fff;
103 font-size: 20px;
104 line-height: 24px;
105 font-weight: 400;
106 font-family: 'TradeGothic';
107 text-align: left;
108 @media (max-width: 800px) {
109 text-align: center;
110 font-size: 16px;
111 line-height: 19px;
112 }
113 }
114 .image{
115 height: 100%;
116 width: 40%;
117 display: inline-block;
118 margin-right: 30px;
119 @media (max-width: 800px) {
120 width: 80%;
121 height: auto;
122 margin: auto;
123 }
124 }
125 .tile_content.mobile{
126 display: none;
127 }
128 .title-mobile{
129 display: none;
130 @media (max-width: 800px) {
131 display: block;
132 }
133 }
134 .text{
135 display:flex;
136 flex-direction: column;
137 width: 55%;
138 justify-content: space-between;
139 flex-wrap: wrap;
140 height: 90%;
141 @media (max-width: 800px) {
142 display:block;
143 margin-top: 30px;
144 height: auto;
145 width: 100%;
146 }
147 h3{
148 @media (max-width: 800px) {
149 display: none;
150 }
151 }
152 .whole-story{
153 align-items: flex-end;
154 display: flex;
155 align-content: flex-end;
156 flex-wrap: wrap;
157 font-size: 24px;
158 line-height: 29px;
159 color: #fff;
160 text-decoration: none;
161 font-weight: 400;
162 @media (max-width: 800px) {
163 display: block;
164 text-align: center;
165 margin-top: 100px;
166 }
167 }
168 .whole-story:hover{
169 text-decoration: underline;
170 }
171 }
35 } 172 }
36 } 173 }
37 174
...@@ -39,8 +176,6 @@ ...@@ -39,8 +176,6 @@
39 .tile:hover { 176 .tile:hover {
40 .hover_content{ 177 .hover_content{
41 opacity: 1; 178 opacity: 1;
42 background-color: rgba(0,0,0,0.6);
43 height: 100%;
44 } 179 }
45 } 180 }
46 181
...@@ -50,39 +185,56 @@ ...@@ -50,39 +185,56 @@
50 .tile.expand { 185 .tile.expand {
51 grid-column-end: span 2; 186 grid-column-end: span 2;
52 grid-row-end: span 2; 187 grid-row-end: span 2;
188 height: 550px;
189 @media (max-width: 800px) {
190 height: auto;
191 }
53 .hover_content{ 192 .hover_content{
54 display: none; 193 display: none;
55 } 194 }
56 .tile_content{ 195 .tile_content{
57 margin-top: -16px; 196 display: flex;
58 display: block;
59 height: 100%; 197 height: 100%;
60 background-color: rgba(0,0,0,0.7); 198 background-color: rgba(0,0,0,0.7);
199 @media (max-width: 800px) {
200 display: none;
201 }
61 } 202 }
62 .tile_image{ 203 .tile_image{
63 height: 550px; 204 height: 550px;
205 @media (max-width: 800px) {
206 height: 275px;
207 }
64 } 208 }
65 } 209 .tile_content.mobile{
66
67 .tile.expand:hover {
68 .hover_content{
69 display: none; 210 display: none;
70 } 211 background-color: #333;
71 .tile_content{ 212 @media (max-width: 800px) {
72 display: block; 213 display: block;
73 height: 100%; 214 }
74 background-color: rgba(0,0,0,0.7);
75 } 215 }
76 } 216 }
77 217
78 // .last-expand{ 218 // .tile.expand:hover {
79 // .tile:nth-of-type(4){ 219 // .hover_content{
80 220 // display: none;
81 // grid-column-end:2;
82 // } 221 // }
83 222 // .tile_content{
84 // .tile:nth-of-type(5){ 223 // display: flex;
85 // grid-row-end: 4; 224 // @media (max-width: 800px) {
86 // grid-column-end:2; 225 // display: none;
226 // }
87 // } 227 // }
88 // } 228 // }
229
230 .last-expand{
231 .tile:nth-of-type(4){
232 grid-column-end:2;
233 }
234
235 .tile:nth-of-type(5){
236 grid-row-end: 4;
237 grid-column-end:2;
238 }
239 }
240
......