SiteOrigin Widgets Bundle - Version 1.15.8

Version Description

  • 20 August 2019 =
  • Run FitText setup on window resize events.
  • TinyMCE field: Copy any missing content CSS urls from main editor.
  • Post Carousel: Prevent scrolling past the last item.
  • Contact Form: Prevent sending to testing/dev emails.
  • Widget block: Add h3 wrapper for widget titles.
  • Image widget: Remove width:inherit; IE8 fix for bound setting which breaks in IE11.
  • Sliders: Added padding to slider navigation arrows.
  • Accordion: Check if if anchor is present in URL and scroll to Accordion item.
  • Various form description and styling fixes.
Download this release

Release Info

Developer gpriday
Plugin Icon 128x128 SiteOrigin Widgets Bundle
Version 1.15.8
Comparing to
See all releases

Code changes from version 1.15.7 to 1.15.8

Files changed (193) hide show
  1. admin/admin.css +1 -456
  2. admin/admin.less +0 -417
  3. admin/admin.min.js +1 -1
  4. admin/tpl/admin.php +137 -137
  5. admin/trianglify.min.js +1 -1
  6. base/base.php +294 -294
  7. base/css/admin.css +1 -639
  8. base/css/admin.less +0 -883
  9. base/css/mixins.css +0 -0
  10. base/css/post-selector.css +0 -23
  11. base/css/post-selector.less +0 -24
  12. base/css/preview.css +1 -8
  13. base/css/preview.less +0 -5
  14. base/inc/actions.php +282 -282
  15. base/inc/fields/builder.class.php +72 -72
  16. base/inc/fields/checkbox.class.php +26 -26
  17. base/inc/fields/container-base.class.php +125 -125
  18. base/inc/fields/css/date-range-field.css +1 -23
  19. base/inc/fields/css/icon-field.css +1 -131
  20. base/inc/fields/css/image-radio-field.css +1 -28
  21. base/inc/fields/css/measurement-field.css +1 -10
  22. base/inc/fields/css/media-field.css +1 -281
  23. base/inc/fields/css/multi-measurement-field.css +1 -19
  24. base/inc/fields/css/order-field.css +1 -12
  25. base/inc/fields/css/tinymce-field.css +1 -6
  26. base/inc/fields/date-range.class.php +131 -131
  27. base/inc/fields/editor.class.php +0 -10
  28. base/inc/fields/font.class.php +45 -45
  29. base/inc/fields/icon.class.php +142 -142
  30. base/inc/fields/image-radio.class.php +75 -75
  31. base/inc/fields/js/autocomplete-field.min.js +1 -1
  32. base/inc/fields/js/code-field.min.js +1 -1
  33. base/inc/fields/js/date-range-field.js +110 -110
  34. base/inc/fields/js/date-range-field.min.js +1 -1
  35. base/inc/fields/js/icon-field.js +229 -229
  36. base/inc/fields/js/icon-field.min.js +1 -1
  37. base/inc/fields/js/image-radio-field.js +18 -18
  38. base/inc/fields/js/lib/pikaday/pikaday.css +0 -222
  39. base/inc/fields/js/lib/pikaday/pikaday.js +0 -1193
  40. base/inc/fields/js/lib/pikaday/pikaday.min.js +0 -1
  41. base/inc/fields/js/media-field.js +409 -409
  42. base/inc/fields/js/media-field.min.js +1 -1
  43. base/inc/fields/js/multi-measurement-field.js +57 -57
  44. base/inc/fields/js/multi-measurement-field.min.js +1 -1
  45. base/inc/fields/js/so-tinymce-field.js +0 -132
  46. base/inc/fields/js/so-tinymce-field.min.js +0 -1
  47. base/inc/fields/js/tinymce-field.js +161 -145
  48. base/inc/fields/js/tinymce-field.min.js +1 -1
  49. base/inc/fields/multi-measurement.class.php +122 -122
  50. base/inc/fields/order.class.php +61 -61
  51. base/inc/fields/posts.class.php +203 -203
  52. base/inc/fields/repeater.class.php +128 -128
  53. base/inc/fields/section.class.php +22 -22
  54. base/inc/fields/slider.class.php +49 -49
  55. base/inc/fields/tinymce.class.php +561 -561
  56. base/inc/fields/widget.class.php +71 -71
  57. base/inc/fonts.php +4846 -4846
  58. base/inc/less-functions.php +41 -41
  59. base/inc/lessc.inc.php +283 -283
  60. base/inc/lib/Less/Exception/Chunk.php +198 -198
  61. base/inc/meta-box-manager.php +177 -177
  62. base/inc/post-selector.php +134 -134
  63. base/inc/preview.tpl.php +0 -15
  64. base/inc/routes/siteorigin-widgets-resource.class.php +172 -172
  65. base/inc/routes/sowb-rest-routes.php +50 -50
  66. base/inc/video.php +99 -99
  67. base/inc/widget-manager.class.php +198 -198
  68. base/inc/widgets/base-slider.class.php +370 -370
  69. base/js/admin.js +1456 -1456
  70. base/js/admin.min.js +1 -1
  71. base/js/meta-box-manager.js +13 -13
  72. base/js/posts-selector.js +0 -720
  73. base/js/posts-selector.min.js +0 -1
  74. base/less/mixins.less +193 -193
  75. base/siteorigin-widget.class.php +1406 -1406
  76. base/tpl/preview.php +0 -3
  77. compat/beaver-builder/beaver-builder.php +98 -98
  78. compat/beaver-builder/sowb-beaver-builder.js +142 -142
  79. compat/beaver-builder/styles.css +1 -366
  80. compat/block-editor/widget-block.js +303 -303
  81. compat/block-editor/widget-block.php +107 -102
  82. compat/compat.php +59 -59
  83. compat/elementor/elementor.php +88 -88
  84. compat/elementor/sowb-elementor.js +25 -25
  85. compat/elementor/styles.css +1 -166
  86. compat/visual-composer/sowb-vc-widget.js +80 -80
  87. compat/visual-composer/styles.css +1 -17
  88. compat/visual-composer/visual-composer.php +296 -296
  89. css/slider/slider.css +1 -235
  90. icons/fontawesome/filter.php +1695 -1695
  91. icons/fontawesome/style.css +320 -320
  92. icons/fontawesome/webfonts/fa-brands-400.svg +3452 -3452
  93. icons/fontawesome/webfonts/fa-regular-400.svg +803 -803
  94. icons/fontawesome/webfonts/fa-solid-900.svg +4527 -4527
  95. icons/icons.php +32 -32
  96. icons/ionicons/filter.php +740 -740
  97. js/jquery.cycle.min.js +1 -1
  98. js/jquery.touchSwipe.min.js +1 -1
  99. js/lib/imagesloaded.pkgd.min.js +1 -1
  100. js/lib/packery.pkgd.min.js +1 -1
  101. js/lib/pikaday.css +239 -239
  102. js/lib/pikaday.jquery.js +56 -56
  103. js/lib/pikaday.js +1236 -1236
  104. js/lib/pikaday.min.js +1 -1
  105. js/slider/jquery.slider.js +283 -283
  106. js/slider/jquery.slider.min.js +1 -1
  107. js/sow.google-map.js +515 -515
  108. js/sow.google-map.min.js +1 -1
  109. js/sow.jquery.fittext.js +74 -73
  110. js/sow.jquery.fittext.min.js +1 -1
  111. lang/so-widgets-bundle.pot +1588 -1576
  112. readme.md +0 -11
  113. readme.txt +888 -877
  114. so-widgets-bundle.php +870 -870
  115. widgets/accordion/accordion.php +244 -244
  116. widgets/accordion/js/accordion.js +182 -178
  117. widgets/accordion/js/accordion.min.js +1 -1
  118. widgets/accordion/styles/default.less +124 -124
  119. widgets/accordion/tpl/default.php +44 -44
  120. widgets/button/button.php +383 -383
  121. widgets/button/styles/atom.less +60 -60
  122. widgets/button/styles/flat.less +60 -60
  123. widgets/button/styles/wire.less +57 -57
  124. widgets/contact/contact.php +1342 -1341
  125. widgets/contact/fields/tel.class.php +5 -5
  126. widgets/contact/js/contact.js +100 -100
  127. widgets/contact/styles/default.less +245 -245
  128. widgets/contact/tpl/default.php +58 -58
  129. widgets/cta/cta.php +164 -164
  130. widgets/cta/js/cta.js +21 -21
  131. widgets/cta/js/cta.min.js +1 -1
  132. widgets/cta/styles/default.less +70 -70
  133. widgets/editor/editor.php +131 -131
  134. widgets/features/features.php +321 -321
  135. widgets/features/styles/default.less +206 -206
  136. widgets/features/tpl/default.php +65 -65
  137. widgets/google-map/fields/js/location-field.js +280 -280
  138. widgets/google-map/fields/js/location-field.min.js +1 -1
  139. widgets/google-map/fields/location.class.php +99 -99
  140. widgets/google-map/google-map.php +861 -861
  141. widgets/google-map/js/static-map.js +49 -49
  142. widgets/google-map/js/static-map.min.js +1 -1
  143. widgets/google-map/tpl/static-map.php +24 -24
  144. widgets/headline/headline.php +427 -427
  145. widgets/hero/hero.php +482 -481
  146. widgets/hero/styles/default.less +130 -130
  147. widgets/icon/icon.php +96 -96
  148. widgets/image-grid/css/image-grid.css +0 -1
  149. widgets/image-grid/image-grid.php +224 -223
  150. widgets/image-grid/js/image-grid.js +57 -57
  151. widgets/image-grid/js/image-grid.min.js +1 -1
  152. widgets/image-grid/styles/default.less +22 -22
  153. widgets/image-grid/tpl/default.php +29 -29
  154. widgets/image/image.php +211 -211
  155. widgets/image/styles/default.less +39 -39
  156. widgets/image/tpl/default.php +29 -29
  157. widgets/layout-slider/layout-slider.php +349 -349
  158. widgets/layout-slider/styles/default.less +82 -82
  159. widgets/post-carousel/js/carousel.js +184 -177
  160. widgets/post-carousel/js/carousel.min.js +1 -1
  161. widgets/post-carousel/post-carousel.php +175 -175
  162. widgets/post-carousel/tpl/base.php +37 -37
  163. widgets/post-carousel/tpl/carousel-post-loop.php +21 -21
  164. widgets/price-table/js/pricetable.js +71 -71
  165. widgets/price-table/js/pricetable.min.js +1 -1
  166. widgets/price-table/price-table.php +326 -326
  167. widgets/price-table/styles/atom.less +238 -238
  168. widgets/simple-masonry/js/imagesloaded.pkgd.js +0 -942
  169. widgets/simple-masonry/js/imagesloaded.pkgd.min.js +0 -1
  170. widgets/simple-masonry/js/packery.pkgd.js +0 -4089
  171. widgets/simple-masonry/js/packery.pkgd.min.js +0 -2
  172. widgets/simple-masonry/js/simple-masonry.js +86 -86
  173. widgets/simple-masonry/js/simple-masonry.min.js +1 -1
  174. widgets/simple-masonry/simple-masonry.php +234 -232
  175. widgets/slider/slider.php +275 -275
  176. widgets/social-media-buttons/data/networks.php +325 -325
  177. widgets/social-media-buttons/js/social-media-buttons-admin.js +39 -39
  178. widgets/social-media-buttons/js/social-media-buttons-admin.min.js +1 -1
  179. widgets/social-media-buttons/social-media-buttons.php +321 -321
  180. widgets/social-media-buttons/styles/widget-mixins.less +46 -46
  181. widgets/social-media-buttons/tpl/default.php +47 -47
  182. widgets/tabs/js/tabs.js +148 -148
  183. widgets/tabs/js/tabs.min.js +1 -1
  184. widgets/tabs/styles/default.less +157 -157
  185. widgets/tabs/tabs.php +259 -259
  186. widgets/tabs/tpl/default.php +37 -37
  187. widgets/taxonomy/taxonomy.php +106 -106
  188. widgets/testimonial/styles/default.less +188 -188
  189. widgets/testimonial/testimonial.php +373 -373
  190. widgets/testimonial/tpl/default.php +72 -72
  191. widgets/video/js/so-video-widget.js +23 -23
  192. widgets/video/tpl/default.php +55 -55
  193. widgets/video/video.php +281 -281
admin/admin.css CHANGED
@@ -1,456 +1 @@
1
- #sow-widgets-page {
2
- margin: 0 0 0 -20px;
3
- }
4
- #sow-widgets-page .page-banner {
5
- display: block;
6
- padding: 15px 30px 5px 30px;
7
- background: #f6f6f6;
8
- position: relative;
9
- }
10
- #sow-widgets-page .page-banner .icon {
11
- float: left;
12
- display: inline-block;
13
- width: 50px;
14
- height: 43px;
15
- position: relative;
16
- margin: 8px 22px 0 0;
17
- }
18
- #sow-widgets-page .page-banner .icon img {
19
- position: absolute;
20
- }
21
- #sow-widgets-page .page-banner .icon img.icon-back {
22
- top: 0;
23
- left: 0;
24
- }
25
- #sow-widgets-page .page-banner .icon img.icon-gear {
26
- top: 0;
27
- left: 12px;
28
- -webkit-animation: spin 60s linear infinite;
29
- -moz-animation: spin 60s linear infinite;
30
- animation: spin 60s linear infinite;
31
- }
32
- @-moz-keyframes spin {
33
- 100% {
34
- -moz-transform: rotate(360deg);
35
- }
36
- }
37
- @-webkit-keyframes spin {
38
- 100% {
39
- -webkit-transform: rotate(360deg);
40
- }
41
- }
42
- @keyframes spin {
43
- 100% {
44
- -webkit-transform: rotate(360deg);
45
- transform: rotate(360deg);
46
- }
47
- }
48
- #sow-widgets-page .page-banner .icon img.icon-front {
49
- top: 0;
50
- left: 0;
51
- }
52
- #sow-widgets-page .page-banner h1 {
53
- font: 300 2.3em/1.4em "proxima-nova", "Open Sans", Helvetica, Arial, sans-serif;
54
- color: #666;
55
- }
56
- #sow-widgets-page .page-banner #sow-widget-search {
57
- position: absolute;
58
- bottom: -35px;
59
- right: 19px;
60
- }
61
- #sow-widgets-page .page-banner #sow-widget-search input {
62
- box-sizing: border-box;
63
- width: 200px;
64
- }
65
- #sow-widgets-page .page-banner #sow-widget-search .results {
66
- display: none;
67
- box-sizing: border-box;
68
- position: absolute;
69
- top: 100%;
70
- left: 1px;
71
- width: 200px;
72
- background: #ffffff;
73
- border: 1px solid #e0e0e0;
74
- padding: 0;
75
- margin: -2px 0 0 0;
76
- -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075);
77
- -moz-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075);
78
- box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075);
79
- }
80
- #sow-widgets-page .page-banner #sow-widget-search .results li {
81
- margin: 0;
82
- padding: 5px;
83
- font-size: 0.95em;
84
- font-weight: bold;
85
- color: #777;
86
- cursor: pointer;
87
- }
88
- #sow-widgets-page .page-banner #sow-widget-search .results li:hover {
89
- background: #f7f7f7;
90
- }
91
- #sow-widgets-page .page-nav {
92
- background: #f6f6f6;
93
- border-bottom: 1px solid #d6d6d6;
94
- padding: 5px 0 0 30px;
95
- margin: 0;
96
- font-size: 0;
97
- }
98
- #sow-widgets-page .page-nav li {
99
- display: inline-block;
100
- margin: 0 0 -1px 0;
101
- background: #f6f6f6;
102
- line-height: 1em;
103
- font-size: 12px;
104
- position: relative;
105
- border: 1px solid #d6d6d6;
106
- border-width: 1px 0 1px 1px;
107
- transition: all 0.2s;
108
- }
109
- #sow-widgets-page .page-nav li:last-child {
110
- border-right-width: 1px;
111
- }
112
- #sow-widgets-page .page-nav li a {
113
- display: block;
114
- text-decoration: none;
115
- color: #555;
116
- padding: 12px 25px;
117
- font-weight: bold;
118
- box-shadow: none !important;
119
- }
120
- #sow-widgets-page .page-nav li:hover {
121
- background: #f3f3f3;
122
- }
123
- #sow-widgets-page .page-nav li.active {
124
- background: #f0f0f0;
125
- border-bottom-color: #f0f0f0;
126
- }
127
- #sow-widgets-page #widgets-list {
128
- zoom: 1;
129
- margin: 25px 18px 0 18px;
130
- position: relative;
131
- }
132
- #sow-widgets-page #widgets-list:before {
133
- content: '';
134
- display: block;
135
- }
136
- #sow-widgets-page #widgets-list:after {
137
- content: '';
138
- display: table;
139
- clear: both;
140
- }
141
- #sow-widgets-page #widgets-list .so-widget-wrap {
142
- float: left;
143
- -ms-box-sizing: border-box;
144
- -moz-box-sizing: border-box;
145
- -webkit-box-sizing: border-box;
146
- box-sizing: border-box;
147
- padding: 0 12px 24px 12px;
148
- width: 25%;
149
- }
150
- @media screen and (max-width: 1800px) {
151
- #sow-widgets-page #widgets-list .so-widget-wrap {
152
- width: 33.333%;
153
- }
154
- }
155
- @media screen and (max-width: 1280px) {
156
- #sow-widgets-page #widgets-list .so-widget-wrap {
157
- width: 50%;
158
- }
159
- }
160
- @media screen and (max-width: 960px) {
161
- #sow-widgets-page #widgets-list .so-widget-wrap {
162
- width: 100%;
163
- }
164
- }
165
- #sow-widgets-page #widgets-list .so-widget {
166
- border: 1px solid #D9D9D9;
167
- float: left;
168
- -webkit-box-shadow: 0 1px 2px rgba(0,0,0,0.05);
169
- -moz-box-shadow: 0 1px 2px rgba(0,0,0,0.05);
170
- box-shadow: 0 1px 2px rgba(0,0,0,0.05);
171
- padding: 0;
172
- width: 100%;
173
- background: #fefefe;
174
- position: relative;
175
- overflow: hidden;
176
- }
177
- #sow-widgets-page #widgets-list .so-widget .so-widget-banner {
178
- width: 128px;
179
- height: 128px;
180
- float: left;
181
- margin: 20px;
182
- overflow: hidden;
183
- }
184
- #sow-widgets-page #widgets-list .so-widget .so-widget-banner img,
185
- #sow-widgets-page #widgets-list .so-widget .so-widget-banner svg {
186
- height: 128px;
187
- width: auto;
188
- }
189
- #sow-widgets-page #widgets-list .so-widget .so-widget-text {
190
- padding: 20px 20px 20px 0;
191
- margin-left: 178px;
192
- }
193
- #sow-widgets-page #widgets-list .so-widget .so-widget-text .so-widget-active-indicator {
194
- float: right;
195
- margin: 0 0 10px 10px;
196
- background: #00a0d2;
197
- padding: 4px 10px;
198
- color: #fff;
199
- border-radius: 3px;
200
- -webkit-transition: all 0.35s ease;
201
- -moz-transition: all 0.35s ease;
202
- -o-transition: all 0.35s ease;
203
- transition: all 0.35s ease;
204
- }
205
- #sow-widgets-page #widgets-list .so-widget .so-widget-text h3 {
206
- color: #0073aa;
207
- font-size: 1.4em;
208
- font-weight: 500;
209
- margin-top: 0;
210
- }
211
- #sow-widgets-page #widgets-list .so-widget .so-widget-text .so-widget-description {
212
- margin: 0;
213
- line-height: 1.35em;
214
- color: #777777;
215
- }
216
- #sow-widgets-page #widgets-list .so-widget .so-widget-text .so-widget-byline {
217
- font-size: 0.9em;
218
- margin-top: 10px;
219
- color: #999;
220
- font-style: italic;
221
- }
222
- #sow-widgets-page #widgets-list .so-widget .so-widget-text .so-widget-byline a {
223
- color: #666;
224
- text-decoration: none;
225
- }
226
- #sow-widgets-page #widgets-list .so-widget .so-widget-text .so-widget-byline a:hover {
227
- color: #555;
228
- text-decoration: underline;
229
- }
230
- #sow-widgets-page #widgets-list .so-widget .so-action-links:after {
231
- content: "";
232
- display: table;
233
- clear: both;
234
- }
235
- #sow-widgets-page #widgets-list .so-widget .so-action-links .so-widget-toggle-active,
236
- #sow-widgets-page #widgets-list .so-widget .so-action-links .so-widget-settings,
237
- #sow-widgets-page #widgets-list .so-widget .so-action-links .so-widget-documentation {
238
- display: inline-block;
239
- float: left;
240
- margin-right: 1em;
241
- margin-top: 0.5em;
242
- }
243
- #sow-widgets-page #widgets-list .so-widget .so-action-links .so-widget-toggle-active button:focus {
244
- outline: none;
245
- }
246
- #sow-widgets-page #widgets-list .so-widget .so-action-links .so-widget-documentation {
247
- margin-top: 1em;
248
- }
249
- #sow-widgets-page #widgets-list .so-widget.so-widget-is-active .so-widget-toggle-active .so-widget-activate {
250
- display: none;
251
- }
252
- #sow-widgets-page #widgets-list .so-widget.so-widget-is-inactive .so-widget-toggle-active .so-widget-deactivate {
253
- display: none;
254
- }
255
- #sow-widgets-page #widgets-list .so-widget.so-widget-is-inactive .so-widget-active-indicator {
256
- opacity: 0;
257
- }
258
- #sow-widgets-page #widgets-list .so-widget.so-widget-is-inactive h3 {
259
- color: #666;
260
- }
261
- #sow-widgets-page #widgets-list .so-widget.so-widget-is-inactive svg,
262
- #sow-widgets-page #widgets-list .so-widget.so-widget-is-inactive img {
263
- filter: url(filters.svg#grayscale);
264
- filter: gray;
265
- -webkit-filter: grayscale(1);
266
- opacity: 0.7;
267
- }
268
- #sow-widgets-page #widgets-list.so-animated img,
269
- #sow-widgets-page #widgets-list.so-animated svg {
270
- -webkit-transition: all 0.45s ease;
271
- -moz-transition: all 0.45s ease;
272
- -o-transition: all 0.45s ease;
273
- transition: all 0.45s ease;
274
- }
275
- #sow-widgets-page .developers-link {
276
- padding: 0 30px;
277
- text-align: right;
278
- color: #777;
279
- font-style: italic;
280
- }
281
- #sow-widgets-page #sow-settings-dialog {
282
- display: none;
283
- }
284
- #sow-widgets-page #sow-settings-dialog .so-overlay,
285
- #sow-widgets-page #sow-settings-dialog .so-content,
286
- #sow-widgets-page #sow-settings-dialog .so-title-bar,
287
- #sow-widgets-page #sow-settings-dialog .so-toolbar,
288
- #sow-widgets-page #sow-settings-dialog .so-left-sidebar,
289
- #sow-widgets-page #sow-settings-dialog .so-right-sidebar {
290
- z-index: 100001;
291
- position: fixed;
292
- -ms-box-sizing: border-box;
293
- -moz-box-sizing: border-box;
294
- -webkit-box-sizing: border-box;
295
- box-sizing: border-box;
296
- padding: 15px;
297
- }
298
- #sow-widgets-page #sow-settings-dialog .so-overlay {
299
- top: 0;
300
- left: 0;
301
- right: 0;
302
- bottom: 0;
303
- background: rgba(0, 0, 0, 0.5);
304
- }
305
- #sow-widgets-page #sow-settings-dialog .so-content {
306
- overflow-y: auto;
307
- top: 80px;
308
- left: 30px;
309
- right: 30px;
310
- bottom: 88px;
311
- background-color: #fdfdfd;
312
- overflow-x: hidden;
313
- -webkit-box-shadow: inset 0 2px 2px rgba(0,0,0,0.03);
314
- -moz-box-shadow: inset 0 2px 2px rgba(0,0,0,0.03);
315
- box-shadow: inset 0 2px 2px rgba(0,0,0,0.03);
316
- }
317
- #sow-widgets-page #sow-settings-dialog .so-content > *:first-child,
318
- #sow-widgets-page #sow-settings-dialog .so-content form > *:first-child {
319
- margin-top: 0;
320
- }
321
- #sow-widgets-page #sow-settings-dialog .so-content > *:last-child,
322
- #sow-widgets-page #sow-settings-dialog .so-content form > *:last-child {
323
- margin-bottom: 0;
324
- }
325
- #sow-widgets-page #sow-settings-dialog .so-content .so-content-tabs > * {
326
- display: none;
327
- }
328
- #sow-widgets-page #sow-settings-dialog .so-content.so-loading {
329
- background-image: url("images/wpspin_light.gif");
330
- background-position: center center;
331
- background-repeat: no-repeat;
332
- }
333
- @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
334
- #sow-widgets-page #sow-settings-dialog .so-content.so-loading {
335
- background-image: url(images/wpspin_light-2x.gif);
336
- background-size: 16px 16px;
337
- }
338
- }
339
- #sow-widgets-page #sow-settings-dialog .so-title-bar {
340
- left: 30px;
341
- right: 30px;
342
- top: 30px;
343
- height: 50px;
344
- background-color: #fafafa;
345
- border-bottom: 1px solid #D8D8D8;
346
- /* These are the action buttons in the title bar */
347
- }
348
- #sow-widgets-page #sow-settings-dialog .so-title-bar h3.so-title {
349
- margin: 0 !important;
350
- padding: 0 !important;
351
- }
352
- #sow-widgets-page #sow-settings-dialog .so-title-bar a {
353
- cursor: pointer;
354
- position: absolute;
355
- box-sizing: border-box;
356
- width: 50px;
357
- height: 50px;
358
- display: block;
359
- top: 0;
360
- right: 0;
361
- -webkit-transition: all 0.2s ease;
362
- -moz-transition: all 0.2s ease;
363
- -o-transition: all 0.2s ease;
364
- transition: all 0.2s ease;
365
- background: #fafafa;
366
- border-left: 1px solid #d8d8d8;
367
- border-bottom: 1px solid #d8d8d8;
368
- }
369
- #sow-widgets-page #sow-settings-dialog .so-title-bar a:hover {
370
- background: #e9e9e9;
371
- }
372
- #sow-widgets-page #sow-settings-dialog .so-title-bar a:hover .so-dialog-icon {
373
- color: #333333;
374
- }
375
- #sow-widgets-page #sow-settings-dialog .so-title-bar a .so-dialog-icon {
376
- position: absolute;
377
- top: 50%;
378
- left: 50%;
379
- text-decoration: none;
380
- width: 20px;
381
- height: 20px;
382
- margin-left: -10px;
383
- margin-top: -10px;
384
- color: #666666;
385
- text-align: center;
386
- }
387
- #sow-widgets-page #sow-settings-dialog .so-title-bar a .so-dialog-icon:before {
388
- font: 400 20px/1em dashicons;
389
- top: 7px;
390
- left: 13px;
391
- }
392
- #sow-widgets-page #sow-settings-dialog .so-title-bar a.so-close {
393
- right: 0;
394
- }
395
- #sow-widgets-page #sow-settings-dialog .so-title-bar a.so-close .so-dialog-icon:before {
396
- content: "\f335";
397
- }
398
- #sow-widgets-page #sow-settings-dialog .so-toolbar {
399
- left: 30px;
400
- right: 30px;
401
- bottom: 30px;
402
- height: 58px;
403
- background-color: #fafafa;
404
- border-top: 1px solid #D8D8D8;
405
- z-index: 100002;
406
- }
407
- #sow-widgets-page #sow-settings-dialog .so-toolbar .so-status {
408
- float: left;
409
- padding-top: 6px;
410
- padding-bottom: 6px;
411
- font-style: italic;
412
- color: #999999;
413
- line-height: 1em;
414
- }
415
- #sow-widgets-page #sow-settings-dialog .so-toolbar .so-status.so-panels-loading {
416
- padding-left: 26px;
417
- background-position: left center;
418
- }
419
- #sow-widgets-page #sow-settings-dialog .so-toolbar .so-buttons {
420
- float: right;
421
- }
422
- #sow-widgets-page #sow-settings-dialog .so-toolbar .so-buttons .action-buttons {
423
- position: absolute;
424
- left: 15px;
425
- top: 50%;
426
- margin-top: -0.65em;
427
- }
428
- #sow-widgets-page #sow-settings-dialog .so-toolbar .so-buttons .action-buttons a {
429
- cursor: pointer;
430
- display: inline;
431
- padding: 0.2em 0.5em;
432
- line-height: 1em;
433
- margin-right: 0.5em;
434
- text-decoration: none;
435
- }
436
- #sow-widgets-page #sow-settings-dialog .so-toolbar .so-buttons .action-buttons .so-delete {
437
- color: #a00;
438
- }
439
- #sow-widgets-page #sow-settings-dialog .so-toolbar .so-buttons .action-buttons .so-delete:hover {
440
- background: #a00;
441
- color: #FFFFFF;
442
- }
443
- #sow-widgets-page #sow-settings-dialog .so-toolbar .so-buttons .action-buttons .so-duplicate:hover {
444
- text-decoration: underline;
445
- }
446
- #sow-widgets-page #sow-settings-dialog .siteorigin-widget-help-link {
447
- display: none;
448
- }
449
- #sow-widgets-page #so-widget-settings-save {
450
- width: 0;
451
- height: 0;
452
- border: none;
453
- }
454
- body.plugins_page_so-widgets-plugins #contextual-help-link-wrap {
455
- z-index: 10;
456
- }
1
+ #sow-widgets-page{margin:0 0 0 -20px}#sow-widgets-page .page-banner{display:block;padding:15px 30px 5px 30px;background:#f6f6f6;position:relative}#sow-widgets-page .page-banner .icon{float:left;display:inline-block;width:50px;height:43px;position:relative;margin:8px 22px 0 0}#sow-widgets-page .page-banner .icon img{position:absolute}#sow-widgets-page .page-banner .icon img.icon-back{top:0;left:0}#sow-widgets-page .page-banner .icon img.icon-gear{top:0;left:12px;-webkit-animation:spin 60s linear infinite;-moz-animation:spin 60s linear infinite;animation:spin 60s linear infinite}@-moz-keyframes spin{100%{-moz-transform:rotate(360deg)}}@-webkit-keyframes spin{100%{-webkit-transform:rotate(360deg)}}@keyframes spin{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}#sow-widgets-page .page-banner .icon img.icon-front{top:0;left:0}#sow-widgets-page .page-banner h1{font:300 2.3em/1.4em "proxima-nova","Open Sans",Helvetica,Arial,sans-serif;color:#666}#sow-widgets-page .page-banner #sow-widget-search{position:absolute;bottom:-35px;right:19px}#sow-widgets-page .page-banner #sow-widget-search input{box-sizing:border-box;width:200px}#sow-widgets-page .page-banner #sow-widget-search .results{display:none;box-sizing:border-box;position:absolute;top:100%;left:1px;width:200px;background:#ffffff;border:1px solid #e0e0e0;padding:0;margin:-2px 0 0 0;-webkit-box-shadow:0 1px 1px rgba(0,0,0,0.075);-moz-box-shadow:0 1px 1px rgba(0,0,0,0.075);box-shadow:0 1px 1px rgba(0,0,0,0.075)}#sow-widgets-page .page-banner #sow-widget-search .results li{margin:0;padding:5px;font-size:.95em;font-weight:bold;color:#777;cursor:pointer}#sow-widgets-page .page-banner #sow-widget-search .results li:hover{background:#f7f7f7}#sow-widgets-page .page-nav{background:#f6f6f6;border-bottom:1px solid #d6d6d6;padding:5px 0 0 30px;margin:0;font-size:0}#sow-widgets-page .page-nav li{display:inline-block;margin:0 0 -1px 0;background:#f6f6f6;line-height:1em;font-size:12px;position:relative;border:1px solid #d6d6d6;border-width:1px 0 1px 1px;transition:all .2s}#sow-widgets-page .page-nav li:last-child{border-right-width:1px}#sow-widgets-page .page-nav li a{display:block;text-decoration:none;color:#555;padding:12px 25px;font-weight:bold;box-shadow:none !important}#sow-widgets-page .page-nav li:hover{background:#f3f3f3}#sow-widgets-page .page-nav li.active{background:#f0f0f0;border-bottom-color:#f0f0f0}#sow-widgets-page #widgets-list{zoom:1;margin:25px 18px 0 18px;position:relative}#sow-widgets-page #widgets-list:before{content:'';display:block}#sow-widgets-page #widgets-list:after{content:'';display:table;clear:both}#sow-widgets-page #widgets-list .so-widget-wrap{float:left;-ms-box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;padding:0 12px 24px 12px;width:25%}@media screen and (max-width:1800px){#sow-widgets-page #widgets-list .so-widget-wrap{width:33.333%}}@media screen and (max-width:1280px){#sow-widgets-page #widgets-list .so-widget-wrap{width:50%}}@media screen and (max-width:960px){#sow-widgets-page #widgets-list .so-widget-wrap{width:100%}}#sow-widgets-page #widgets-list .so-widget{border:1px solid #D9D9D9;float:left;-webkit-box-shadow:0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:0 1px 2px rgba(0,0,0,0.05);box-shadow:0 1px 2px rgba(0,0,0,0.05);padding:0;width:100%;background:#fefefe;position:relative;overflow:hidden}#sow-widgets-page #widgets-list .so-widget .so-widget-banner{width:128px;height:128px;float:left;margin:20px;overflow:hidden}#sow-widgets-page #widgets-list .so-widget .so-widget-banner img,#sow-widgets-page #widgets-list .so-widget .so-widget-banner svg{height:128px;width:auto}#sow-widgets-page #widgets-list .so-widget .so-widget-text{padding:20px 20px 20px 0;margin-left:178px}#sow-widgets-page #widgets-list .so-widget .so-widget-text .so-widget-active-indicator{float:right;margin:0 0 10px 10px;background:#00a0d2;padding:4px 10px;color:#fff;border-radius:3px;-webkit-transition:all .35s ease;-moz-transition:all .35s ease;-o-transition:all .35s ease;transition:all .35s ease}#sow-widgets-page #widgets-list .so-widget .so-widget-text h3{color:#0073aa;font-size:1.4em;font-weight:500;margin-top:0}#sow-widgets-page #widgets-list .so-widget .so-widget-text .so-widget-description{margin:0;line-height:1.35em;color:#777777}#sow-widgets-page #widgets-list .so-widget .so-widget-text .so-widget-byline{font-size:.9em;margin-top:10px;color:#999;font-style:italic}#sow-widgets-page #widgets-list .so-widget .so-widget-text .so-widget-byline a{color:#666;text-decoration:none}#sow-widgets-page #widgets-list .so-widget .so-widget-text .so-widget-byline a:hover{color:#555;text-decoration:underline}#sow-widgets-page #widgets-list .so-widget .so-action-links:after{content:"";display:table;clear:both}#sow-widgets-page #widgets-list .so-widget .so-action-links .so-widget-toggle-active,#sow-widgets-page #widgets-list .so-widget .so-action-links .so-widget-settings,#sow-widgets-page #widgets-list .so-widget .so-action-links .so-widget-documentation{display:inline-block;float:left;margin-right:1em;margin-top:.5em}#sow-widgets-page #widgets-list .so-widget .so-action-links .so-widget-toggle-active button:focus{outline:none}#sow-widgets-page #widgets-list .so-widget .so-action-links .so-widget-documentation{margin-top:1em}#sow-widgets-page #widgets-list .so-widget.so-widget-is-active .so-widget-toggle-active .so-widget-activate{display:none}#sow-widgets-page #widgets-list .so-widget.so-widget-is-inactive .so-widget-toggle-active .so-widget-deactivate{display:none}#sow-widgets-page #widgets-list .so-widget.so-widget-is-inactive .so-widget-active-indicator{opacity:0}#sow-widgets-page #widgets-list .so-widget.so-widget-is-inactive h3{color:#666}#sow-widgets-page #widgets-list .so-widget.so-widget-is-inactive svg,#sow-widgets-page #widgets-list .so-widget.so-widget-is-inactive img{filter:url(filters.svg#grayscale);filter:gray;-webkit-filter:grayscale(1);opacity:.7}#sow-widgets-page #widgets-list.so-animated img,#sow-widgets-page #widgets-list.so-animated svg{-webkit-transition:all .45s ease;-moz-transition:all .45s ease;-o-transition:all .45s ease;transition:all .45s ease}#sow-widgets-page .developers-link{padding:0 30px;text-align:right;color:#777;font-style:italic}#sow-widgets-page #sow-settings-dialog{display:none}#sow-widgets-page #sow-settings-dialog .so-overlay,#sow-widgets-page #sow-settings-dialog .so-content,#sow-widgets-page #sow-settings-dialog .so-title-bar,#sow-widgets-page #sow-settings-dialog .so-toolbar,#sow-widgets-page #sow-settings-dialog .so-left-sidebar,#sow-widgets-page #sow-settings-dialog .so-right-sidebar{z-index:100001;position:fixed;-ms-box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;padding:15px}#sow-widgets-page #sow-settings-dialog .so-overlay{top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,0.5)}#sow-widgets-page #sow-settings-dialog .so-content{overflow-y:auto;top:80px;left:30px;right:30px;bottom:88px;background-color:#fdfdfd;overflow-x:hidden;-webkit-box-shadow:inset 0 2px 2px rgba(0,0,0,0.03);-moz-box-shadow:inset 0 2px 2px rgba(0,0,0,0.03);box-shadow:inset 0 2px 2px rgba(0,0,0,0.03)}#sow-widgets-page #sow-settings-dialog .so-content>*:first-child,#sow-widgets-page #sow-settings-dialog .so-content form>*:first-child{margin-top:0}#sow-widgets-page #sow-settings-dialog .so-content>*:last-child,#sow-widgets-page #sow-settings-dialog .so-content form>*:last-child{margin-bottom:0}#sow-widgets-page #sow-settings-dialog .so-content .so-content-tabs>*{display:none}#sow-widgets-page #sow-settings-dialog .so-content.so-loading{background-image:url("images/wpspin_light.gif");background-position:center center;background-repeat:no-repeat}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){#sow-widgets-page #sow-settings-dialog .so-content.so-loading{background-image:url(images/wpspin_light-2x.gif);background-size:16px 16px}}#sow-widgets-page #sow-settings-dialog .so-title-bar{left:30px;right:30px;top:30px;height:50px;background-color:#fafafa;border-bottom:1px solid #D8D8D8}#sow-widgets-page #sow-settings-dialog .so-title-bar h3.so-title{margin:0 !important;padding:0 !important}#sow-widgets-page #sow-settings-dialog .so-title-bar a{cursor:pointer;position:absolute;box-sizing:border-box;width:50px;height:50px;display:block;top:0;right:0;-webkit-transition:all .2s ease;-moz-transition:all .2s ease;-o-transition:all .2s ease;transition:all .2s ease;background:#fafafa;border-left:1px solid #d8d8d8;border-bottom:1px solid #d8d8d8}#sow-widgets-page #sow-settings-dialog .so-title-bar a:hover{background:#e9e9e9}#sow-widgets-page #sow-settings-dialog .so-title-bar a:hover .so-dialog-icon{color:#333333}#sow-widgets-page #sow-settings-dialog .so-title-bar a .so-dialog-icon{position:absolute;top:50%;left:50%;text-decoration:none;width:20px;height:20px;margin-left:-10px;margin-top:-10px;color:#666666;text-align:center}#sow-widgets-page #sow-settings-dialog .so-title-bar a .so-dialog-icon:before{font:400 20px/1em dashicons;top:7px;left:13px}#sow-widgets-page #sow-settings-dialog .so-title-bar a.so-close{right:0}#sow-widgets-page #sow-settings-dialog .so-title-bar a.so-close .so-dialog-icon:before{content:"\f335"}#sow-widgets-page #sow-settings-dialog .so-toolbar{left:30px;right:30px;bottom:30px;height:58px;background-color:#fafafa;border-top:1px solid #D8D8D8;z-index:100002}#sow-widgets-page #sow-settings-dialog .so-toolbar .so-status{float:left;padding-top:6px;padding-bottom:6px;font-style:italic;color:#999999;line-height:1em}#sow-widgets-page #sow-settings-dialog .so-toolbar .so-status.so-panels-loading{padding-left:26px;background-position:left center}#sow-widgets-page #sow-settings-dialog .so-toolbar .so-buttons{float:right}#sow-widgets-page #sow-settings-dialog .so-toolbar .so-buttons .action-buttons{position:absolute;left:15px;top:50%;margin-top:-0.65em}#sow-widgets-page #sow-settings-dialog .so-toolbar .so-buttons .action-buttons a{cursor:pointer;display:inline;padding:.2em .5em;line-height:1em;margin-right:.5em;text-decoration:none}#sow-widgets-page #sow-settings-dialog .so-toolbar .so-buttons .action-buttons .so-delete{color:#a00}#sow-widgets-page #sow-settings-dialog .so-toolbar .so-buttons .action-buttons .so-delete:hover{background:#a00;color:#FFFFFF}#sow-widgets-page #sow-settings-dialog .so-toolbar .so-buttons .action-buttons .so-duplicate:hover{text-decoration:underline}#sow-widgets-page #sow-settings-dialog .siteorigin-widget-help-link{display:none}#sow-widgets-page #so-widget-settings-save{width:0;height:0;border:none}body.plugins_page_so-widgets-plugins #contextual-help-link-wrap{z-index:10}
admin/admin.less DELETED
@@ -1,417 +0,0 @@
1
- @import "../base/less/mixins";
2
-
3
- #sow-widgets-page {
4
-
5
- margin: 0 0 0 -20px;
6
-
7
- .page-banner {
8
- display: block;
9
- padding: 15px 30px 5px 30px;
10
- background: #f6f6f6;
11
- position: relative;
12
-
13
- .icon {
14
- float: left;
15
- display: inline-block;
16
- width: 50px;
17
- height: 43px;
18
- position: relative;
19
- margin: 16px 22px 0 0;
20
-
21
- img {
22
- position: absolute;
23
-
24
- &.icon-back {
25
- top: 0;
26
- left: 0;
27
- }
28
-
29
- &.icon-gear {
30
- top: 0;
31
- left: 12px;
32
-
33
- -webkit-animation:spin 60s linear infinite;
34
- -moz-animation:spin 60s linear infinite;
35
- animation:spin 60s linear infinite;
36
-
37
- @-moz-keyframes spin { 100% { -moz-transform: rotate(360deg); } }
38
- @-webkit-keyframes spin { 100% { -webkit-transform: rotate(360deg); } }
39
- @keyframes spin { 100% { -webkit-transform: rotate(360deg); transform:rotate(360deg); } }
40
- }
41
-
42
- &.icon-front {
43
- top: 0;
44
- left: 0;
45
- }
46
- }
47
-
48
- }
49
-
50
- h1 {
51
- font: 300 2.3em/1.4em "proxima-nova", "Open Sans", Helvetica, Arial, sans-serif;
52
- color: #666;
53
- }
54
-
55
-
56
- #sow-widget-search {
57
- position: absolute;
58
- bottom: -35px;
59
- right: 19px;
60
-
61
- input{
62
- box-sizing: border-box;
63
- width: 200px;
64
- }
65
-
66
- .results {
67
- display: none;
68
-
69
- box-sizing: border-box;
70
- position: absolute;
71
- top: 100%;
72
- left: 1px;
73
- width: 200px;
74
- background: #ffffff;
75
- border: 1px solid #e0e0e0;
76
- padding: 0;
77
- margin: -2px 0 0 0;
78
-
79
- -webkit-box-shadow: 0 1px 1px rgba(0,0,0,0.075);
80
- -moz-box-shadow: 0 1px 1px rgba(0,0,0,0.075);
81
- box-shadow: 0 1px 1px rgba(0,0,0,0.075);
82
-
83
- li {
84
- margin: 0;
85
- padding: 5px;
86
- font-size: 0.95em;
87
- font-weight: bold;
88
- color: #777;
89
- cursor: pointer;
90
-
91
- &:hover {
92
- background: #f7f7f7;
93
- }
94
- }
95
- }
96
- }
97
-
98
- }
99
-
100
- .page-nav {
101
- background: #f6f6f6;
102
- border-bottom: 1px solid #d6d6d6;
103
- padding: 5px 0 0 30px;
104
- margin: 0;
105
- font-size: 0;
106
-
107
- li{
108
- display: inline-block;
109
- margin: 0 0 -1px 0;
110
- background: #f6f6f6;
111
- line-height: 1em;
112
- font-size: 12px;
113
- position: relative;
114
-
115
- border: 1px solid #d6d6d6;
116
- border-width: 1px 0 1px 1px;
117
-
118
- transition: all 0.2s;
119
-
120
- &:last-child {
121
- border-right-width: 1px;
122
- }
123
-
124
- a {
125
- display: block;
126
- text-decoration: none;
127
- color: #555;
128
- padding: 12px 25px;
129
- font-weight: bold;
130
- box-shadow: none !important;
131
-
132
- }
133
-
134
- &:hover {
135
- background: #f3f3f3;
136
- }
137
-
138
- &.active {
139
- background: #f0f0f0;
140
- border-bottom-color: #f0f0f0;
141
- }
142
- }
143
-
144
- }
145
-
146
- #widgets-list {
147
- .clearfix();
148
-
149
- margin: 25px 18px 0 18px;
150
- position: relative;
151
-
152
-
153
- .so-widget-wrap {
154
- float: left;
155
- .box-sizing(border-box);
156
- padding: 0 12px 24px 12px;
157
- width: 20%;
158
-
159
- @media screen and (max-width: 1800px) {
160
- &{
161
- width: 25%;
162
-
163
- }
164
- }
165
-
166
- @media screen and (max-width: 1280px) {
167
- &{
168
- width: 33.33%;
169
-
170
- }
171
- }
172
-
173
- @media screen and (max-width: 800px) {
174
- &{
175
- width: 50%;
176
-
177
- }
178
- }
179
- }
180
-
181
- .so-widget{
182
- float: left;
183
- .box-shadow(~"0 1px 2px rgba(0,0,0,0.05)");
184
- padding: 0;
185
- width: 100%;
186
-
187
- background: #F2F2F2;
188
- border: 1px solid #D9D9D9;
189
- position: relative;
190
- overflow: hidden;
191
-
192
- .so-widgets-active-banner {
193
- position: absolute;
194
- background: #555555;
195
- background: rgba(0,0,0,0.75);
196
- padding: 12px;
197
- text-align: center;
198
- top: 0px;
199
- left: 0px;
200
- width: 100%;
201
- font-weight: bold;
202
- font-size: 13px;
203
- line-height: 1em;
204
- color: #FFFFFF;
205
- }
206
-
207
- img {
208
- display: block;
209
- width: 100%;
210
- height: auto;
211
- background: #FFFFFF;
212
- border-bottom: 1px solid #D9D9D9;
213
- }
214
-
215
- .so-widget-text {
216
-
217
- padding: 20px;
218
-
219
- h4 {
220
- margin-top: 0;
221
- color: #777777;
222
- font-weight: bold;
223
- font-size: 1.2em;
224
- }
225
-
226
- p.so-widget-description {
227
- margin-bottom: 0;
228
- line-height: 1.35em;
229
- color: #777777;
230
- min-height: 2.7em;
231
- }
232
- }
233
-
234
- img, &, .so-widget-text, .so-widget-text h4, .so-widget-text p {
235
- .transition(0.5s);
236
- min-height: 1em;
237
- }
238
-
239
- /* The Switch - © 2013 Thibaut Courouble - MIT License */
240
-
241
- .switch {
242
- .dashicons-yes {
243
- position: absolute;
244
- top: 2px;
245
- left: -20px;
246
- color: #009200;
247
- display: none;
248
- }
249
-
250
- float: right;
251
- position: relative;
252
- display: inline-block;
253
- vertical-align: top;
254
- width: 56px;
255
- height: 20px;
256
- padding: 3px;
257
- background-color: #ffffff;
258
- border-radius: 18px;
259
- box-shadow: inset 0 -1px #ffffff, inset 0 1px 1px rgba(0, 0, 0, 0.05);
260
- cursor: pointer;
261
- margin-left: 16px;
262
- background-image: -webkit-linear-gradient(top, #eeeeee, #ffffff 25px);
263
- background-image: -moz-linear-gradient(top, #eeeeee, #ffffff 25px);
264
- background-image: -o-linear-gradient(top, #eeeeee, #ffffff 25px);
265
- background-image: linear-gradient(to bottom, #eeeeee, #ffffff 25px);
266
-
267
- .switch-input {
268
- position: absolute;
269
- top: 0;
270
- left: 0;
271
- opacity: 0;
272
- }
273
-
274
- .switch-label {
275
- position: relative;
276
- display: block;
277
- height: inherit;
278
- font-size: 10px;
279
- text-transform: uppercase;
280
- background: #eceeef;
281
- border-radius: inherit;
282
- box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.12), inset 0 0 2px rgba(0, 0, 0, 0.15);
283
- -webkit-transition: 0.15s ease-out;
284
- -moz-transition: 0.15s ease-out;
285
- -o-transition: 0.15s ease-out;
286
- transition: 0.15s ease-out;
287
- -webkit-transition-property: opacity background;
288
- -moz-transition-property: opacity background;
289
- -o-transition-property: opacity background;
290
- transition-property: opacity background;
291
- }
292
- .switch-label:before,
293
- .switch-label:after {
294
- position: absolute;
295
- top: 50%;
296
- margin-top: -.5em;
297
- line-height: 1;
298
- -webkit-transition: inherit;
299
- -moz-transition: inherit;
300
- -o-transition: inherit;
301
- transition: inherit;
302
- }
303
- .switch-label:before {
304
- content: attr(data-off);
305
- right: 11px;
306
- color: #aaa;
307
- text-shadow: 0 1px rgba(255, 255, 255, 0.5);
308
- }
309
- .switch-label:after {
310
- content: attr(data-on);
311
- left: 11px;
312
- color: #ffffff;
313
- text-shadow: 0 1px rgba(0, 0, 0, 0.2);
314
- opacity: 0;
315
- }
316
- .switch-input:checked ~ .switch-label {
317
- background: #47a8d8;
318
- box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.15), inset 0 0 3px rgba(0, 0, 0, 0.2);
319
- }
320
- .switch-input:checked ~ .switch-label:before {
321
- opacity: 0;
322
- }
323
- .switch-input:checked ~ .switch-label:after {
324
- opacity: 1;
325
- }
326
-
327
- .switch-handle {
328
- position: absolute;
329
- top: 4px;
330
- left: 4px;
331
- width: 18px;
332
- height: 18px;
333
- background: #ffffff;
334
- border-radius: 10px;
335
- box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.2);
336
- background-image: -webkit-linear-gradient(top, #ffffff 40%, #f0f0f0);
337
- background-image: -moz-linear-gradient(top, #ffffff 40%, #f0f0f0);
338
- background-image: -o-linear-gradient(top, #ffffff 40%, #f0f0f0);
339
- background-image: linear-gradient(to bottom, #ffffff 40%, #f0f0f0);
340
- -webkit-transition: left 0.15s ease-out;
341
- -moz-transition: left 0.15s ease-out;
342
- -o-transition: left 0.15s ease-out;
343
- transition: left 0.15s ease-out;
344
- }
345
- .switch-handle:before {
346
- content: '';
347
- position: absolute;
348
- top: 50%;
349
- left: 50%;
350
- margin: -6px 0 0 -6px;
351
- width: 12px;
352
- height: 12px;
353
- background: #f9f9f9;
354
- border-radius: 6px;
355
- box-shadow: inset 0 1px rgba(0, 0, 0, 0.02);
356
- background-image: -webkit-linear-gradient(top, #eeeeee, #ffffff);
357
- background-image: -moz-linear-gradient(top, #eeeeee, #ffffff);
358
- background-image: -o-linear-gradient(top, #eeeeee, #ffffff);
359
- background-image: linear-gradient(to bottom, #eeeeee, #ffffff);
360
- }
361
- .switch-input:checked ~ .switch-handle {
362
- left: 40px;
363
- box-shadow: -1px 1px 5px rgba(0, 0, 0, 0.2);
364
- }
365
-
366
- .switch-green > .switch-input:checked ~ .switch-label {
367
- background: #4fb845;
368
- }
369
- }
370
-
371
- &.so-widget-is-active {
372
-
373
- img {
374
- border-bottom: 1px solid #D9D9D9;
375
- }
376
-
377
- background: #F9F9F9;
378
- border: 1px solid #C9C9C9;
379
-
380
- .so-widget-text {
381
-
382
- h4 {
383
- color: #333333;
384
- }
385
-
386
- p {
387
- color: #333333;
388
- }
389
- }
390
- }
391
-
392
- &.so-widget-is-inactive {
393
- img {
394
- filter: url(filters.svg#grayscale);
395
- filter: gray;
396
- -webkit-filter: grayscale(1);
397
- opacity: 0.7;
398
- }
399
- }
400
-
401
- }
402
- }
403
-
404
- .developers-link {
405
- padding: 0 30px;
406
- text-align: right;
407
- color: #777;
408
- font-style: italic;
409
- }
410
-
411
- }
412
-
413
- body.plugins_page_so-widgets-plugins {
414
- #contextual-help-link-wrap {
415
- z-index: 10;
416
- }
417
- }
admin/admin.min.js CHANGED
@@ -1 +1 @@
1
- jQuery(function(a){a(".so-widget-toggle-active button").click(function(){var i=a(this),e=i.data("status"),s=i.closest(".so-widget");e?s.addClass("so-widget-is-active").removeClass("so-widget-is-inactive"):s.removeClass("so-widget-is-active").addClass("so-widget-is-inactive"),a.post(soWidgetsAdmin.toggleUrl,{widget:s.data("id"),active:e},function(i){})}),a(".so-widget-banner").each(function(){var i=a(this),e=i.find("img");if(e.length)128<e.width()&&e.css("margin-left",-(e.width()-128)/2);else{var s=Trianglify({width:128,height:128,variance:1,cell_size:32,seed:i.data("seed")});i.append(s.svg())}});var i=function(){var e=a(this).val().toLowerCase();""===e?a(".so-widget-wrap").show():a(".so-widget").each(function(){var i=a(this);-1<i.find("h3").html().toLowerCase().indexOf(e)?i.parent().show():i.parent().hide()})};a("#sow-widget-search input").on({keyup:i,search:i}),a(window).resize(function(){var i=a(".so-widget-text").css("height","auto"),e=0;i.each(function(){e=Math.max(e,a(this).height())}),i.each(function(){a(this).css("height",e)})}).resize(),a("#sow-widgets-page .page-nav a").click(function(i){i.preventDefault();var e=a(this),s=e.attr("href"),t=e.closest("li");switch(a("#sow-widgets-page .page-nav li").not(t).removeClass("active"),t.addClass("active"),s){case"#all":a(".so-widget-wrap").show();break;case"#enabled":a(".so-widget-wrap").hide(),a(".so-widget-wrap .so-widget-is-active").each(function(){a(this).closest(".so-widget-wrap").show()}),a(".so-widget-wrap .so-widget-is-inactive").each(function(){a(this).closest(".so-widget-wrap").hide()});break;case"#disabled":a(".so-widget-wrap .so-widget-is-active").each(function(){a(this).closest(".so-widget-wrap").hide()}),a(".so-widget-wrap .so-widget-is-inactive").each(function(){a(this).closest(".so-widget-wrap").show()})}a(window).resize()}),a("#widgets-list").addClass("so-animated");var s=a("#sow-settings-dialog");a("#widgets-list .so-widget-settings").click(function(i){var e=a(this);i.preventDefault(),s.find(".so-content").empty().addClass("so-loading").load(e.data("form-url"),function(){a(this).removeClass("so-loading")}),s.show()}),s.find(".so-close").click(function(i){i.preventDefault(),s.hide()}),s.find(".so-save").click(function(i){i.preventDefault();var e=a(this);e.prop("disabled",!0),a("#widgets-list .so-widget-settings").prop("disabled",!0),s.find("form").submit(function(){e.prop("disabled",!1),s.hide()}).submit()}),a("#so-widget-settings-save").load(function(){a("#widgets-list .so-widget-settings").prop("disabled",!1)})});
1
+ jQuery(function(a){a(".so-widget-toggle-active button").click(function(){var i=a(this),e=i.data("status"),s=i.closest(".so-widget");e?s.addClass("so-widget-is-active").removeClass("so-widget-is-inactive"):s.removeClass("so-widget-is-active").addClass("so-widget-is-inactive"),a.post(soWidgetsAdmin.toggleUrl,{widget:s.data("id"),active:e},function(i){})}),a(".so-widget-banner").each(function(){var i=a(this),e=i.find("img");if(e.length)128<e.width()&&e.css("margin-left",-(e.width()-128)/2);else{var s=Trianglify({width:128,height:128,variance:1,cell_size:32,seed:i.data("seed")});i.append(s.svg())}});function i(){var e=a(this).val().toLowerCase();""===e?a(".so-widget-wrap").show():a(".so-widget").each(function(){var i=a(this);-1<i.find("h3").html().toLowerCase().indexOf(e)?i.parent().show():i.parent().hide()})}a("#sow-widget-search input").on({keyup:i,search:i}),a(window).resize(function(){var i=a(".so-widget-text").css("height","auto"),e=0;i.each(function(){e=Math.max(e,a(this).height())}),i.each(function(){a(this).css("height",e)})}).resize(),a("#sow-widgets-page .page-nav a").click(function(i){i.preventDefault();var e=a(this),s=e.attr("href"),t=e.closest("li");switch(a("#sow-widgets-page .page-nav li").not(t).removeClass("active"),t.addClass("active"),s){case"#all":a(".so-widget-wrap").show();break;case"#enabled":a(".so-widget-wrap").hide(),a(".so-widget-wrap .so-widget-is-active").each(function(){a(this).closest(".so-widget-wrap").show()}),a(".so-widget-wrap .so-widget-is-inactive").each(function(){a(this).closest(".so-widget-wrap").hide()});break;case"#disabled":a(".so-widget-wrap .so-widget-is-active").each(function(){a(this).closest(".so-widget-wrap").hide()}),a(".so-widget-wrap .so-widget-is-inactive").each(function(){a(this).closest(".so-widget-wrap").show()})}a(window).resize()}),a("#widgets-list").addClass("so-animated");var s=a("#sow-settings-dialog");a("#widgets-list .so-widget-settings").click(function(i){var e=a(this);i.preventDefault(),s.find(".so-content").empty().addClass("so-loading").load(e.data("form-url"),function(){a(this).removeClass("so-loading")}),s.show()}),s.find(".so-close").click(function(i){i.preventDefault(),s.hide()}),s.find(".so-save").click(function(i){i.preventDefault();var e=a(this);e.prop("disabled",!0),a("#widgets-list .so-widget-settings").prop("disabled",!0),s.find("form").submit(function(){e.prop("disabled",!1),s.hide()}).submit()}),a("#so-widget-settings-save").load(function(){a("#widgets-list .so-widget-settings").prop("disabled",!1)})});
admin/tpl/admin.php CHANGED
@@ -1,137 +1,137 @@
1
- <div class="wrap" id="sow-widgets-page">
2
- <div class="page-banner">
3
-
4
- <span class="icon">
5
- <img src="<?php echo siteorigin_widgets_url( 'admin/images/icon-back.png' )?>" class="icon-back" width="50" height="43">
6
- <img src="<?php echo siteorigin_widgets_url( 'admin/images/icon-gear.png' ) ?>" class="icon-gear" width="26" height="26">
7
- <img src="<?php echo siteorigin_widgets_url( 'admin/images/icon-front.png' ) ?>" class="icon-front" width="50" height="43">
8
- </span>
9
- <h1><?php _e('SiteOrigin Widgets Bundle', 'so-widgets-bundle') ?></h1>
10
-
11
- <div id="sow-widget-search">
12
- <input type="search" placeholder="<?php esc_attr_e('Filter Widgets', 'so-widgets-bundle') ?>" />
13
- </div>
14
- </div>
15
-
16
- <ul class="page-nav">
17
- <li class="active"><a href="#all"><?php _e('All', 'so-widgets-bundle') ?></a></li>
18
- <li><a href="#enabled"><?php _e('Enabled', 'so-widgets-bundle') ?></a></li>
19
- <li><a href="#disabled"><?php _e('Disabled', 'so-widgets-bundle') ?></a></li>
20
- </ul>
21
-
22
-
23
- <div id="widgets-list">
24
-
25
- <?php
26
- foreach( $widgets as $file => $widget ):
27
- $file = wp_normalize_path( $file );
28
- ?>
29
- <div class="so-widget-wrap">
30
- <div class="so-widget so-widget-is-<?php echo $widget['Active'] ? 'active' : 'inactive' ?>" data-id="<?php echo esc_attr( $widget['ID'] ) ?>">
31
-
32
- <?php
33
- $banner = '';
34
- $widget_dir = dirname( $file );
35
- if( file_exists( $widget_dir . '/assets/banner.svg' ) ) {
36
- $banner = str_replace( wp_normalize_path( WP_CONTENT_DIR ), content_url(), $widget_dir ) . '/assets/banner.svg';
37
- }
38
- $banner = apply_filters('siteorigin_widgets_widget_banner', $banner, $widget);
39
- ?>
40
- <div class="so-widget-banner" data-seed="<?php echo esc_attr( substr( md5($widget['ID']), 0, 6 ) ) ?>">
41
- <?php if( !empty( $banner ) ) : ?>
42
- <img src="<?php echo esc_url($banner) ?>" />
43
- <?php endif; ?>
44
- </div>
45
-
46
- <div class="so-widget-text">
47
-
48
- <div class="so-widget-active-indicator"><?php _e('Active', 'so-widgets-bundle') ?></div>
49
-
50
- <h3><?php echo esc_html( $widget['Name'] ); ?></h3>
51
-
52
- <div class="so-widget-description">
53
- <?php echo esc_html( $widget['Description'] ) ?>
54
- </div>
55
-
56
- <?php if( !empty( $widget['Author'] ) ) : ?>
57
- <div class="so-widget-byline">
58
- By
59
- <strong>
60
- <?php
61
- if( !empty($widget['AuthorURI']) ) echo '<a href="' . esc_url( $widget['AuthorURI'] ) . '" target="_blank" rel="noopener noreferrer">';
62
- echo esc_html( $widget['Author'] );
63
- if( !empty($widget['AuthorURI']) ) echo '</a>';
64
- ?>
65
- </strong>
66
- </div>
67
- <?php endif; ?>
68
- <div class="so-action-links">
69
- <div class="so-widget-toggle-active">
70
- <button class="button-secondary so-widget-activate" data-status="1"><?php esc_html_e( 'Activate', 'so-widgets-bundle' ) ?></button>
71
- <button class="button-secondary so-widget-deactivate" data-status="0"><?php esc_html_e( 'Deactivate', 'so-widgets-bundle' ) ?></button>
72
- </div>
73
-
74
- <?php
75
- /** @var SiteOrigin_Widget $widget_object */
76
- $widget_object = !empty( $widget_objects[ $file ] ) ? $widget_objects[ $file ] : false;
77
- if( !empty( $widget_object ) && $widget_object->has_form( 'settings' ) ) {
78
- $rel_path = str_replace( wp_normalize_path( WP_CONTENT_DIR ), '', $file );
79
-
80
- $form_url = add_query_arg( array(
81
- 'id' => $rel_path,
82
- 'action' => 'so_widgets_setting_form',
83
- ),
84
- admin_url( 'admin-ajax.php' )
85
- );
86
- $form_url = wp_nonce_url( $form_url, 'display-widget-form' );
87
-
88
- ?>
89
- <button class="button-secondary so-widget-settings" data-form-url="<?php echo esc_url( $form_url ) ?>">
90
- <?php esc_html_e( 'Settings', 'so-widgets-bundle' ) ?>
91
- </button>
92
- <?php
93
- }
94
- ?>
95
-
96
- <?php if( ! empty( $widget['Documentation'] ) ) : ?>
97
- <a href="<?php echo esc_url( $widget['Documentation'] ) ?>" target="_blank" rel="noopener noreferrer" class="so-widget-documentation">
98
- <?php _e( 'Documentation', 'so-widgets-bundle' ) ?>
99
- </a>
100
- <?php endif; ?>
101
- </div>
102
- </div>
103
-
104
- </div>
105
- </div>
106
- <?php endforeach; ?>
107
-
108
- </div>
109
-
110
- <div class="developers-link">
111
- <?php _e('Developers - create your own widgets for the Widgets Bundle.', 'so-widgets-bundle') ?>
112
- <a href="https://siteorigin.com/docs/widgets-bundle/" target="_blank" rel="noopener noreferrer"><?php _e('Read More', 'so-widgets-bundle') ?></a>.
113
- </div>
114
-
115
- <div id="sow-settings-dialog">
116
- <div class="so-overlay"></div>
117
-
118
- <div class="so-title-bar">
119
- <h3 class="so-title"><?php _e( 'Widget Settings', 'so-widgets-bundle' ) ?></h3>
120
- <a class="so-close">
121
- <span class="so-dialog-icon"></span>
122
- </a>
123
- </div>
124
-
125
- <div class="so-content so-loading">
126
- </div>
127
-
128
- <div class="so-toolbar">
129
- <div class="so-buttons">
130
- <button class="button-primary so-save"><?php _e( 'Save', 'so-widgets-bundle' ) ?></button>
131
- </div>
132
- </div>
133
- </div>
134
-
135
- <iframe id="so-widget-settings-save" name="so-widget-settings-save"></iframe>
136
-
137
- </div>
1
+ <div class="wrap" id="sow-widgets-page">
2
+ <div class="page-banner">
3
+
4
+ <span class="icon">
5
+ <img src="<?php echo siteorigin_widgets_url( 'admin/images/icon-back.png' )?>" class="icon-back" width="50" height="43">
6
+ <img src="<?php echo siteorigin_widgets_url( 'admin/images/icon-gear.png' ) ?>" class="icon-gear" width="26" height="26">
7
+ <img src="<?php echo siteorigin_widgets_url( 'admin/images/icon-front.png' ) ?>" class="icon-front" width="50" height="43">
8
+ </span>
9
+ <h1><?php _e('SiteOrigin Widgets Bundle', 'so-widgets-bundle') ?></h1>
10
+
11
+ <div id="sow-widget-search">
12
+ <input type="search" placeholder="<?php esc_attr_e('Filter Widgets', 'so-widgets-bundle') ?>" />
13
+ </div>
14
+ </div>
15
+
16
+ <ul class="page-nav">
17
+ <li class="active"><a href="#all"><?php _e('All', 'so-widgets-bundle') ?></a></li>
18
+ <li><a href="#enabled"><?php _e('Enabled', 'so-widgets-bundle') ?></a></li>
19
+ <li><a href="#disabled"><?php _e('Disabled', 'so-widgets-bundle') ?></a></li>
20
+ </ul>
21
+
22
+
23
+ <div id="widgets-list">
24
+
25
+ <?php
26
+ foreach( $widgets as $file => $widget ):
27
+ $file = wp_normalize_path( $file );
28
+ ?>
29
+ <div class="so-widget-wrap">
30
+ <div class="so-widget so-widget-is-<?php echo $widget['Active'] ? 'active' : 'inactive' ?>" data-id="<?php echo esc_attr( $widget['ID'] ) ?>">
31
+
32
+ <?php
33
+ $banner = '';
34
+ $widget_dir = dirname( $file );
35
+ if( file_exists( $widget_dir . '/assets/banner.svg' ) ) {
36
+ $banner = str_replace( wp_normalize_path( WP_CONTENT_DIR ), content_url(), $widget_dir ) . '/assets/banner.svg';
37
+ }
38
+ $banner = apply_filters('siteorigin_widgets_widget_banner', $banner, $widget);
39
+ ?>
40
+ <div class="so-widget-banner" data-seed="<?php echo esc_attr( substr( md5($widget['ID']), 0, 6 ) ) ?>">
41
+ <?php if( !empty( $banner ) ) : ?>
42
+ <img src="<?php echo esc_url($banner) ?>" />
43
+ <?php endif; ?>
44
+ </div>
45
+
46
+ <div class="so-widget-text">
47
+
48
+ <div class="so-widget-active-indicator"><?php _e('Active', 'so-widgets-bundle') ?></div>
49
+
50
+ <h3><?php echo esc_html( $widget['Name'] ); ?></h3>
51
+
52
+ <div class="so-widget-description">
53
+ <?php echo esc_html( $widget['Description'] ) ?>
54
+ </div>
55
+
56
+ <?php if( !empty( $widget['Author'] ) ) : ?>
57
+ <div class="so-widget-byline">
58
+ By
59
+ <strong>
60
+ <?php
61
+ if( !empty($widget['AuthorURI']) ) echo '<a href="' . esc_url( $widget['AuthorURI'] ) . '" target="_blank" rel="noopener noreferrer">';
62
+ echo esc_html( $widget['Author'] );
63
+ if( !empty($widget['AuthorURI']) ) echo '</a>';
64
+ ?>
65
+ </strong>
66
+ </div>
67
+ <?php endif; ?>
68
+ <div class="so-action-links">
69
+ <div class="so-widget-toggle-active">
70
+ <button class="button-secondary so-widget-activate" data-status="1"><?php esc_html_e( 'Activate', 'so-widgets-bundle' ) ?></button>
71
+ <button class="button-secondary so-widget-deactivate" data-status="0"><?php esc_html_e( 'Deactivate', 'so-widgets-bundle' ) ?></button>
72
+ </div>
73
+
74
+ <?php
75
+ /** @var SiteOrigin_Widget $widget_object */
76
+ $widget_object = !empty( $widget_objects[ $file ] ) ? $widget_objects[ $file ] : false;
77
+ if( !empty( $widget_object ) && $widget_object->has_form( 'settings' ) ) {
78
+ $rel_path = str_replace( wp_normalize_path( WP_CONTENT_DIR ), '', $file );
79
+
80
+ $form_url = add_query_arg( array(
81
+ 'id' => $rel_path,
82
+ 'action' => 'so_widgets_setting_form',
83
+ ),
84
+ admin_url( 'admin-ajax.php' )
85
+ );
86
+ $form_url = wp_nonce_url( $form_url, 'display-widget-form' );
87
+
88
+ ?>
89
+ <button class="button-secondary so-widget-settings" data-form-url="<?php echo esc_url( $form_url ) ?>">
90
+ <?php esc_html_e( 'Settings', 'so-widgets-bundle' ) ?>
91
+ </button>
92
+ <?php
93
+ }
94
+ ?>
95
+
96
+ <?php if( ! empty( $widget['Documentation'] ) ) : ?>
97
+ <a href="<?php echo esc_url( $widget['Documentation'] ) ?>" target="_blank" rel="noopener noreferrer" class="so-widget-documentation">
98
+ <?php _e( 'Documentation', 'so-widgets-bundle' ) ?>
99
+ </a>
100
+ <?php endif; ?>
101
+ </div>
102
+ </div>
103
+
104
+ </div>
105
+ </div>
106
+ <?php endforeach; ?>
107
+
108
+ </div>
109
+
110
+ <div class="developers-link">
111
+ <?php _e('Developers - create your own widgets for the Widgets Bundle.', 'so-widgets-bundle') ?>
112
+ <a href="https://siteorigin.com/docs/widgets-bundle/" target="_blank" rel="noopener noreferrer"><?php _e('Read More', 'so-widgets-bundle') ?></a>.
113
+ </div>
114
+
115
+ <div id="sow-settings-dialog">
116
+ <div class="so-overlay"></div>
117
+
118
+ <div class="so-title-bar">
119
+ <h3 class="so-title"><?php _e( 'Widget Settings', 'so-widgets-bundle' ) ?></h3>
120
+ <a class="so-close">
121
+ <span class="so-dialog-icon"></span>
122
+ </a>
123
+ </div>
124
+
125
+ <div class="so-content so-loading">
126
+ </div>
127
+
128
+ <div class="so-toolbar">
129
+ <div class="so-buttons">
130
+ <button class="button-primary so-save"><?php _e( 'Save', 'so-widgets-bundle' ) ?></button>
131
+ </div>
132
+ </div>
133
+ </div>
134
+
135
+ <iframe id="so-widget-settings-save" name="so-widget-settings-save"></iframe>
136
+
137
+ </div>
admin/trianglify.min.js CHANGED
@@ -1 +1 @@
1
- !function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).Trianglify=e()}}(function(){return function a(o,i,s){function d(n,e){if(!i[n]){if(!o[n]){var r="function"==typeof require&&require;if(!e&&r)return r(n,!0);if(c)return c(n,!0);var t=new Error("Cannot find module '"+n+"'");throw t.code="MODULE_NOT_FOUND",t}var f=i[n]={exports:{}};o[n][0].call(f.exports,function(e){var r=o[n][1][e];return d(r||e)},f,f.exports,a,o,i,s)}return i[n].exports}for(var c="function"==typeof require&&require,e=0;e<s.length;e++)d(s[e]);return d}({"./lib/trianglify.js":[function(e,r,n){var j=e("delaunay-fast"),M=e("seedrandom"),N=e("chroma-js"),t=e("./colorbrewer"),D=e("./pattern"),U={width:600,height:400,cell_size:75,variance:.75,seed:null,x_colors:"random",y_colors:"match_x",palette:t,color_space:"lab",color_function:null,stroke_width:1.51};function f(i){if(i=function(e,r){var n={};for(var t in e)n[t]=e[t];for(t in r){if(!e.hasOwnProperty(t))throw new Error(t+" is not a configuration option for Trianglify. Check your spelling?");n[t]=r[t]}return n}(U,i),rand=M(i.seed),"random"===i.x_colors&&(i.x_colors=k()),"random"===i.y_colors&&(i.y_colors=k()),"match_x"===i.y_colors&&(i.y_colors=i.x_colors),!(0<i.width&&0<i.height))throw new Error("Width and height must be numbers greater than 0");if(i.cell_size<2)throw new Error("Cell size must be greater than 2.");var e;if(i.color_function)e=function(e,r){return N(i.color_function(e,r))};else{var n=N.scale(i.x_colors).mode(i.color_space),t=N.scale(i.y_colors).mode(i.color_space);e=function(e,r){return N.interpolate(n(e),t(r),.5,i.color_space)}}for(var r,f,a,o=i.width,s=i.height,d=Math.floor((o+4*i.cell_size)/i.cell_size),c=Math.floor((s+4*i.cell_size)/i.cell_size),u=(d*i.cell_size-o)/2,l=(c*i.cell_size-s)/2,b=i.cell_size*i.variance/2,h=function(e,r){for(var n=[],t=-u;t<e+u;t+=i.cell_size)for(var f=-l;f<r+l;f+=i.cell_size){var a=t+i.cell_size/2+_(rand(),[0,1],[-b,b]),o=f+i.cell_size/2+_(rand(),[0,1],[-b,b]);n.push([a,o].map(Math.floor))}return n}(o,s),g=j.triangulate(h),p=[],m=function(e){return h[e]},y=0;y<g.length;y+=3){var w=[g[y],g[y+1],g[y+2]].map(m),v={x:((a=w)[0][0]+a[1][0]+a[2][0])/3,y:(a[0][1]+a[1][1]+a[2][1])/3},x=e((f=v.x,_(f,[-u,o+u],[0,1])),(r=v.y,_(r,[-l,s+l],[0,1]))).hex();p.push([x,w])}return D(p,i);function _(e,r,n){return(e-r[0])*(n[1]-n[0])/(r[1]-r[0])+n[0]}function k(){if(i.palette instanceof Array)return i.palette[Math.floor(rand()*i.palette.length)];var e=Object.keys(i.palette);return i.palette[e[Math.floor(rand()*e.length)]]}}f.colorbrewer=t,f.defaults=U,r.exports=f},{"./colorbrewer":"/Users/gpriday/Downloads/trianglify-master 2/lib/colorbrewer.js","./pattern":"/Users/gpriday/Downloads/trianglify-master 2/lib/pattern.js","chroma-js":"/Users/gpriday/Downloads/trianglify-master 2/node_modules/chroma-js/chroma.js","delaunay-fast":"/Users/gpriday/Downloads/trianglify-master 2/node_modules/delaunay-fast/delaunay.js",seedrandom:"/Users/gpriday/Downloads/trianglify-master 2/node_modules/seedrandom/index.js"}],"/Users/gpriday/Downloads/trianglify-master 2/lib/colorbrewer.js":[function(e,r,n){r.exports={YlGn:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#006837","#004529"],YlGnBu:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#253494","#081d58"],GnBu:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"],BuGn:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#006d2c","#00441b"],PuBuGn:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016c59","#014636"],PuBu:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#045a8d","#023858"],BuPu:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#810f7c","#4d004b"],RdPu:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177","#49006a"],PuRd:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#980043","#67001f"],OrRd:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#b30000","#7f0000"],YlOrRd:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"],YlOrBr:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#993404","#662506"],Purples:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"],Blues:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#08519c","#08306b"],Greens:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#006d2c","#00441b"],Oranges:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#a63603","#7f2704"],Reds:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#a50f15","#67000d"],Greys:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525","#000000"],PuOr:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"],BrBG:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"],PRGn:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"],PiYG:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"],RdBu:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"],RdGy:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"],RdYlBu:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"],Spectral:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],RdYlGn:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"]}},{}],"/Users/gpriday/Downloads/trianglify-master 2/lib/pattern.js":[function(a,e,r){(function(n){var f="undefined"!=typeof document?document:a("jsdom").jsdom("<html/>");e.exports=function(r,t){function e(e){if(void 0!==n)try{a("canvas")}catch(e){throw Error("The optional node-canvas dependency is needed for Trianglify to render using canvas in node.")}return e||(e=f.createElement("canvas")),e.setAttribute("width",t.width),e.setAttribute("height",t.height),ctx=e.getContext("2d"),ctx.canvas.width=t.width,ctx.canvas.height=t.height,r.forEach(function(e){ctx.fillStyle=ctx.strokeStyle=e[0],ctx.lineWidth=t.stroke_width,ctx.beginPath(),ctx.moveTo.apply(ctx,e[1][0]),ctx.lineTo.apply(ctx,e[1][1]),ctx.lineTo.apply(ctx,e[1][2]),ctx.fill(),ctx.stroke()}),e}return{polys:r,opts:t,svg:function(){var n=f.createElementNS("http://www.w3.org/2000/svg","svg");return n.setAttribute("width",t.width),n.setAttribute("height",t.height),r.forEach(function(e){var r=f.createElementNS("http://www.w3.org/2000/svg","path");r.setAttribute("d","M"+e[1].join("L")+"Z"),r.setAttribute("fill",e[0]),r.setAttribute("stroke",e[0]),r.setAttribute("stroke-width",t.stroke_width),n.appendChild(r)}),n},canvas:e,png:function(){return e().toDataURL("image/png")}}}}).call(this,a("_process"))},{_process:"/Users/gpriday/Downloads/trianglify-master 2/node_modules/browserify/node_modules/process/browser.js",canvas:"/Users/gpriday/Downloads/trianglify-master 2/node_modules/browserify/node_modules/browser-resolve/empty.js",jsdom:"/Users/gpriday/Downloads/trianglify-master 2/node_modules/browserify/node_modules/browser-resolve/empty.js"}],"/Users/gpriday/Downloads/trianglify-master 2/node_modules/browserify/node_modules/browser-resolve/empty.js":[function(e,r,n){},{}],"/Users/gpriday/Downloads/trianglify-master 2/node_modules/browserify/node_modules/process/browser.js":[function(e,r,n){var t=r.exports={},f=[],a=!1;function o(){if(!a){var e;a=!0;for(var r=f.length;r;){e=f,f=[];for(var n=-1;++n<r;)e[n]();r=f.length}a=!1}}function i(){}t.nextTick=function(e){f.push(e),a||setTimeout(o,0)},t.title="browser",t.browser=!0,t.env={},t.argv=[],t.version="",t.versions={},t.on=i,t.addListener=i,t.once=i,t.off=i,t.removeListener=i,t.removeAllListeners=i,t.emit=i,t.binding=function(e){throw new Error("process.binding is not supported")},t.cwd=function(){return"/"},t.chdir=function(e){throw new Error("process.chdir is not supported")},t.umask=function(){return 0}},{}],"/Users/gpriday/Downloads/trianglify-master 2/node_modules/chroma-js/chroma.js":[function(e,A,P){(function(){var f,i,s,l,fe,g,d,t,m,y,w,v,c,x,u,b,_,h,r,a,e,n,o,k,j,M,p,ae,N,D,U;fe=function(e,r,n,t){return new f(e,r,n,t)},null!=A&&null!=A.exports&&(A.exports=fe),((null!=P?P:this).chroma=fe).color=function(e,r,n,t){return new f(e,r,n,t)},fe.hsl=function(e,r,n,t){return new f(e,r,n,t,"hsl")},fe.hsv=function(e,r,n,t){return new f(e,r,n,t,"hsv")},fe.rgb=function(e,r,n,t){return new f(e,r,n,t,"rgb")},fe.hex=function(e){return new f(e)},fe.css=function(e){return new f(e)},fe.lab=function(e,r,n){return new f(e,r,n,"lab")},fe.lch=function(e,r,n){return new f(e,r,n,"lch")},fe.hsi=function(e,r,n){return new f(e,r,n,"hsi")},fe.gl=function(e,r,n,t){return new f(255*e,255*r,255*n,t,"gl")},fe.mix=fe.interpolate=function(e,r,n,t){return null==e||null==r?"#000":("string"===ae(e)&&(e=new f(e)),"string"===ae(r)&&(r=new f(r)),e.interpolate(n,r,t))},fe.contrast=function(e,r){var n,t;return"string"===ae(e)&&(e=new f(e)),"string"===ae(r)&&(r=new f(r)),n=e.luminance(),(t=r.luminance())<n?(n+.05)/(t+.05):(t+.05)/(n+.05)},fe.luminance=function(e){return fe(e).luminance()},fe._Color=f,f=function(){function p(){var e,r,n,t,f,a,o,i,s,d,c,u,l,b,h;for(f=this,n=[],s=0,d=arguments.length;s<d;s++)null!=(r=arguments[s])&&n.push(r);if(0===n.length)a=(c=[255,0,255,1,"rgb"])[0],o=c[1],i=c[2],e=c[3],t=c[4];else if("array"===ae(n[0])){if(3===n[0].length)a=(u=n[0])[0],o=u[1],i=u[2],e=1;else{if(4!==n[0].length)throw"unknown input argument";a=(l=n[0])[0],o=l[1],i=l[2],e=l[3]}t=null!=(b=n[1])?b:"rgb"}else"string"===ae(n[0])?(a=n[0],t="hex"):"object"===ae(n[0])?(a=(h=n[0]._rgb)[0],o=h[1],i=h[2],e=h[3],t="rgb"):3<=n.length&&(a=n[0],o=n[1],i=n[2]);3===n.length?(t="rgb",e=1):4===n.length?"string"===ae(n[3])?(t=n[3],e=1):"number"===ae(n[3])&&(t="rgb",e=n[3]):5===n.length&&(e=n[3],t=n[4]),null==e&&(e=1),"rgb"===t?f._rgb=[a,o,i,e]:"gl"===t?f._rgb=[255*a,255*o,255*i,e]:"hsl"===t?(f._rgb=w(a,o,i),f._rgb[3]=e):"hsv"===t?(f._rgb=v(a,o,i),f._rgb[3]=e):"hex"===t?f._rgb=m(a):"lab"===t?(f._rgb=x(a,o,i),f._rgb[3]=e):"lch"===t?(f._rgb=_(a,o,i),f._rgb[3]=e):"hsi"===t&&(f._rgb=y(a,o,i),f._rgb[3]=e),g(f._rgb)}return p.prototype.rgb=function(){return this._rgb.slice(0,3)},p.prototype.rgba=function(){return this._rgb},p.prototype.hex=function(){return e(this._rgb)},p.prototype.toString=function(){return this.name()},p.prototype.hsl=function(){return o(this._rgb)},p.prototype.hsv=function(){return k(this._rgb)},p.prototype.lab=function(){return j(this._rgb)},p.prototype.lch=function(){return M(this._rgb)},p.prototype.hsi=function(){return n(this._rgb)},p.prototype.gl=function(){return[this._rgb[0]/255,this._rgb[1]/255,this._rgb[2]/255,this._rgb[3]]},p.prototype.luminance=function(f,a){var e,o,i;return null==a&&(a="rgb"),arguments.length?(0===f&&(this._rgb=[0,0,0,this._rgb[3]]),1===f&&(this._rgb=[255,255,255,this._rgb[3]]),e=r(this._rgb),1e-7,o=20,i=function(e,r){var n,t;return n=(t=e.interpolate(.5,r,a)).luminance(),Math.abs(f-n)<1e-7||!o--?t:f<n?i(e,t):i(t,r)},this._rgb=(f<e?i(new p("black"),this):i(this,new p("white"))).rgba(),this):r(this._rgb)},p.prototype.name=function(){var e,r;for(r in e=this.hex(),fe.colors)if(e===fe.colors[r])return r;return e},p.prototype.alpha=function(e){return arguments.length?(this._rgb[3]=e,this):this._rgb[3]},p.prototype.css=function(e){var r,n,t;return null==e&&(e="rgb"),n=this._rgb,3===e.length&&n[3]<1&&(e+="a"),"rgb"===e?e+"("+n.slice(0,3).map(Math.round).join(",")+")":"rgba"===e?e+"("+n.slice(0,3).map(Math.round).join(",")+","+n[3]+")":"hsl"===e||"hsla"===e?(t=function(e){return Math.round(100*e)/100},(r=this.hsl())[0]=t(r[0]),r[1]=t(100*r[1])+"%",r[2]=t(100*r[2])+"%",4===e.length&&(r[3]=n[3]),e+"("+r.join(",")+")"):void 0},p.prototype.interpolate=function(e,r,n){var t,f,a,o,i,s,d,c,u,l,b,h,g;if(d=this,null==n&&(n="rgb"),"string"===ae(r)&&(r=new p(r)),"hsl"===n||"hsv"===n||"lch"===n||"hsi"===n)"hsl"===n?(h=d.hsl(),g=r.hsl()):"hsv"===n?(h=d.hsv(),g=r.hsv()):"hsi"===n?(h=d.hsi(),g=r.hsi()):"lch"===n&&(h=d.lch(),g=r.lch()),"h"===n.substr(0,1)?(f=h[0],l=h[1],i=h[2],a=g[0],b=g[1],s=g[2]):(i=h[0],l=h[1],f=h[2],s=g[0],b=g[1],a=g[2]),isNaN(f)||isNaN(a)?isNaN(f)?isNaN(a)?t=Number.NaN:(t=a,1!==i&&0!==i||"hsv"===n||(u=b)):(t=f,1!==s&&0!==s||"hsv"===n||(u=l)):t=f+e*(f<a&&180<a-f?a-(f+360):a<f&&180<f-a?a+360-f:a-f),null==u&&(u=l+e*(b-l)),o=i+e*(s-i),c="h"===n.substr(0,1)?new p(t,u,o,n):new p(o,u,t,n);else if("rgb"===n)h=d._rgb,g=r._rgb,c=new p(h[0]+e*(g[0]-h[0]),h[1]+e*(g[1]-h[1]),h[2]+e*(g[2]-h[2]),n);else{if("lab"!==n)throw"color mode "+n+" is not supported";h=d.lab(),g=r.lab(),c=new p(h[0]+e*(g[0]-h[0]),h[1]+e*(g[1]-h[1]),h[2]+e*(g[2]-h[2]),n)}return c.alpha(d.alpha()+e*(r.alpha()-d.alpha())),c},p.prototype.premultiply=function(){var e,r;return r=this.rgb(),e=this.alpha(),fe(r[0]*e,r[1]*e,r[2]*e,e)},p.prototype.darken=function(e){var r;return null==e&&(e=20),(r=this.lch())[0]-=e,fe.lch(r).alpha(this.alpha())},p.prototype.darker=function(e){return this.darken(e)},p.prototype.brighten=function(e){return null==e&&(e=20),this.darken(-e)},p.prototype.brighter=function(e){return this.brighten(e)},p.prototype.saturate=function(e){var r;return null==e&&(e=20),(r=this.lch())[1]+=e,fe.lch(r).alpha(this.alpha())},p.prototype.desaturate=function(e){return null==e&&(e=20),this.saturate(-e)},p}(),g=function(e){var r;for(r in e)r<3?(e[r]<0&&(e[r]=0),255<e[r]&&(e[r]=255)):3===r&&(e[r]<0&&(e[r]=0),1<e[r]&&(e[r]=1));return e},t=function(e){var r,n,t,f,a,o,i,s;if(e=e.toLowerCase(),null!=fe.colors&&fe.colors[e])return m(fe.colors[e]);if(t=e.match(/rgb\(\s*(\-?\d+),\s*(\-?\d+)\s*,\s*(\-?\d+)\s*\)/)){for(f=t.slice(1,4),n=a=0;a<=2;n=++a)f[n]=+f[n];f[3]=1}else if(t=e.match(/rgba\(\s*(\-?\d+),\s*(\-?\d+)\s*,\s*(\-?\d+)\s*,\s*([01]|[01]?\.\d+)\)/))for(f=t.slice(1,5),n=o=0;o<=3;n=++o)f[n]=+f[n];else if(t=e.match(/rgb\(\s*(\-?\d+(?:\.\d+)?)%,\s*(\-?\d+(?:\.\d+)?)%\s*,\s*(\-?\d+(?:\.\d+)?)%\s*\)/)){for(f=t.slice(1,4),n=i=0;i<=2;n=++i)f[n]=Math.round(2.55*f[n]);f[3]=1}else if(t=e.match(/rgba\(\s*(\-?\d+(?:\.\d+)?)%,\s*(\-?\d+(?:\.\d+)?)%\s*,\s*(\-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)/)){for(f=t.slice(1,5),n=s=0;s<=2;n=++s)f[n]=Math.round(2.55*f[n]);f[3]=+f[3]}else(t=e.match(/hsl\(\s*(\-?\d+(?:\.\d+)?),\s*(\-?\d+(?:\.\d+)?)%\s*,\s*(\-?\d+(?:\.\d+)?)%\s*\)/))?((r=t.slice(1,4))[1]*=.01,r[2]*=.01,(f=w(r))[3]=1):(t=e.match(/hsla\(\s*(\-?\d+(?:\.\d+)?),\s*(\-?\d+(?:\.\d+)?)%\s*,\s*(\-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)/))&&((r=t.slice(1,4))[1]*=.01,r[2]*=.01,(f=w(r))[3]=+t[4]);return f},m=function(e){var r,n;if(e.match(/^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})#x2F;))return 4!==e.length&&7!==e.length||(e=e.substr(1)),3===e.length&&(e=(e=e.split(""))[0]+e[0]+e[1]+e[1]+e[2]+e[2]),[(n=parseInt(e,16))>>16,n>>8&255,255&n,1];if(e.match(/^#?([A-Fa-f0-9]{8})#x2F;))return 9===e.length&&(e=e.substr(1)),[(n=parseInt(e,16))>>24&255,n>>16&255,n>>8&255,255&n];if(r=t(e))return r;throw"unknown color: "+e},y=function(e,r,n){var t,f,a,o;return e=(o=N(arguments))[0],r=o[1],n=o[2],(e/=360)<1/3?f=1-((t=(1-r)/3)+(a=(1+r*d(s*e)/d(i-s*e))/3)):e<2/3?t=1-((a=(1-r)/3)+(f=(1+r*d(s*(e-=1/3))/d(i-s*e))/3)):a=1-((f=(1-r)/3)+(t=(1+r*d(s*(e-=2/3))/d(i-s*e))/3)),[255*(a=h(n*a*3)),255*(f=h(n*f*3)),255*(t=h(n*t*3))]},w=function(){var e,r,n,t,f,a,o,i,s,d,c,u,l,b;if(t=(l=N(arguments))[0],i=l[1],a=l[2],0===i)o=n=e=255*a;else{for(r=[0,0,0],s=2*a-(d=a<.5?a*(1+i):a+i-a*i),(c=[0,0,0])[0]=(t/=360)+1/3,c[1]=t,c[2]=t-1/3,f=u=0;u<=2;f=++u)c[f]<0&&(c[f]+=1),1<c[f]&&(c[f]-=1),6*c[f]<1?r[f]=s+6*(d-s)*c[f]:2*c[f]<1?r[f]=d:3*c[f]<2?r[f]=s+(d-s)*(2/3-c[f])*6:r[f]=s;o=(b=[Math.round(255*r[0]),Math.round(255*r[1]),Math.round(255*r[2])])[0],n=b[1],e=b[2]}return[o,n,e]},v=function(){var e,r,n,t,f,a,o,i,s,d,c,u,l,b,h,g,p,m;if(t=(u=N(arguments))[0],s=u[1],c=u[2],c*=255,0===s)i=n=e=c;else switch(360===t&&(t=0),360<t&&(t-=360),t<0&&(t+=360),a=c*(1-s),o=c*(1-s*(r=(t/=60)-(f=Math.floor(t)))),d=c*(1-s*(1-r)),f){case 0:i=(l=[c,d,a])[0],n=l[1],e=l[2];break;case 1:i=(b=[o,c,a])[0],n=b[1],e=b[2];break;case 2:i=(h=[a,c,d])[0],n=h[1],e=h[2];break;case 3:i=(g=[a,o,c])[0],n=g[1],e=g[2];break;case 4:i=(p=[d,a,c])[0],n=p[1],e=p[2];break;case 5:i=(m=[c,a,o])[0],n=m[1],e=m[2]}return[i=Math.round(i),n=Math.round(n),e=Math.round(e)]},c=function(){var e,r,n,t;return n=(t=N(arguments))[0],e=t[1],r=t[2],[n,Math.sqrt(e*e+r*r),Math.atan2(r,e)/Math.PI*180]},x=function(e,r,n){var t,f,a,o,i,s,d;return void 0!==e&&3===e.length&&(e=(s=e)[0],r=s[1],n=s[2]),void 0!==e&&3===e.length&&(e=(d=e)[0],r=d[1],n=d[2]),i=(o=(e+16)/116)-n/200,a=.95047*u(a=o+r/500),o=1*u(o),i=1.08883*u(i),f=U(3.2404542*a-1.5371385*o-.4985314*i),t=U(-.969266*a+1.8760108*o+.041556*i),n=U(.0556434*a-.2040259*o+1.0572252*i),[h(f,0,255),h(t,0,255),h(n,0,255),1]},u=function(e){return.206893034<e?e*e*e:(e-4/29)/7.787037},U=function(e){return Math.round(255*(e<=.00304?12.92*e:1.055*Math.pow(e,1/2.4)-.055))},b=function(){var e,r,n,t;return n=(t=N(arguments))[0],e=t[1],r=(r=t[2])*Math.PI/180,[n,Math.cos(r)*e,Math.sin(r)*e]},_=function(e,r,n){var t,f,a,o,i,s,d;return t=(s=b(e,r,n))[0],f=s[1],a=s[2],i=(d=x(t,f,a))[0],o=d[1],a=d[2],[h(i,0,255),h(o,0,255),h(a,0,255)]},r=function(e,r,n){var t;return e=(t=N(arguments))[0],r=t[1],n=t[2],.2126*(e=a(e))+.7152*(r=a(r))+.0722*(n=a(n))},a=function(e){return(e/=255)<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)},e=function(){var e,r;return"#"+(e="000000"+((r=N(arguments))[0]<<16|r[1]<<8|r[2]).toString(16)).substr(e.length-6)},n=function(){var e,r,n,t,f,a,o,i;return a=(i=N(arguments))[0],n=i[1],r=i[2],e=2*Math.PI,a/=255,n/=255,r/=255,0===(o=1-Math.min(a,n,r)/(f=(a+n+r)/3))?t=0:(t=(a-n+(a-r))/2,t/=Math.sqrt((a-n)*(a-n)+(a-r)*(n-r)),t=Math.acos(t),n<r&&(t=e-t),t/=e),[360*t,o,f]},o=function(e,r,n){var t,f,a,o,i,s;return void 0!==e&&3<=e.length&&(e=(s=e)[0],r=s[1],n=s[2]),e/=255,r/=255,n/=255,o=Math.min(e,r,n),f=((a=Math.max(e,r,n))+o)/2,a===o?(i=0,t=Number.NaN):i=f<.5?(a-o)/(a+o):(a-o)/(2-a-o),e===a?t=(r-n)/(a-o):r===a?t=2+(n-e)/(a-o):n===a&&(t=4+(e-r)/(a-o)),(t*=60)<0&&(t+=360),[t,i,f]},k=function(){var e,r,n,t,f,a,o,i,s,d;return o=(d=N(arguments))[0],n=d[1],e=d[2],a=Math.min(o,n,e),r=(f=Math.max(o,n,e))-a,s=f/255,0===f?(t=Number.NaN,i=0):(i=r/f,o===f&&(t=(n-e)/r),n===f&&(t=2+(e-o)/r),e===f&&(t=4+(o-n)/r),(t*=60)<0&&(t+=360)),[t,i,s]},j=function(){var e,r,n,t,f,a;return n=(a=N(arguments))[0],r=a[1],e=a[2],n=p(n),r=p(r),e=p(e),t=D((.4124564*n+.3575761*r+.1804375*e)/.95047),[116*(f=D((.2126729*n+.7151522*r+.072175*e)/1))-16,500*(t-f),200*(f-D((.0193339*n+.119192*r+.9503041*e)/1.08883))]},p=function(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)},D=function(e){return.008856<e?Math.pow(e,1/3):7.787037*e+4/29},M=function(){var e,r,n,t,f,a,o;return f=(a=N(arguments))[0],n=a[1],r=a[2],t=(o=j(f,n,r))[0],e=o[1],r=o[2],c(t,e,r)},fe.scale=function(i,e){var s,d,c,u,n,a,l,b,h,r,g,p,m,y,w,v,t,x,o;return y="rgb",w=fe("#ccc"),!1,g=[o=0,1],t=!(h=[]),x=[],r=!(p=1),v=m=0,b={},n=function(e,r){var n,t,f,a,o,i,s;if(null==e&&(e=["#ddd","#222"]),null!=e&&"string"===ae(e)&&null!=(null!=(o=fe.brewer)?o[e]:void 0)&&(e=fe.brewer[e]),"array"===ae(e)){for(n=f=0,i=(e=e.slice(0)).length-1;0<=i?f<=i:i<=f;n=0<=i?++f:--f)t=e[n],"string"===ae(t)&&(e[n]=fe(t));if(null!=r)x=r;else for(x=[],n=a=0,s=e.length-1;0<=s?a<=s:s<=a;n=0<=s?++a:--a)x.push(n/(e.length-1))}return u(),h=e},a=function(e){return null==e&&(e=[]),m=(g=e)[0],p=e[e.length-1],u(),v=2===e.length?0:e.length-1},d=function(e){var r,n;if(null==g)return 0;for(n=g.length-1,r=0;r<n&&e>=g[r];)r++;return r-1},l=function(e){return e},function(e){var r,n,t,f,a;return a=e,2<g.length&&(f=g.length-1,r=d(e),t=g[0]+(g[1]-g[0])*(0+.5*o),n=g[f-1]+(g[f]-g[f-1])*(1-.5*o),a=m+(g[r]+.5*(g[r+1]-g[r])-t)/(n-t)*(p-m)),a},c=function(e,r){var n,t,f,a,o,i,s;if(null==r&&(r=!1),isNaN(e))return w;if(o=r?e:2<g.length?d(e)/(v-1):(o=m!==p?(e-m)/(p-m):0,o=(e-m)/(p-m),Math.min(1,Math.max(0,o))),r||(o=l(o)),f=Math.floor(1e4*o),b[f])n=b[f];else{if("array"===ae(h))for(t=i=0,s=x.length-1;0<=s?i<=s:s<=i;t=0<=s?++i:--i){if(o<=(a=x[t])){n=h[t];break}if(a<=o&&t===x.length-1){n=h[t];break}if(a<o&&o<x[t+1]){o=(o-a)/(x[t+1]-a),n=fe.interpolate(h[t],h[t+1],o,y);break}}else"function"===ae(h)&&(n=h(o));b[f]=n}return n},u=function(){return b={}},n(i,e),(s=function(e){var r;return r=c(e),t&&r[t]?r[t]():r}).domain=function(e,r,n,t){var f;return null==n&&(n="e"),arguments.length?(null!=r&&(f=fe.analyze(e,t),e=0===r?[f.min,f.max]:fe.limits(f,n,r)),a(e),s):g},s.mode=function(e){return arguments.length?(y=e,u(),s):y},s.range=function(e,r){return n(e,r),s},s.out=function(e){return t=e,s},s.spread=function(e){return arguments.length?(o=e,s):o},s.correctLightness=function(e){return arguments.length?(r=e,u(),l=r?function(e){var r,n,t,f,a,o,i,s,d;for(r=c(0,!0).lab()[0],n=c(1,!0).lab()[0],i=n<r,t=c(e,!0).lab()[0],f=t-(a=r+(n-r)*e),s=0,d=1,o=20;.01<Math.abs(f)&&0<o--;)i&&(f*=-1),e+=f<0?.5*(d-(s=e)):.5*(s-(d=e)),t=c(e,!0).lab()[0],f=t-a;return e}:function(e){return e},s):r},s.colors=function(e){var r,n,t,f,a,o;if(null==e&&(e="hex"),i=[],n=[],2<g.length)for(r=t=1,o=g.length;1<=o?t<o:o<t;r=1<=o?++t:--t)n.push(.5*(g[r-1]+g[r]));else n=g;for(f=0,a=n.length;f<a;f++)r=n[f],i.push(s(r)[e]());return i},s},null==fe.scales&&(fe.scales={}),fe.scales.cool=function(){return fe.scale([fe.hsl(180,1,.9),fe.hsl(250,.7,.4)])},fe.scales.hot=function(){return fe.scale(["#000","#f00","#ff0","#fff"],[0,.25,.75,1]).mode("rgb")},fe.analyze=function(e,n,t){var f,r,a,o,i,s;if(a={min:Number.MAX_VALUE,max:-1*Number.MAX_VALUE,sum:0,values:[],count:0},null==t&&(t=function(){return!0}),f=function(e){null==e||isNaN(e)||(a.values.push(e),a.sum+=e,e<a.min&&(a.min=e),e>a.max&&(a.max=e),a.count+=1)},o=function(e,r){if(t(e,r))return null!=n&&"function"===ae(n)?f(n(e)):null!=n&&"string"===ae(n)||"number"===ae(n)?f(e[n]):f(e)},"array"===ae(e))for(i=0,s=e.length;i<s;i++)o(e[i]);else for(r in e)o(e[r],r);return a.domain=[a.min,a.max],a.limits=function(e,r){return fe.limits(a,e,r)},a},fe.limits=function(e,r,n){var t,f,a,o,i,s,d,c,u,l,b,h,g,p,m,y,w,v,x,_,k,j,M,N,D,U,A,P,z,G,E,B,I,q,R,S,O,C,T,Y,L,F,V,X,W,$,Z,H,J,K,Q,ee,re,ne,te;if(null==r&&(r="equal"),null==n&&(n=7),"array"===ae(e)&&(e=fe.analyze(e)),g=e.min,b=e.max,e.sum,D=e.values.sort(function(e,r){return e-r}),l=[],"c"===r.substr(0,1)&&(l.push(g),l.push(b)),"e"===r.substr(0,1)){for(l.push(g),d=U=1,S=n-1;1<=S?U<=S:S<=U;d=1<=S?++U:--U)l.push(g+d/n*(b-g));l.push(b)}else if("l"===r.substr(0,1)){if(g<=0)throw"Logarithmic scales are only possible for values > 0";for(p=Math.LOG10E*Math.log(g),h=Math.LOG10E*Math.log(b),l.push(g),d=A=1,V=n-1;1<=V?A<=V:V<=A;d=1<=V?++A:--A)l.push(Math.pow(10,p+d/n*(h-p)));l.push(b)}else if("q"===r.substr(0,1)){for(l.push(g),d=P=1,X=n-1;1<=X?P<=X:X<=P;d=1<=X?++P:--P)x=D.length*d/n,(_=Math.floor(x))===x?l.push(D[_]):(k=x-_,l.push(D[_]*k+D[_+1]*(1-k)));l.push(b)}else if("k"===r.substr(0,1)){for(y=D.length,t=new Array(y),i=new Array(n),j=!0,w=0,a=null,(a=[]).push(g),d=z=1,W=n-1;1<=W?z<=W:W<=z;d=1<=W?++z:--z)a.push(g+d/n*(b-g));for(a.push(b);j;){for(c=G=0,$=n-1;0<=$?G<=$:lt;=G;c=0<=$?++G:--G)i[c]=0;for(d=E=0,Z=y-1;0<=Z?E<=Z:Z<=E;d=0<=Z?++E:--E){for(N=D[d],m=Number.MAX_VALUE,c=B=0,H=n-1;0<=H?B<=H:H<=B;c=0<=H?++B:--B)(s=Math.abs(a[c]-N))<m&&(m=s,f=c);i[f]++,t[d]=f}for(v=new Array(n),c=I=0,J=n-1;0<=J?I<=J:J<=I;c=0<=J?++I:--I)v[c]=null;for(d=q=0,K=y-1;0<=K?q<=K:K<=q;d=0<=K?++q:--q)null===v[o=t[d]]?v[o]=D[d]:v[o]+=D[d];for(c=R=0,O=n-1;0<=O?R<=O:O<=R;c=0<=O?++R:--R)v[c]*=1/i[c];for(j=!1,c=Q=0,C=n-1;0<=C?Q<=C:C<=Q;c=0<=C?++Q:--Q)if(v[c]!==a[d]){j=!0;break}a=v,200<++w&&(j=!1)}for(u={},c=ee=0,T=n-1;0<=T?ee<=T:T<=ee;c=0<=T?++ee:--ee)u[c]=[];for(d=re=0,Y=y-1;0<=Y?re<=Y:Y<=re;d=0<=Y?++re:--re)u[o=t[d]].push(D[d]);for(M=[],c=ne=0,L=n-1;0<=L?ne<=L:L<=ne;c=0<=L?++ne:--ne)M.push(u[c][0]),M.push(u[c][u[c].length-1]);for(M=M.sort(function(e,r){return e-r}),l.push(M[0]),d=te=1,F=M.length-1;te<=F;d=te+=2)isNaN(M[d])||l.push(M[d])}return l},fe.brewer={OrRd:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#b30000","#7f0000"],PuBu:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#045a8d","#023858"],BuPu:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#810f7c","#4d004b"],Oranges:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#a63603","#7f2704"],BuGn:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#006d2c","#00441b"],YlOrBr:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#993404","#662506"],YlGn:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#006837","#004529"],Reds:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#a50f15","#67000d"],RdPu:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177","#49006a"],Greens:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#006d2c","#00441b"],YlGnBu:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#253494","#081d58"],Purples:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"],GnBu:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"],Greys:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525","#000000"],YlOrRd:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"],PuRd:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#980043","#67001f"],Blues:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#08519c","#08306b"],PuBuGn:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016c59","#014636"],Spectral:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],RdYlGn:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"],RdBu:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"],PiYG:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"],PRGn:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"],RdYlBu:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"],BrBG:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"],RdGy:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"],PuOr:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"],Set2:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494","#b3b3b3"],Accent:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17","#666666"],Set1:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf","#999999"],Set3:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5","#ffed6f"],Dark2:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d","#666666"],Paired:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99","#b15928"],Pastel2:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc","#cccccc"],Pastel1:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec","#f2f2f2"]},fe.colors={indigo:"#4b0082",gold:"#ffd700",hotpink:"#ff69b4",firebrick:"#b22222",indianred:"#cd5c5c",yellow:"#ffff00",mistyrose:"#ffe4e1",darkolivegreen:"#556b2f",olive:"#808000",darkseagreen:"#8fbc8f",pink:"#ffc0cb",tomato:"#ff6347",lightcoral:"#f08080",orangered:"#ff4500",navajowhite:"#ffdead",lime:"#00ff00",palegreen:"#98fb98",darkslategrey:"#2f4f4f",greenyellow:"#adff2f",burlywood:"#deb887",seashell:"#fff5ee",mediumspringgreen:"#00fa9a",fuchsia:"#ff00ff",papayawhip:"#ffefd5",blanchedalmond:"#ffebcd",chartreuse:"#7fff00",dimgray:"#696969",black:"#000000",peachpuff:"#ffdab9",springgreen:"#00ff7f",aquamarine:"#7fffd4",white:"#ffffff",orange:"#ffa500",lightsalmon:"#ffa07a",darkslategray:"#2f4f4f",brown:"#a52a2a",ivory:"#fffff0",dodgerblue:"#1e90ff",peru:"#cd853f",lawngreen:"#7cfc00",chocolate:"#d2691e",crimson:"#dc143c",forestgreen:"#228b22",darkgrey:"#a9a9a9",lightseagreen:"#20b2aa",cyan:"#00ffff",mintcream:"#f5fffa",silver:"#c0c0c0",antiquewhite:"#faebd7",mediumorchid:"#ba55d3",skyblue:"#87ceeb",gray:"#808080",darkturquoise:"#00ced1",goldenrod:"#daa520",darkgreen:"#006400",floralwhite:"#fffaf0",darkviolet:"#9400d3",darkgray:"#a9a9a9",moccasin:"#ffe4b5",saddlebrown:"#8b4513",grey:"#808080",darkslateblue:"#483d8b",lightskyblue:"#87cefa",lightpink:"#ffb6c1",mediumvioletred:"#c71585",slategrey:"#708090",red:"#ff0000",deeppink:"#ff1493",limegreen:"#32cd32",darkmagenta:"#8b008b",palegoldenrod:"#eee8aa",plum:"#dda0dd",turquoise:"#40e0d0",lightgrey:"#d3d3d3",lightgoldenrodyellow:"#fafad2",darkgoldenrod:"#b8860b",lavender:"#e6e6fa",maroon:"#800000",yellowgreen:"#9acd32",sandybrown:"#f4a460",thistle:"#d8bfd8",violet:"#ee82ee",navy:"#000080",magenta:"#ff00ff",dimgrey:"#696969",tan:"#d2b48c",rosybrown:"#bc8f8f",olivedrab:"#6b8e23",blue:"#0000ff",lightblue:"#add8e6",ghostwhite:"#f8f8ff",honeydew:"#f0fff0",cornflowerblue:"#6495ed",slateblue:"#6a5acd",linen:"#faf0e6",darkblue:"#00008b",powderblue:"#b0e0e6",seagreen:"#2e8b57",darkkhaki:"#bdb76b",snow:"#fffafa",sienna:"#a0522d",mediumblue:"#0000cd",royalblue:"#4169e1",lightcyan:"#e0ffff",green:"#008000",mediumpurple:"#9370db",midnightblue:"#191970",cornsilk:"#fff8dc",paleturquoise:"#afeeee",bisque:"#ffe4c4",slategray:"#708090",darkcyan:"#008b8b",khaki:"#f0e68c",wheat:"#f5deb3",teal:"#008080",darkorchid:"#9932cc",deepskyblue:"#00bfff",salmon:"#fa8072",darkred:"#8b0000",steelblue:"#4682b4",palevioletred:"#db7093",lightslategray:"#778899",aliceblue:"#f0f8ff",lightslategrey:"#778899",lightgreen:"#90ee90",orchid:"#da70d6",gainsboro:"#dcdcdc",mediumseagreen:"#3cb371",lightgray:"#d3d3d3",mediumturquoise:"#48d1cc",lemonchiffon:"#fffacd",cadetblue:"#5f9ea0",lightyellow:"#ffffe0",lavenderblush:"#fff0f5",coral:"#ff7f50",purple:"#800080",aqua:"#00ffff",whitesmoke:"#f5f5f5",mediumslateblue:"#7b68ee",darkorange:"#ff8c00",mediumaquamarine:"#66cdaa",darksalmon:"#e9967a",beige:"#f5f5dc",blueviolet:"#8a2be2",azure:"#f0ffff",lightsteelblue:"#b0c4de",oldlace:"#fdf5e6"},ae=function(){var n,e,r,t,f;for(n={},r=0,t=(f="Boolean Number String Function Array Date RegExp Undefined Null".split(" ")).length;r<t;r++)e=f[r],n["[object "+e+"]"]=e.toLowerCase();return function(e){var r;return r=Object.prototype.toString.call(e),n[r]||"object"}}(),h=function(e,r,n){return null==r&&(r=0),null==n&&(n=1),e<r&&(e=r),n<e&&(e=n),e},N=function(e){return 3<=e.length?e:e[0]},s=2*Math.PI,i=Math.PI/3,d=Math.cos,l=function(t){var e,r,n,f,a,o,i,s,d,c,u;return 2===(t=function(){var e,r,n;for(n=[],e=0,r=t.length;e<r;e++)f=t[e],n.push(fe(f));return n}()).length?(d=function(){var e,r,n;for(n=[],e=0,r=t.length;e<r;e++)f=t[e],n.push(f.lab());return n}(),a=d[0],o=d[1],e=function(n){var t,e;return e=function(){var e,r;for(r=[],t=e=0;e<=2;t=++e)r.push(a[t]+n*(o[t]-a[t]));return r}(),fe.lab.apply(fe,e)}):3===t.length?(c=function(){var e,r,n;for(n=[],e=0,r=t.length;e<r;e++)f=t[e],n.push(f.lab());return n}(),a=c[0],o=c[1],i=c[2],e=function(n){var t,e;return e=function(){var e,r;for(r=[],t=e=0;e<=2;t=++e)r.push((1-n)*(1-n)*a[t]+2*(1-n)*n*o[t]+n*n*i[t]);return r}(),fe.lab.apply(fe,e)}):4===t.length?(u=function(){var e,r,n;for(n=[],e=0,r=t.length;e<r;e++)f=t[e],n.push(f.lab());return n}(),a=u[0],o=u[1],i=u[2],s=u[3],e=function(n){var t,e;return e=function(){var e,r;for(r=[],t=e=0;e<=2;t=++e)r.push((1-n)*(1-n)*(1-n)*a[t]+3*(1-n)*(1-n)*n*o[t]+3*(1-n)*n*n*i[t]+n*n*n*s[t]);return r}(),fe.lab.apply(fe,e)}):5===t.length&&(r=l(t.slice(0,3)),n=l(t.slice(2,5)),e=function(e){return e<.5?r(2*e):n(2*(e-.5))}),e},fe.interpolate.bezier=l}).call(this)},{}],"/Users/gpriday/Downloads/trianglify-master 2/node_modules/delaunay-fast/delaunay.js":[function(e,r,n){var t;!function(){"use strict";var _=1/1048576;function g(e,r,n,t){var f,a,o,i,s,d,c,u,l,b,h=e[r][0],g=e[r][1],p=e[n][0],m=e[n][1],y=e[t][0],w=e[t][1],v=Math.abs(g-m),x=Math.abs(m-w);if(v<_&&x<_)throw new Error("Eek! Coincident points!");return a=v<_?(i=-(y-p)/(w-m))*((f=(p+h)/2)-(d=(p+y)/2))+(u=(m+w)/2):x<_?(o=-(p-h)/(m-g))*((f=(y+p)/2)-(s=(h+p)/2))+(c=(g+m)/2):(f=((o=-(p-h)/(m-g))*(s=(h+p)/2)-(i=-(y-p)/(w-m))*(d=(p+y)/2)+(u=(m+w)/2)-(c=(g+m)/2))/(o-i),x<v?o*(f-s)+c:i*(f-d)+u),{i:r,j:n,k:t,x:f,y:a,r:(l=p-f)*l+(b=m-a)*b}}function p(e){var r,n,t,f,a,o;for(n=e.length;n;)for(f=e[--n],t=e[--n],r=n;r;)if(o=e[--r],t===(a=e[--r])&&f===o||t===o&&f===a){e.splice(n,2),e.splice(r,2);break}}t={triangulate:function(n,e){var r,t,f,a,o,i,s,d,c,u,l,b,h=n.length;if(h<3)return[];if(n=n.slice(0),e)for(r=h;r--;)n[r]=n[r][e];for(f=new Array(h),r=h;r--;)f[r]=r;for(f.sort(function(e,r){return n[r][0]-n[e][0]}),a=function(e){var r,n,t,f,a,o,i=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY,d=Number.NEGATIVE_INFINITY,c=Number.NEGATIVE_INFINITY;for(r=e.length;r--;)e[r][0]<i&&(i=e[r][0]),e[r][0]>d&&(d=e[r][0]),e[r][1]<s&&(s=e[r][1]),e[r][1]>c&&(c=e[r][1]);return t=c-s,[[(a=i+.5*(n=d-i))-20*(f=Math.max(n,t)),(o=s+.5*t)-f],[a,o+20*f],[a+20*f,o-f]]}(n),n.push(a[0],a[1],a[2]),o=[g(n,h+0,h+1,h+2)],i=[],s=[],r=f.length;r--;s.length=0){for(b=f[r],t=o.length;t--;)0<(d=n[b][0]-o[t].x)&&d*d>o[t].r?(i.push(o[t]),o.splice(t,1)):d*d+(c=n[b][1]-o[t].y)*c-o[t].r>_||(s.push(o[t].i,o[t].j,o[t].j,o[t].k,o[t].k,o[t].i),o.splice(t,1));for(p(s),t=s.length;t;)l=s[--t],u=s[--t],o.push(g(n,u,l,b))}for(r=o.length;r--;)i.push(o[r]);for(o.length=0,r=i.length;r--;)i[r].i<h&&i[r].j<h&&i[r].k<h&&o.push(i[r].i,i[r].j,i[r].k);return o},contains:function(e,r){if(r[0]<e[0][0]&&r[0]<e[1][0]&&r[0]<e[2][0]||r[0]>e[0][0]&&r[0]>e[1][0]&&r[0]>e[2][0]||r[1]<e[0][1]&&r[1]<e[1][1]&&r[1]<e[2][1]||r[1]>e[0][1]&&r[1]>e[1][1]&&r[1]>e[2][1])return null;var n=e[1][0]-e[0][0],t=e[2][0]-e[0][0],f=e[1][1]-e[0][1],a=e[2][1]-e[0][1],o=n*a-t*f;if(0===o)return null;var i=(a*(r[0]-e[0][0])-t*(r[1]-e[0][1]))/o,s=(n*(r[1]-e[0][1])-f*(r[0]-e[0][0]))/o;return i<0||s<0||1<i+s?null:[i,s]}},void 0!==r&&(r.exports=t)}()},{}],"/Users/gpriday/Downloads/trianglify-master 2/node_modules/seedrandom/index.js":[function(e,r,n){var t=e("./lib/alea"),f=e("./lib/xor128"),a=e("./lib/xorwow"),o=e("./lib/xorshift7"),i=e("./lib/xor4096"),s=e("./lib/tychei"),d=e("./seedrandom");d.alea=t,d.xor128=f,d.xorwow=a,d.xorshift7=o,d.xor4096=i,d.tychei=s,r.exports=d},{"./lib/alea":"/Users/gpriday/Downloads/trianglify-master 2/node_modules/seedrandom/lib/alea.js","./lib/tychei":"/Users/gpriday/Downloads/trianglify-master 2/node_modules/seedrandom/lib/tychei.js","./lib/xor128":"/Users/gpriday/Downloads/trianglify-master 2/node_modules/seedrandom/lib/xor128.js","./lib/xor4096":"/Users/gpriday/Downloads/trianglify-master 2/node_modules/seedrandom/lib/xor4096.js","./lib/xorshift7":"/Users/gpriday/Downloads/trianglify-master 2/node_modules/seedrandom/lib/xorshift7.js","./lib/xorwow":"/Users/gpriday/Downloads/trianglify-master 2/node_modules/seedrandom/lib/xorwow.js","./seedrandom":"/Users/gpriday/Downloads/trianglify-master 2/node_modules/seedrandom/seedrandom.js"}],"/Users/gpriday/Downloads/trianglify-master 2/node_modules/seedrandom/lib/alea.js":[function(e,r,n){!function(e,r,n){function a(e){var t,r=this,n=(t=4022871197,function(e){e=e.toString();for(var r=0;r<e.length;r++){var n=.02519603282416938*(t+=e.charCodeAt(r));n-=t=n>>>0,t=(n*=t)>>>0,t+=4294967296*(n-=t)}return 2.3283064365386963e-10*(t>>>0)});r.next=function(){var e=2091639*r.s0+2.3283064365386963e-10*r.c;return r.s0=r.s1,r.s1=r.s2,r.s2=e-(r.c=0|e)},r.c=1,r.s0=n(" "),r.s1=n(" "),r.s2=n(" "),r.s0-=n(e),r.s0<0&&(r.s0+=1),r.s1-=n(e),r.s1<0&&(r.s1+=1),r.s2-=n(e),r.s2<0&&(r.s2+=1),n=null}function o(e,r){return r.c=e.c,r.s0=e.s0,r.s1=e.s1,r.s2=e.s2,r}function t(e,r){var n=new a(e),t=r&&r.state,f=n.next;return f.int32=function(){return 4294967296*n.next()|0},f.double=function(){return f()+11102230246251565e-32*(2097152*f()|0)},f.quick=f,t&&("object"==typeof t&&o(t,n),f.state=function(){return o(n,{})}),f}r&&r.exports?r.exports=t:n&&n.amd?n(function(){return t}):this.alea=t}(0,"object"==typeof r&&r,!1)},{}],"/Users/gpriday/Downloads/trianglify-master 2/node_modules/seedrandom/lib/tychei.js":[function(e,r,n){!function(e,r,n){function a(e){var f=this,r="";f.next=function(){var e=f.b,r=f.c,n=f.d,t=f.a;return e=e<<25^e>>>7^r,r=r-n|0,n=n<<24^n>>>8^t,t=t-e|0,f.b=e=e<<20^e>>>12^r,f.c=r=r-n|0,f.d=n<<16^r>>>16^t,f.a=t-e|0},f.a=0,f.b=0,f.c=-1640531527,f.d=1367130551,e===Math.floor(e)?(f.a=e/4294967296|0,f.b=0|e):r+=e;for(var n=0;n<r.length+20;n++)f.b^=0|r.charCodeAt(n),f.next()}function o(e,r){return r.a=e.a,r.b=e.b,r.c=e.c,r.d=e.d,r}function t(e,r){var n=new a(e),t=r&&r.state,f=function(){return(n.next()>>>0)/4294967296};return f.double=function(){do{var e=((n.next()>>>11)+(n.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},f.int32=n.next,f.quick=f,t&&("object"==typeof t&&o(t,n),f.state=function(){return o(n,{})}),f}r&&r.exports?r.exports=t:n&&n.amd?n(function(){return t}):this.tychei=t}(0,"object"==typeof r&&r,!1)},{}],"/Users/gpriday/Downloads/trianglify-master 2/node_modules/seedrandom/lib/xor128.js":[function(e,r,n){!function(e,r,n){function a(e){var r=this,n="";r.x=0,r.y=0,r.z=0,r.w=0,r.next=function(){var e=r.x^r.x<<11;return r.x=r.y,r.y=r.z,r.z=r.w,r.w^=r.w>>>19^e^e>>>8},e===(0|e)?r.x=e:n+=e;for(var t=0;t<n.length+64;t++)r.x^=0|n.charCodeAt(t),r.next()}function o(e,r){return r.x=e.x,r.y=e.y,r.z=e.z,r.w=e.w,r}function t(e,r){var n=new a(e),t=r&&r.state,f=function(){return(n.next()>>>0)/4294967296};return f.double=function(){do{var e=((n.next()>>>11)+(n.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},f.int32=n.next,f.quick=f,t&&("object"==typeof t&&o(t,n),f.state=function(){return o(n,{})}),f}r&&r.exports?r.exports=t:n&&n.amd?n(function(){return t}):this.xor128=t}(0,"object"==typeof r&&r,!1)},{}],"/Users/gpriday/Downloads/trianglify-master 2/node_modules/seedrandom/lib/xor4096.js":[function(e,r,n){!function(e,r,n){function a(e){var a=this;a.next=function(){var e,r,n=a.w,t=a.X,f=a.i;return a.w=n=n+1640531527|0,r=t[f+34&127],e=t[f=f+1&127],r^=r<<13,e^=e<<17,r^=r>>>15,e^=e>>>12,r=t[f]=r^e,a.i=f,r+(n^n>>>16)|0},function(e,r){var n,t,f,a,o,i=[],s=128;for(r===(0|r)?(t=r,r=null):(r+="\0",t=0,s=Math.max(s,r.length)),f=0,a=-32;a<s;++a)r&&(t^=r.charCodeAt((a+32)%r.length)),0===a&&(o=t),t^=t<<10,t^=t>>>15,t^=t<<4,t^=t>>>13,0<=a&&(o=o+1640531527|0,f=0==(n=i[127&a]^=t+o)?f+1:0);for(128<=f&&(i[127&(r&&r.length||0)]=-1),f=127,a=512;0<a;--a)t=i[f+34&127],n=i[f=f+1&127],t^=t<<13,n^=n<<17,t^=t>>>15,n^=n>>>12,i[f]=t^n;e.w=o,e.X=i,e.i=f}(a,e)}function o(e,r){return r.i=e.i,r.w=e.w,r.X=e.X.slice(),r}function t(e,r){null==e&&(e=+new Date);var n=new a(e),t=r&&r.state,f=function(){return(n.next()>>>0)/4294967296};return f.double=function(){do{var e=((n.next()>>>11)+(n.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},f.int32=n.next,f.quick=f,t&&(t.X&&o(t,n),f.state=function(){return o(n,{})}),f}r&&r.exports?r.exports=t:n&&n.amd?n(function(){return t}):this.xor4096=t}(0,"object"==typeof r&&r,!1)},{}],"/Users/gpriday/Downloads/trianglify-master 2/node_modules/seedrandom/lib/xorshift7.js":[function(e,r,n){!function(e,r,n){function a(e){var f=this;f.next=function(){var e,r,n=f.x,t=f.i;return e=n[t],r=(e^=e>>>7)^e<<24,r^=(e=n[t+1&7])^e>>>10,r^=(e=n[t+3&7])^e>>>3,r^=(e=n[t+4&7])^e<<7,e=n[t+7&7],r^=(e^=e<<13)^e<<9,n[t]=r,f.i=t+1&7,r},function(e,r){var n,t=[];if(r===(0|r))t[0]=r;else for(r=""+r,n=0;n<r.length;++n)t[7&n]=t[7&n]<<15^r.charCodeAt(n)+t[n+1&7]<<13;for(;t.length<8;)t.push(0);for(n=0;n<8&&0===t[n];++n);for(8==n?t[7]=-1:t[n],e.x=t,e.i=0,n=256;0<n;--n)e.next()}(f,e)}function o(e,r){return r.x=e.x.slice(),r.i=e.i,r}function t(e,r){null==e&&(e=+new Date);var n=new a(e),t=r&&r.state,f=function(){return(n.next()>>>0)/4294967296};return f.double=function(){do{var e=((n.next()>>>11)+(n.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},f.int32=n.next,f.quick=f,t&&(t.x&&o(t,n),f.state=function(){return o(n,{})}),f}r&&r.exports?r.exports=t:n&&n.amd?n(function(){return t}):this.xorshift7=t}(0,"object"==typeof r&&r,!1)},{}],"/Users/gpriday/Downloads/trianglify-master 2/node_modules/seedrandom/lib/xorwow.js":[function(e,r,n){!function(e,r,n){function a(e){var r=this,n="";r.next=function(){var e=r.x^r.x>>>2;return r.x=r.y,r.y=r.z,r.z=r.w,r.w=r.v,(r.d=r.d+362437|0)+(r.v=r.v^r.v<<4^e^e<<1)|0},r.x=0,r.y=0,r.z=0,r.w=0,e===((r.v=0)|e)?r.x=e:n+=e;for(var t=0;t<n.length+64;t++)r.x^=0|n.charCodeAt(t),t==n.length&&(r.d=r.x<<10^r.x>>>4),r.next()}function o(e,r){return r.x=e.x,r.y=e.y,r.z=e.z,r.w=e.w,r.v=e.v,r.d=e.d,r}function t(e,r){var n=new a(e),t=r&&r.state,f=function(){return(n.next()>>>0)/4294967296};return f.double=function(){do{var e=((n.next()>>>11)+(n.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},f.int32=n.next,f.quick=f,t&&("object"==typeof t&&o(t,n),f.state=function(){return o(n,{})}),f}r&&r.exports?r.exports=t:n&&n.amd?n(function(){return t}):this.xorwow=t}(0,"object"==typeof r&&r,!1)},{}],"/Users/gpriday/Downloads/trianglify-master 2/node_modules/seedrandom/seedrandom.js":[function(r,n,e){!function(i,s){var d,c=this,u=256,l=6,b="random",h=s.pow(u,l),g=s.pow(2,52),p=2*g,m=u-1;function e(e,r,n){var t=[],f=v(function e(r,n){var t,f=[],a=typeof r;if(n&&"object"==a)for(t in r)try{f.push(e(r[t],n-1))}catch(e){}return f.length?f:"string"==a?r:r+"\0"}((r=1==r?{entropy:!0}:r||{}).entropy?[e,x(i)]:null==e?function(){try{if(d)return x(d.randomBytes(u));var e=new Uint8Array(u);return(c.crypto||c.msCrypto).getRandomValues(e),x(e)}catch(e){var r=c.navigator,n=r&&r.plugins;return[+new Date,c,n,c.screen,x(i)]}}():e,3),t),a=new y(t),o=function(){for(var e=a.g(l),r=h,n=0;e<g;)e=(e+n)*u,r*=u,n=a.g(1);for(;p<=e;)e/=2,r/=2,n>>>=1;return(e+n)/r};return o.int32=function(){return 0|a.g(4)},o.quick=function(){return a.g(4)/4294967296},o.double=o,v(x(a.S),i),(r.pass||n||function(e,r,n,t){return t&&(t.S&&w(t,a),e.state=function(){return w(a,{})}),n?(s[b]=e,r):e})(o,f,"global"in r?r.global:this==s,r.state)}function y(e){var r,n=e.length,o=this,t=0,f=o.i=o.j=0,a=o.S=[];for(n||(e=[n++]);t<u;)a[t]=t++;for(t=0;t<u;t++)a[t]=a[f=m&f+e[t%n]+(r=a[t])],a[f]=r;(o.g=function(e){for(var r,n=0,t=o.i,f=o.j,a=o.S;e--;)r=a[t=m&t+1],n=n*u+a[m&(a[t]=a[f=m&f+r])+(a[f]=r)];return o.i=t,o.j=f,n})(u)}function w(e,r){return r.i=e.i,r.j=e.j,r.S=e.S.slice(),r}function v(e,r){for(var n,t=e+"",f=0;f<t.length;)r[m&f]=m&(n^=19*r[m&f])+t.charCodeAt(f++);return x(r)}function x(e){return String.fromCharCode.apply(0,e)}if(s["seed"+b]=e,v(s.random(),i),"object"==typeof n&&n.exports){n.exports=e;try{d=r("crypto")}catch(e){}}else 0}([],Math)},{crypto:!1}]},{},["./lib/trianglify.js"])("./lib/trianglify.js")});
1
+ !function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).Trianglify=e()}}(function(){return function a(o,i,s){function d(n,e){if(!i[n]){if(!o[n]){var r="function"==typeof require&&require;if(!e&&r)return r(n,!0);if(c)return c(n,!0);var t=new Error("Cannot find module '"+n+"'");throw t.code="MODULE_NOT_FOUND",t}var f=i[n]={exports:{}};o[n][0].call(f.exports,function(e){var r=o[n][1][e];return d(r||e)},f,f.exports,a,o,i,s)}return i[n].exports}for(var c="function"==typeof require&&require,e=0;e<s.length;e++)d(s[e]);return d}({"./lib/trianglify.js":[function(e,r,n){var _=e("delaunay-fast"),k=e("seedrandom"),j=e("chroma-js"),t=e("./colorbrewer"),M=e("./pattern"),N={width:600,height:400,cell_size:75,variance:.75,seed:null,x_colors:"random",y_colors:"match_x",palette:t,color_space:"lab",color_function:null,stroke_width:1.51};function f(i){if(i=function(e,r){var n={};for(var t in e)n[t]=e[t];for(t in r){if(!e.hasOwnProperty(t))throw new Error(t+" is not a configuration option for Trianglify. Check your spelling?");n[t]=r[t]}return n}(N,i),rand=k(i.seed),"random"===i.x_colors&&(i.x_colors=x()),"random"===i.y_colors&&(i.y_colors=x()),"match_x"===i.y_colors&&(i.y_colors=i.x_colors),!(0<i.width&&0<i.height))throw new Error("Width and height must be numbers greater than 0");if(i.cell_size<2)throw new Error("Cell size must be greater than 2.");var e;if(i.color_function)e=function(e,r){return j(i.color_function(e,r))};else{var n=j.scale(i.x_colors).mode(i.color_space),t=j.scale(i.y_colors).mode(i.color_space);e=function(e,r){return j.interpolate(n(e),t(r),.5,i.color_space)}}function r(e){return b[e]}for(var f,a=i.width,o=i.height,s=Math.floor((a+4*i.cell_size)/i.cell_size),d=Math.floor((o+4*i.cell_size)/i.cell_size),c=(s*i.cell_size-a)/2,u=(d*i.cell_size-o)/2,l=i.cell_size*i.variance/2,b=function(e,r){for(var n=[],t=-c;t<e+c;t+=i.cell_size)for(var f=-u;f<r+u;f+=i.cell_size){var a=t+i.cell_size/2+v(rand(),[0,1],[-l,l]),o=f+i.cell_size/2+v(rand(),[0,1],[-l,l]);n.push([a,o].map(Math.floor))}return n}(a,o),h=_.triangulate(b),g=[],p=0;p<h.length;p+=3){var m=[h[p],h[p+1],h[p+2]].map(r),y={x:((f=m)[0][0]+f[1][0]+f[2][0])/3,y:(f[0][1]+f[1][1]+f[2][1])/3},w=e(v(y.x,[-c,a+c],[0,1]),v(y.y,[-u,o+u],[0,1])).hex();g.push([w,m])}return M(g,i);function v(e,r,n){return(e-r[0])*(n[1]-n[0])/(r[1]-r[0])+n[0]}function x(){if(i.palette instanceof Array)return i.palette[Math.floor(rand()*i.palette.length)];var e=Object.keys(i.palette);return i.palette[e[Math.floor(rand()*e.length)]]}}f.colorbrewer=t,f.defaults=N,r.exports=f},{"./colorbrewer":"/Users/gpriday/Downloads/trianglify-master 2/lib/colorbrewer.js","./pattern":"/Users/gpriday/Downloads/trianglify-master 2/lib/pattern.js","chroma-js":"/Users/gpriday/Downloads/trianglify-master 2/node_modules/chroma-js/chroma.js","delaunay-fast":"/Users/gpriday/Downloads/trianglify-master 2/node_modules/delaunay-fast/delaunay.js",seedrandom:"/Users/gpriday/Downloads/trianglify-master 2/node_modules/seedrandom/index.js"}],"/Users/gpriday/Downloads/trianglify-master 2/lib/colorbrewer.js":[function(e,r,n){r.exports={YlGn:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#006837","#004529"],YlGnBu:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#253494","#081d58"],GnBu:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"],BuGn:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#006d2c","#00441b"],PuBuGn:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016c59","#014636"],PuBu:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#045a8d","#023858"],BuPu:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#810f7c","#4d004b"],RdPu:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177","#49006a"],PuRd:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#980043","#67001f"],OrRd:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#b30000","#7f0000"],YlOrRd:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"],YlOrBr:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#993404","#662506"],Purples:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"],Blues:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#08519c","#08306b"],Greens:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#006d2c","#00441b"],Oranges:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#a63603","#7f2704"],Reds:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#a50f15","#67000d"],Greys:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525","#000000"],PuOr:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"],BrBG:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"],PRGn:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"],PiYG:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"],RdBu:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"],RdGy:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"],RdYlBu:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"],Spectral:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],RdYlGn:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"]}},{}],"/Users/gpriday/Downloads/trianglify-master 2/lib/pattern.js":[function(a,e,r){(function(n){var f="undefined"!=typeof document?document:a("jsdom").jsdom("<html/>");e.exports=function(r,t){function e(e){if(void 0!==n)try{a("canvas")}catch(e){throw Error("The optional node-canvas dependency is needed for Trianglify to render using canvas in node.")}return(e=e||f.createElement("canvas")).setAttribute("width",t.width),e.setAttribute("height",t.height),ctx=e.getContext("2d"),ctx.canvas.width=t.width,ctx.canvas.height=t.height,r.forEach(function(e){ctx.fillStyle=ctx.strokeStyle=e[0],ctx.lineWidth=t.stroke_width,ctx.beginPath(),ctx.moveTo.apply(ctx,e[1][0]),ctx.lineTo.apply(ctx,e[1][1]),ctx.lineTo.apply(ctx,e[1][2]),ctx.fill(),ctx.stroke()}),e}return{polys:r,opts:t,svg:function(){var n=f.createElementNS("http://www.w3.org/2000/svg","svg");return n.setAttribute("width",t.width),n.setAttribute("height",t.height),r.forEach(function(e){var r=f.createElementNS("http://www.w3.org/2000/svg","path");r.setAttribute("d","M"+e[1].join("L")+"Z"),r.setAttribute("fill",e[0]),r.setAttribute("stroke",e[0]),r.setAttribute("stroke-width",t.stroke_width),n.appendChild(r)}),n},canvas:e,png:function(){return e().toDataURL("image/png")}}}}).call(this,a("_process"))},{_process:"/Users/gpriday/Downloads/trianglify-master 2/node_modules/browserify/node_modules/process/browser.js",canvas:"/Users/gpriday/Downloads/trianglify-master 2/node_modules/browserify/node_modules/browser-resolve/empty.js",jsdom:"/Users/gpriday/Downloads/trianglify-master 2/node_modules/browserify/node_modules/browser-resolve/empty.js"}],"/Users/gpriday/Downloads/trianglify-master 2/node_modules/browserify/node_modules/browser-resolve/empty.js":[function(e,r,n){},{}],"/Users/gpriday/Downloads/trianglify-master 2/node_modules/browserify/node_modules/process/browser.js":[function(e,r,n){var t=r.exports={},f=[],a=!1;function o(){if(!a){var e;a=!0;for(var r=f.length;r;){e=f,f=[];for(var n=-1;++n<r;)e[n]();r=f.length}a=!1}}function i(){}t.nextTick=function(e){f.push(e),a||setTimeout(o,0)},t.title="browser",t.browser=!0,t.env={},t.argv=[],t.version="",t.versions={},t.on=i,t.addListener=i,t.once=i,t.off=i,t.removeListener=i,t.removeAllListeners=i,t.emit=i,t.binding=function(e){throw new Error("process.binding is not supported")},t.cwd=function(){return"/"},t.chdir=function(e){throw new Error("process.chdir is not supported")},t.umask=function(){return 0}},{}],"/Users/gpriday/Downloads/trianglify-master 2/node_modules/chroma-js/chroma.js":[function(e,P,z){(function(){var f,i,s,l,fe,g,d,t,p,m,y,w,c,v,u,b,x,h,r,a,e,n,o,_,k,j,M,ae,N,D,U;function A(){var e,r,n,t,f,a,o,i,s,d,c,u,l,b,h;for(f=this,n=[],s=0,d=arguments.length;s<d;s++)null!=(r=arguments[s])&&n.push(r);if(0===n.length)a=(c=[255,0,255,1,"rgb"])[0],o=c[1],i=c[2],e=c[3],t=c[4];else if("array"===ae(n[0])){if(3===n[0].length)a=(u=n[0])[0],o=u[1],i=u[2],e=1;else{if(4!==n[0].length)throw"unknown input argument";a=(l=n[0])[0],o=l[1],i=l[2],e=l[3]}t=null!=(b=n[1])?b:"rgb"}else"string"===ae(n[0])?(a=n[0],t="hex"):"object"===ae(n[0])?(a=(h=n[0]._rgb)[0],o=h[1],i=h[2],e=h[3],t="rgb"):3<=n.length&&(a=n[0],o=n[1],i=n[2]);3===n.length?(t="rgb",e=1):4===n.length?"string"===ae(n[3])?(t=n[3],e=1):"number"===ae(n[3])&&(t="rgb",e=n[3]):5===n.length&&(e=n[3],t=n[4]),null==e&&(e=1),"rgb"===t?f._rgb=[a,o,i,e]:"gl"===t?f._rgb=[255*a,255*o,255*i,e]:"hsl"===t?(f._rgb=y(a,o,i),f._rgb[3]=e):"hsv"===t?(f._rgb=w(a,o,i),f._rgb[3]=e):"hex"===t?f._rgb=p(a):"lab"===t?(f._rgb=v(a,o,i),f._rgb[3]=e):"lch"===t?(f._rgb=x(a,o,i),f._rgb[3]=e):"hsi"===t&&(f._rgb=m(a,o,i),f._rgb[3]=e),g(f._rgb)}fe=function(e,r,n,t){return new f(e,r,n,t)},null!=P&&null!=P.exports&&(P.exports=fe),((null!=z?z:this).chroma=fe).color=function(e,r,n,t){return new f(e,r,n,t)},fe.hsl=function(e,r,n,t){return new f(e,r,n,t,"hsl")},fe.hsv=function(e,r,n,t){return new f(e,r,n,t,"hsv")},fe.rgb=function(e,r,n,t){return new f(e,r,n,t,"rgb")},fe.hex=function(e){return new f(e)},fe.css=function(e){return new f(e)},fe.lab=function(e,r,n){return new f(e,r,n,"lab")},fe.lch=function(e,r,n){return new f(e,r,n,"lch")},fe.hsi=function(e,r,n){return new f(e,r,n,"hsi")},fe.gl=function(e,r,n,t){return new f(255*e,255*r,255*n,t,"gl")},fe.mix=fe.interpolate=function(e,r,n,t){return null==e||null==r?"#000":("string"===ae(e)&&(e=new f(e)),"string"===ae(r)&&(r=new f(r)),e.interpolate(n,r,t))},fe.contrast=function(e,r){var n,t;return"string"===ae(e)&&(e=new f(e)),"string"===ae(r)&&(r=new f(r)),n=e.luminance(),(t=r.luminance())<n?(n+.05)/(t+.05):(t+.05)/(n+.05)},fe.luminance=function(e){return fe(e).luminance()},fe._Color=f,A.prototype.rgb=function(){return this._rgb.slice(0,3)},A.prototype.rgba=function(){return this._rgb},A.prototype.hex=function(){return e(this._rgb)},A.prototype.toString=function(){return this.name()},A.prototype.hsl=function(){return o(this._rgb)},A.prototype.hsv=function(){return _(this._rgb)},A.prototype.lab=function(){return k(this._rgb)},A.prototype.lch=function(){return j(this._rgb)},A.prototype.hsi=function(){return n(this._rgb)},A.prototype.gl=function(){return[this._rgb[0]/255,this._rgb[1]/255,this._rgb[2]/255,this._rgb[3]]},A.prototype.luminance=function(f,a){var e,o,i;return null==a&&(a="rgb"),arguments.length?(0===f&&(this._rgb=[0,0,0,this._rgb[3]]),1===f&&(this._rgb=[255,255,255,this._rgb[3]]),e=r(this._rgb),o=20,i=function(e,r){var n,t;return n=(t=e.interpolate(.5,r,a)).luminance(),Math.abs(f-n)<1e-7||!o--?t:f<n?i(e,t):i(t,r)},this._rgb=(f<e?i(new A("black"),this):i(this,new A("white"))).rgba(),this):r(this._rgb)},A.prototype.name=function(){var e,r;for(r in e=this.hex(),fe.colors)if(e===fe.colors[r])return r;return e},A.prototype.alpha=function(e){return arguments.length?(this._rgb[3]=e,this):this._rgb[3]},A.prototype.css=function(e){var r,n,t;return null==e&&(e="rgb"),n=this._rgb,3===e.length&&n[3]<1&&(e+="a"),"rgb"===e?e+"("+n.slice(0,3).map(Math.round).join(",")+")":"rgba"===e?e+"("+n.slice(0,3).map(Math.round).join(",")+","+n[3]+")":"hsl"===e||"hsla"===e?(t=function(e){return Math.round(100*e)/100},(r=this.hsl())[0]=t(r[0]),r[1]=t(100*r[1])+"%",r[2]=t(100*r[2])+"%",4===e.length&&(r[3]=n[3]),e+"("+r.join(",")+")"):void 0},A.prototype.interpolate=function(e,r,n){var t,f,a,o,i,s,d,c,u,l,b,h,g;if(d=this,null==n&&(n="rgb"),"string"===ae(r)&&(r=new A(r)),"hsl"===n||"hsv"===n||"lch"===n||"hsi"===n)"hsl"===n?(h=d.hsl(),g=r.hsl()):"hsv"===n?(h=d.hsv(),g=r.hsv()):"hsi"===n?(h=d.hsi(),g=r.hsi()):"lch"===n&&(h=d.lch(),g=r.lch()),"h"===n.substr(0,1)?(f=h[0],l=h[1],i=h[2],a=g[0],b=g[1],s=g[2]):(i=h[0],l=h[1],f=h[2],s=g[0],b=g[1],a=g[2]),isNaN(f)||isNaN(a)?isNaN(f)?isNaN(a)?t=Number.NaN:(t=a,1!==i&&0!==i||"hsv"===n||(u=b)):(t=f,1!==s&&0!==s||"hsv"===n||(u=l)):t=f+e*(f<a&&180<a-f?a-(f+360):a<f&&180<f-a?a+360-f:a-f),null==u&&(u=l+e*(b-l)),o=i+e*(s-i),c="h"===n.substr(0,1)?new A(t,u,o,n):new A(o,u,t,n);else if("rgb"===n)h=d._rgb,g=r._rgb,c=new A(h[0]+e*(g[0]-h[0]),h[1]+e*(g[1]-h[1]),h[2]+e*(g[2]-h[2]),n);else{if("lab"!==n)throw"color mode "+n+" is not supported";h=d.lab(),g=r.lab(),c=new A(h[0]+e*(g[0]-h[0]),h[1]+e*(g[1]-h[1]),h[2]+e*(g[2]-h[2]),n)}return c.alpha(d.alpha()+e*(r.alpha()-d.alpha())),c},A.prototype.premultiply=function(){var e,r;return r=this.rgb(),e=this.alpha(),fe(r[0]*e,r[1]*e,r[2]*e,e)},A.prototype.darken=function(e){var r;return null==e&&(e=20),(r=this.lch())[0]-=e,fe.lch(r).alpha(this.alpha())},A.prototype.darker=function(e){return this.darken(e)},A.prototype.brighten=function(e){return null==e&&(e=20),this.darken(-e)},A.prototype.brighter=function(e){return this.brighten(e)},A.prototype.saturate=function(e){var r;return null==e&&(e=20),(r=this.lch())[1]+=e,fe.lch(r).alpha(this.alpha())},A.prototype.desaturate=function(e){return null==e&&(e=20),this.saturate(-e)},f=A,g=function(e){var r;for(r in e)r<3?(e[r]<0&&(e[r]=0),255<e[r]&&(e[r]=255)):3===r&&(e[r]<0&&(e[r]=0),1<e[r]&&(e[r]=1));return e},t=function(e){var r,n,t,f,a,o,i,s;if(e=e.toLowerCase(),null!=fe.colors&&fe.colors[e])return p(fe.colors[e]);if(t=e.match(/rgb\(\s*(\-?\d+),\s*(\-?\d+)\s*,\s*(\-?\d+)\s*\)/)){for(f=t.slice(1,4),n=a=0;a<=2;n=++a)f[n]=+f[n];f[3]=1}else if(t=e.match(/rgba\(\s*(\-?\d+),\s*(\-?\d+)\s*,\s*(\-?\d+)\s*,\s*([01]|[01]?\.\d+)\)/))for(f=t.slice(1,5),n=o=0;o<=3;n=++o)f[n]=+f[n];else if(t=e.match(/rgb\(\s*(\-?\d+(?:\.\d+)?)%,\s*(\-?\d+(?:\.\d+)?)%\s*,\s*(\-?\d+(?:\.\d+)?)%\s*\)/)){for(f=t.slice(1,4),n=i=0;i<=2;n=++i)f[n]=Math.round(2.55*f[n]);f[3]=1}else if(t=e.match(/rgba\(\s*(\-?\d+(?:\.\d+)?)%,\s*(\-?\d+(?:\.\d+)?)%\s*,\s*(\-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)/)){for(f=t.slice(1,5),n=s=0;s<=2;n=++s)f[n]=Math.round(2.55*f[n]);f[3]=+f[3]}else(t=e.match(/hsl\(\s*(\-?\d+(?:\.\d+)?),\s*(\-?\d+(?:\.\d+)?)%\s*,\s*(\-?\d+(?:\.\d+)?)%\s*\)/))?((r=t.slice(1,4))[1]*=.01,r[2]*=.01,(f=y(r))[3]=1):(t=e.match(/hsla\(\s*(\-?\d+(?:\.\d+)?),\s*(\-?\d+(?:\.\d+)?)%\s*,\s*(\-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)/))&&((r=t.slice(1,4))[1]*=.01,r[2]*=.01,(f=y(r))[3]=+t[4]);return f},p=function(e){var r,n;if(e.match(/^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})#x2F;))return 4!==e.length&&7!==e.length||(e=e.substr(1)),3===e.length&&(e=(e=e.split(""))[0]+e[0]+e[1]+e[1]+e[2]+e[2]),[(n=parseInt(e,16))>>16,n>>8&255,255&n,1];if(e.match(/^#?([A-Fa-f0-9]{8})#x2F;))return 9===e.length&&(e=e.substr(1)),[(n=parseInt(e,16))>>24&255,n>>16&255,n>>8&255,255&n];if(r=t(e))return r;throw"unknown color: "+e},m=function(e,r,n){var t,f,a,o;return e=(o=N(arguments))[0],r=o[1],n=o[2],(e/=360)<1/3?f=1-((t=(1-r)/3)+(a=(1+r*d(s*e)/d(i-s*e))/3)):e<2/3?t=1-((a=(1-r)/3)+(f=(1+r*d(s*(e-=1/3))/d(i-s*e))/3)):a=1-((f=(1-r)/3)+(t=(1+r*d(s*(e-=2/3))/d(i-s*e))/3)),[255*(a=h(n*a*3)),255*(f=h(n*f*3)),255*(t=h(n*t*3))]},y=function(){var e,r,n,t,f,a,o,i,s,d,c,u,l,b;if(t=(l=N(arguments))[0],i=l[1],a=l[2],0===i)o=n=e=255*a;else{for(r=[0,0,0],s=2*a-(d=a<.5?a*(1+i):a+i-a*i),(c=[0,0,0])[0]=(t/=360)+1/3,c[1]=t,c[2]=t-1/3,f=u=0;u<=2;f=++u)c[f]<0&&(c[f]+=1),1<c[f]&&(c[f]-=1),6*c[f]<1?r[f]=s+6*(d-s)*c[f]:2*c[f]<1?r[f]=d:3*c[f]<2?r[f]=s+(d-s)*(2/3-c[f])*6:r[f]=s;o=(b=[Math.round(255*r[0]),Math.round(255*r[1]),Math.round(255*r[2])])[0],n=b[1],e=b[2]}return[o,n,e]},w=function(){var e,r,n,t,f,a,o,i,s,d,c,u,l,b,h,g,p,m;if(t=(u=N(arguments))[0],s=u[1],c=u[2],c*=255,0===s)i=n=e=c;else switch(360===t&&(t=0),360<t&&(t-=360),t<0&&(t+=360),a=c*(1-s),o=c*(1-s*(r=(t/=60)-(f=Math.floor(t)))),d=c*(1-s*(1-r)),f){case 0:i=(l=[c,d,a])[0],n=l[1],e=l[2];break;case 1:i=(b=[o,c,a])[0],n=b[1],e=b[2];break;case 2:i=(h=[a,c,d])[0],n=h[1],e=h[2];break;case 3:i=(g=[a,o,c])[0],n=g[1],e=g[2];break;case 4:i=(p=[d,a,c])[0],n=p[1],e=p[2];break;case 5:i=(m=[c,a,o])[0],n=m[1],e=m[2]}return[i=Math.round(i),n=Math.round(n),e=Math.round(e)]},c=function(){var e,r,n,t;return n=(t=N(arguments))[0],e=t[1],r=t[2],[n,Math.sqrt(e*e+r*r),Math.atan2(r,e)/Math.PI*180]},v=function(e,r,n){var t,f,a,o,i,s,d;return void 0!==e&&3===e.length&&(e=(s=e)[0],r=s[1],n=s[2]),void 0!==e&&3===e.length&&(e=(d=e)[0],r=d[1],n=d[2]),i=(o=(e+16)/116)-n/200,a=.95047*u(a=o+r/500),o=1*u(o),i=1.08883*u(i),f=U(3.2404542*a-1.5371385*o-.4985314*i),t=U(-.969266*a+1.8760108*o+.041556*i),n=U(.0556434*a-.2040259*o+1.0572252*i),[h(f,0,255),h(t,0,255),h(n,0,255),1]},u=function(e){return.206893034<e?e*e*e:(e-4/29)/7.787037},U=function(e){return Math.round(255*(e<=.00304?12.92*e:1.055*Math.pow(e,1/2.4)-.055))},b=function(){var e,r,n,t;return n=(t=N(arguments))[0],e=t[1],r=(r=t[2])*Math.PI/180,[n,Math.cos(r)*e,Math.sin(r)*e]},x=function(e,r,n){var t,f,a,o,i,s,d;return t=(s=b(e,r,n))[0],f=s[1],a=s[2],i=(d=v(t,f,a))[0],o=d[1],a=d[2],[h(i,0,255),h(o,0,255),h(a,0,255)]},r=function(e,r,n){var t;return e=(t=N(arguments))[0],r=t[1],n=t[2],.2126*(e=a(e))+.7152*(r=a(r))+.0722*(n=a(n))},a=function(e){return(e/=255)<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)},e=function(){var e,r;return"#"+(e="000000"+((r=N(arguments))[0]<<16|r[1]<<8|r[2]).toString(16)).substr(e.length-6)},n=function(){var e,r,n,t,f,a,o,i;return a=(i=N(arguments))[0],n=i[1],r=i[2],e=2*Math.PI,a/=255,n/=255,r/=255,0==(o=1-Math.min(a,n,r)/(f=(a+n+r)/3))?t=0:(t=(a-n+(a-r))/2,t/=Math.sqrt((a-n)*(a-n)+(a-r)*(n-r)),t=Math.acos(t),n<r&&(t=e-t),t/=e),[360*t,o,f]},o=function(e,r,n){var t,f,a,o,i,s;return void 0!==e&&3<=e.length&&(e=(s=e)[0],r=s[1],n=s[2]),e/=255,r/=255,n/=255,o=Math.min(e,r,n),f=((a=Math.max(e,r,n))+o)/2,a===o?(i=0,t=Number.NaN):i=f<.5?(a-o)/(a+o):(a-o)/(2-a-o),e===a?t=(r-n)/(a-o):r===a?t=2+(n-e)/(a-o):n===a&&(t=4+(e-r)/(a-o)),(t*=60)<0&&(t+=360),[t,i,f]},_=function(){var e,r,n,t,f,a,o,i,s,d;return o=(d=N(arguments))[0],n=d[1],e=d[2],a=Math.min(o,n,e),r=(f=Math.max(o,n,e))-a,s=f/255,0===f?(t=Number.NaN,i=0):(i=r/f,o===f&&(t=(n-e)/r),n===f&&(t=2+(e-o)/r),e===f&&(t=4+(o-n)/r),(t*=60)<0&&(t+=360)),[t,i,s]},k=function(){var e,r,n,t,f,a;return n=(a=N(arguments))[0],r=a[1],e=a[2],n=M(n),r=M(r),e=M(e),t=D((.4124564*n+.3575761*r+.1804375*e)/.95047),[116*(f=D((.2126729*n+.7151522*r+.072175*e)/1))-16,500*(t-f),200*(f-D((.0193339*n+.119192*r+.9503041*e)/1.08883))]},M=function(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)},D=function(e){return.008856<e?Math.pow(e,1/3):7.787037*e+4/29},j=function(){var e,r,n,t,f,a,o;return f=(a=N(arguments))[0],n=a[1],r=a[2],t=(o=k(f,n,r))[0],e=o[1],r=o[2],c(t,e,r)},fe.scale=function(i,e){var s,d,c,u,n,a,l,b,h,r,g,p,m,y,w,v,t,x,o;return y="rgb",w=fe("#ccc"),!1,g=[o=0,1],t=!(h=[]),x=[],r=!(p=1),v=m=0,b={},n=function(e,r){var n,t,f,a,o,i,s;if(null==e&&(e=["#ddd","#222"]),null!=e&&"string"===ae(e)&&null!=(null!=(o=fe.brewer)?o[e]:void 0)&&(e=fe.brewer[e]),"array"===ae(e)){for(n=f=0,i=(e=e.slice(0)).length-1;0<=i?f<=i:i<=f;n=0<=i?++f:--f)t=e[n],"string"===ae(t)&&(e[n]=fe(t));if(null!=r)x=r;else for(x=[],n=a=0,s=e.length-1;0<=s?a<=s:s<=a;n=0<=s?++a:--a)x.push(n/(e.length-1))}return u(),h=e},a=function(e){return null==e&&(e=[]),m=(g=e)[0],p=e[e.length-1],u(),v=2===e.length?0:e.length-1},d=function(e){var r,n;if(null==g)return 0;for(n=g.length-1,r=0;r<n&&e>=g[r];)r++;return r-1},l=function(e){return e},function(e){var r,n,t,f,a;return a=e,2<g.length&&(f=g.length-1,r=d(e),t=g[0]+(g[1]-g[0])*(0+.5*o),n=g[f-1]+(g[f]-g[f-1])*(1-.5*o),a=m+(g[r]+.5*(g[r+1]-g[r])-t)/(n-t)*(p-m)),a},c=function(e,r){var n,t,f,a,o,i,s;if(null==r&&(r=!1),isNaN(e))return w;if(o=r?e:2<g.length?d(e)/(v-1):(o=m!==p?(e-m)/(p-m):0,o=(e-m)/(p-m),Math.min(1,Math.max(0,o))),r||(o=l(o)),f=Math.floor(1e4*o),b[f])n=b[f];else{if("array"===ae(h))for(t=i=0,s=x.length-1;0<=s?i<=s:s<=i;t=0<=s?++i:--i){if(o<=(a=x[t])){n=h[t];break}if(a<=o&&t===x.length-1){n=h[t];break}if(a<o&&o<x[t+1]){o=(o-a)/(x[t+1]-a),n=fe.interpolate(h[t],h[t+1],o,y);break}}else"function"===ae(h)&&(n=h(o));b[f]=n}return n},u=function(){return b={}},n(i,e),(s=function(e){var r;return r=c(e),t&&r[t]?r[t]():r}).domain=function(e,r,n,t){var f;return null==n&&(n="e"),arguments.length?(null!=r&&(f=fe.analyze(e,t),e=0===r?[f.min,f.max]:fe.limits(f,n,r)),a(e),s):g},s.mode=function(e){return arguments.length?(y=e,u(),s):y},s.range=function(e,r){return n(e,r),s},s.out=function(e){return t=e,s},s.spread=function(e){return arguments.length?(o=e,s):o},s.correctLightness=function(e){return arguments.length?(r=e,u(),l=r?function(e){var r,n,t,f,a,o,i,s,d;for(r=c(0,!0).lab()[0],n=c(1,!0).lab()[0],i=n<r,t=c(e,!0).lab()[0],f=t-(a=r+(n-r)*e),s=0,d=1,o=20;.01<Math.abs(f)&&0<o--;)i&&(f*=-1),e+=f<0?.5*(d-(s=e)):.5*(s-(d=e)),t=c(e,!0).lab()[0],f=t-a;return e}:function(e){return e},s):r},s.colors=function(e){var r,n,t,f,a,o;if(null==e&&(e="hex"),i=[],n=[],2<g.length)for(r=t=1,o=g.length;1<=o?t<o:o<t;r=1<=o?++t:--t)n.push(.5*(g[r-1]+g[r]));else n=g;for(f=0,a=n.length;f<a;f++)r=n[f],i.push(s(r)[e]());return i},s},null==fe.scales&&(fe.scales={}),fe.scales.cool=function(){return fe.scale([fe.hsl(180,1,.9),fe.hsl(250,.7,.4)])},fe.scales.hot=function(){return fe.scale(["#000","#f00","#ff0","#fff"],[0,.25,.75,1]).mode("rgb")},fe.analyze=function(e,n,t){var f,r,a,o,i,s;if(a={min:Number.MAX_VALUE,max:-1*Number.MAX_VALUE,sum:0,values:[],count:0},null==t&&(t=function(){return!0}),f=function(e){null==e||isNaN(e)||(a.values.push(e),a.sum+=e,e<a.min&&(a.min=e),e>a.max&&(a.max=e),a.count+=1)},o=function(e,r){if(t(e,r))return null!=n&&"function"===ae(n)?f(n(e)):null!=n&&"string"===ae(n)||"number"===ae(n)?f(e[n]):f(e)},"array"===ae(e))for(i=0,s=e.length;i<s;i++)o(e[i]);else for(r in e)o(e[r],r);return a.domain=[a.min,a.max],a.limits=function(e,r){return fe.limits(a,e,r)},a},fe.limits=function(e,r,n){var t,f,a,o,i,s,d,c,u,l,b,h,g,p,m,y,w,v,x,_,k,j,M,N,D,U,A,P,z,G,E,B,I,q,R,S,O,C,T,Y,L,F,V,X,W,$,Z,H,J,K,Q,ee,re,ne,te;if(null==r&&(r="equal"),null==n&&(n=7),"array"===ae(e)&&(e=fe.analyze(e)),g=e.min,b=e.max,e.sum,D=e.values.sort(function(e,r){return e-r}),l=[],"c"===r.substr(0,1)&&(l.push(g),l.push(b)),"e"===r.substr(0,1)){for(l.push(g),d=U=1,S=n-1;1<=S?U<=S:S<=U;d=1<=S?++U:--U)l.push(g+d/n*(b-g));l.push(b)}else if("l"===r.substr(0,1)){if(g<=0)throw"Logarithmic scales are only possible for values > 0";for(p=Math.LOG10E*Math.log(g),h=Math.LOG10E*Math.log(b),l.push(g),d=A=1,V=n-1;1<=V?A<=V:V<=A;d=1<=V?++A:--A)l.push(Math.pow(10,p+d/n*(h-p)));l.push(b)}else if("q"===r.substr(0,1)){for(l.push(g),d=P=1,X=n-1;1<=X?P<=X:X<=P;d=1<=X?++P:--P)x=D.length*d/n,(_=Math.floor(x))===x?l.push(D[_]):(k=x-_,l.push(D[_]*k+D[_+1]*(1-k)));l.push(b)}else if("k"===r.substr(0,1)){for(y=D.length,t=new Array(y),i=new Array(n),j=!0,w=0,a=null,(a=[]).push(g),d=z=1,W=n-1;1<=W?z<=W:W<=z;d=1<=W?++z:--z)a.push(g+d/n*(b-g));for(a.push(b);j;){for(c=G=0,$=n-1;0<=$?G<=$:lt;=G;c=0<=$?++G:--G)i[c]=0;for(d=E=0,Z=y-1;0<=Z?E<=Z:Z<=E;d=0<=Z?++E:--E){for(N=D[d],m=Number.MAX_VALUE,c=B=0,H=n-1;0<=H?B<=H:H<=B;c=0<=H?++B:--B)(s=Math.abs(a[c]-N))<m&&(m=s,f=c);i[f]++,t[d]=f}for(v=new Array(n),c=I=0,J=n-1;0<=J?I<=J:J<=I;c=0<=J?++I:--I)v[c]=null;for(d=q=0,K=y-1;0<=K?q<=K:K<=q;d=0<=K?++q:--q)null===v[o=t[d]]?v[o]=D[d]:v[o]+=D[d];for(c=R=0,O=n-1;0<=O?R<=O:O<=R;c=0<=O?++R:--R)v[c]*=1/i[c];for(j=!1,c=Q=0,C=n-1;0<=C?Q<=C:C<=Q;c=0<=C?++Q:--Q)if(v[c]!==a[d]){j=!0;break}a=v,200<++w&&(j=!1)}for(u={},c=ee=0,T=n-1;0<=T?ee<=T:T<=ee;c=0<=T?++ee:--ee)u[c]=[];for(d=re=0,Y=y-1;0<=Y?re<=Y:Y<=re;d=0<=Y?++re:--re)u[o=t[d]].push(D[d]);for(M=[],c=ne=0,L=n-1;0<=L?ne<=L:L<=ne;c=0<=L?++ne:--ne)M.push(u[c][0]),M.push(u[c][u[c].length-1]);for(M=M.sort(function(e,r){return e-r}),l.push(M[0]),d=te=1,F=M.length-1;te<=F;d=te+=2)isNaN(M[d])||l.push(M[d])}return l},fe.brewer={OrRd:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#b30000","#7f0000"],PuBu:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#045a8d","#023858"],BuPu:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#810f7c","#4d004b"],Oranges:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#a63603","#7f2704"],BuGn:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#006d2c","#00441b"],YlOrBr:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#993404","#662506"],YlGn:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#006837","#004529"],Reds:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#a50f15","#67000d"],RdPu:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177","#49006a"],Greens:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#006d2c","#00441b"],YlGnBu:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#253494","#081d58"],Purples:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"],GnBu:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"],Greys:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525","#000000"],YlOrRd:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"],PuRd:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#980043","#67001f"],Blues:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#08519c","#08306b"],PuBuGn:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016c59","#014636"],Spectral:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],RdYlGn:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"],RdBu:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"],PiYG:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"],PRGn:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"],RdYlBu:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"],BrBG:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"],RdGy:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"],PuOr:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"],Set2:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494","#b3b3b3"],Accent:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17","#666666"],Set1:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf","#999999"],Set3:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5","#ffed6f"],Dark2:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d","#666666"],Paired:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99","#b15928"],Pastel2:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc","#cccccc"],Pastel1:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec","#f2f2f2"]},fe.colors={indigo:"#4b0082",gold:"#ffd700",hotpink:"#ff69b4",firebrick:"#b22222",indianred:"#cd5c5c",yellow:"#ffff00",mistyrose:"#ffe4e1",darkolivegreen:"#556b2f",olive:"#808000",darkseagreen:"#8fbc8f",pink:"#ffc0cb",tomato:"#ff6347",lightcoral:"#f08080",orangered:"#ff4500",navajowhite:"#ffdead",lime:"#00ff00",palegreen:"#98fb98",darkslategrey:"#2f4f4f",greenyellow:"#adff2f",burlywood:"#deb887",seashell:"#fff5ee",mediumspringgreen:"#00fa9a",fuchsia:"#ff00ff",papayawhip:"#ffefd5",blanchedalmond:"#ffebcd",chartreuse:"#7fff00",dimgray:"#696969",black:"#000000",peachpuff:"#ffdab9",springgreen:"#00ff7f",aquamarine:"#7fffd4",white:"#ffffff",orange:"#ffa500",lightsalmon:"#ffa07a",darkslategray:"#2f4f4f",brown:"#a52a2a",ivory:"#fffff0",dodgerblue:"#1e90ff",peru:"#cd853f",lawngreen:"#7cfc00",chocolate:"#d2691e",crimson:"#dc143c",forestgreen:"#228b22",darkgrey:"#a9a9a9",lightseagreen:"#20b2aa",cyan:"#00ffff",mintcream:"#f5fffa",silver:"#c0c0c0",antiquewhite:"#faebd7",mediumorchid:"#ba55d3",skyblue:"#87ceeb",gray:"#808080",darkturquoise:"#00ced1",goldenrod:"#daa520",darkgreen:"#006400",floralwhite:"#fffaf0",darkviolet:"#9400d3",darkgray:"#a9a9a9",moccasin:"#ffe4b5",saddlebrown:"#8b4513",grey:"#808080",darkslateblue:"#483d8b",lightskyblue:"#87cefa",lightpink:"#ffb6c1",mediumvioletred:"#c71585",slategrey:"#708090",red:"#ff0000",deeppink:"#ff1493",limegreen:"#32cd32",darkmagenta:"#8b008b",palegoldenrod:"#eee8aa",plum:"#dda0dd",turquoise:"#40e0d0",lightgrey:"#d3d3d3",lightgoldenrodyellow:"#fafad2",darkgoldenrod:"#b8860b",lavender:"#e6e6fa",maroon:"#800000",yellowgreen:"#9acd32",sandybrown:"#f4a460",thistle:"#d8bfd8",violet:"#ee82ee",navy:"#000080",magenta:"#ff00ff",dimgrey:"#696969",tan:"#d2b48c",rosybrown:"#bc8f8f",olivedrab:"#6b8e23",blue:"#0000ff",lightblue:"#add8e6",ghostwhite:"#f8f8ff",honeydew:"#f0fff0",cornflowerblue:"#6495ed",slateblue:"#6a5acd",linen:"#faf0e6",darkblue:"#00008b",powderblue:"#b0e0e6",seagreen:"#2e8b57",darkkhaki:"#bdb76b",snow:"#fffafa",sienna:"#a0522d",mediumblue:"#0000cd",royalblue:"#4169e1",lightcyan:"#e0ffff",green:"#008000",mediumpurple:"#9370db",midnightblue:"#191970",cornsilk:"#fff8dc",paleturquoise:"#afeeee",bisque:"#ffe4c4",slategray:"#708090",darkcyan:"#008b8b",khaki:"#f0e68c",wheat:"#f5deb3",teal:"#008080",darkorchid:"#9932cc",deepskyblue:"#00bfff",salmon:"#fa8072",darkred:"#8b0000",steelblue:"#4682b4",palevioletred:"#db7093",lightslategray:"#778899",aliceblue:"#f0f8ff",lightslategrey:"#778899",lightgreen:"#90ee90",orchid:"#da70d6",gainsboro:"#dcdcdc",mediumseagreen:"#3cb371",lightgray:"#d3d3d3",mediumturquoise:"#48d1cc",lemonchiffon:"#fffacd",cadetblue:"#5f9ea0",lightyellow:"#ffffe0",lavenderblush:"#fff0f5",coral:"#ff7f50",purple:"#800080",aqua:"#00ffff",whitesmoke:"#f5f5f5",mediumslateblue:"#7b68ee",darkorange:"#ff8c00",mediumaquamarine:"#66cdaa",darksalmon:"#e9967a",beige:"#f5f5dc",blueviolet:"#8a2be2",azure:"#f0ffff",lightsteelblue:"#b0c4de",oldlace:"#fdf5e6"},ae=function(){var n,e,r,t,f;for(n={},r=0,t=(f="Boolean Number String Function Array Date RegExp Undefined Null".split(" ")).length;r<t;r++)e=f[r],n["[object "+e+"]"]=e.toLowerCase();return function(e){var r;return r=Object.prototype.toString.call(e),n[r]||"object"}}(),h=function(e,r,n){return null==r&&(r=0),null==n&&(n=1),e<r&&(e=r),n<e&&(e=n),e},N=function(e){return 3<=e.length?e:e[0]},s=2*Math.PI,i=Math.PI/3,d=Math.cos,l=function(t){var e,r,n,f,a,o,i,s,d,c,u;return 2===(t=function(){var e,r,n;for(n=[],e=0,r=t.length;e<r;e++)f=t[e],n.push(fe(f));return n}()).length?(d=function(){var e,r,n;for(n=[],e=0,r=t.length;e<r;e++)f=t[e],n.push(f.lab());return n}(),a=d[0],o=d[1],e=function(n){var t,e;return e=function(){var e,r;for(r=[],t=e=0;e<=2;t=++e)r.push(a[t]+n*(o[t]-a[t]));return r}(),fe.lab.apply(fe,e)}):3===t.length?(c=function(){var e,r,n;for(n=[],e=0,r=t.length;e<r;e++)f=t[e],n.push(f.lab());return n}(),a=c[0],o=c[1],i=c[2],e=function(n){var t,e;return e=function(){var e,r;for(r=[],t=e=0;e<=2;t=++e)r.push((1-n)*(1-n)*a[t]+2*(1-n)*n*o[t]+n*n*i[t]);return r}(),fe.lab.apply(fe,e)}):4===t.length?(u=function(){var e,r,n;for(n=[],e=0,r=t.length;e<r;e++)f=t[e],n.push(f.lab());return n}(),a=u[0],o=u[1],i=u[2],s=u[3],e=function(n){var t,e;return e=function(){var e,r;for(r=[],t=e=0;e<=2;t=++e)r.push((1-n)*(1-n)*(1-n)*a[t]+3*(1-n)*(1-n)*n*o[t]+3*(1-n)*n*n*i[t]+n*n*n*s[t]);return r}(),fe.lab.apply(fe,e)}):5===t.length&&(r=l(t.slice(0,3)),n=l(t.slice(2,5)),e=function(e){return e<.5?r(2*e):n(2*(e-.5))}),e},fe.interpolate.bezier=l}).call(this)},{}],"/Users/gpriday/Downloads/trianglify-master 2/node_modules/delaunay-fast/delaunay.js":[function(e,r,n){var t;!function(){"use strict";var _=1/1048576;function g(e,r,n,t){var f,a,o,i,s,d,c,u,l,b,h=e[r][0],g=e[r][1],p=e[n][0],m=e[n][1],y=e[t][0],w=e[t][1],v=Math.abs(g-m),x=Math.abs(m-w);if(v<_&&x<_)throw new Error("Eek! Coincident points!");return a=v<_?(i=-(y-p)/(w-m))*((f=(p+h)/2)-(d=(p+y)/2))+(u=(m+w)/2):x<_?(o=-(p-h)/(m-g))*((f=(y+p)/2)-(s=(h+p)/2))+(c=(g+m)/2):(f=((o=-(p-h)/(m-g))*(s=(h+p)/2)-(i=-(y-p)/(w-m))*(d=(p+y)/2)+(u=(m+w)/2)-(c=(g+m)/2))/(o-i),x<v?o*(f-s)+c:i*(f-d)+u),{i:r,j:n,k:t,x:f,y:a,r:(l=p-f)*l+(b=m-a)*b}}function p(e){var r,n,t,f,a,o;for(n=e.length;n;)for(f=e[--n],t=e[--n],r=n;r;)if(o=e[--r],t===(a=e[--r])&&f===o||t===o&&f===a){e.splice(n,2),e.splice(r,2);break}}t={triangulate:function(n,e){var r,t,f,a,o,i,s,d,c,u,l,b,h=n.length;if(h<3)return[];if(n=n.slice(0),e)for(r=h;r--;)n[r]=n[r][e];for(f=new Array(h),r=h;r--;)f[r]=r;for(f.sort(function(e,r){return n[r][0]-n[e][0]}),a=function(e){var r,n,t,f,a,o,i=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY,d=Number.NEGATIVE_INFINITY,c=Number.NEGATIVE_INFINITY;for(r=e.length;r--;)e[r][0]<i&&(i=e[r][0]),e[r][0]>d&&(d=e[r][0]),e[r][1]<s&&(s=e[r][1]),e[r][1]>c&&(c=e[r][1]);return t=c-s,[[(a=i+.5*(n=d-i))-20*(f=Math.max(n,t)),(o=s+.5*t)-f],[a,o+20*f],[a+20*f,o-f]]}(n),n.push(a[0],a[1],a[2]),o=[g(n,h+0,h+1,h+2)],i=[],s=[],r=f.length;r--;s.length=0){for(b=f[r],t=o.length;t--;)0<(d=n[b][0]-o[t].x)&&d*d>o[t].r?(i.push(o[t]),o.splice(t,1)):d*d+(c=n[b][1]-o[t].y)*c-o[t].r>_||(s.push(o[t].i,o[t].j,o[t].j,o[t].k,o[t].k,o[t].i),o.splice(t,1));for(p(s),t=s.length;t;)l=s[--t],u=s[--t],o.push(g(n,u,l,b))}for(r=o.length;r--;)i.push(o[r]);for(o.length=0,r=i.length;r--;)i[r].i<h&&i[r].j<h&&i[r].k<h&&o.push(i[r].i,i[r].j,i[r].k);return o},contains:function(e,r){if(r[0]<e[0][0]&&r[0]<e[1][0]&&r[0]<e[2][0]||r[0]>e[0][0]&&r[0]>e[1][0]&&r[0]>e[2][0]||r[1]<e[0][1]&&r[1]<e[1][1]&&r[1]<e[2][1]||r[1]>e[0][1]&&r[1]>e[1][1]&&r[1]>e[2][1])return null;var n=e[1][0]-e[0][0],t=e[2][0]-e[0][0],f=e[1][1]-e[0][1],a=e[2][1]-e[0][1],o=n*a-t*f;if(0==o)return null;var i=(a*(r[0]-e[0][0])-t*(r[1]-e[0][1]))/o,s=(n*(r[1]-e[0][1])-f*(r[0]-e[0][0]))/o;return i<0||s<0||1<i+s?null:[i,s]}},void 0!==r&&(r.exports=t)}()},{}],"/Users/gpriday/Downloads/trianglify-master 2/node_modules/seedrandom/index.js":[function(e,r,n){var t=e("./lib/alea"),f=e("./lib/xor128"),a=e("./lib/xorwow"),o=e("./lib/xorshift7"),i=e("./lib/xor4096"),s=e("./lib/tychei"),d=e("./seedrandom");d.alea=t,d.xor128=f,d.xorwow=a,d.xorshift7=o,d.xor4096=i,d.tychei=s,r.exports=d},{"./lib/alea":"/Users/gpriday/Downloads/trianglify-master 2/node_modules/seedrandom/lib/alea.js","./lib/tychei":"/Users/gpriday/Downloads/trianglify-master 2/node_modules/seedrandom/lib/tychei.js","./lib/xor128":"/Users/gpriday/Downloads/trianglify-master 2/node_modules/seedrandom/lib/xor128.js","./lib/xor4096":"/Users/gpriday/Downloads/trianglify-master 2/node_modules/seedrandom/lib/xor4096.js","./lib/xorshift7":"/Users/gpriday/Downloads/trianglify-master 2/node_modules/seedrandom/lib/xorshift7.js","./lib/xorwow":"/Users/gpriday/Downloads/trianglify-master 2/node_modules/seedrandom/lib/xorwow.js","./seedrandom":"/Users/gpriday/Downloads/trianglify-master 2/node_modules/seedrandom/seedrandom.js"}],"/Users/gpriday/Downloads/trianglify-master 2/node_modules/seedrandom/lib/alea.js":[function(e,r,n){!function(e,r,n){function a(e){var r=this,n=function(){var t=4022871197;return function(e){e=e.toString();for(var r=0;r<e.length;r++){var n=.02519603282416938*(t+=e.charCodeAt(r));n-=t=n>>>0,t=(n*=t)>>>0,t+=4294967296*(n-=t)}return 2.3283064365386963e-10*(t>>>0)}}();r.next=function(){var e=2091639*r.s0+2.3283064365386963e-10*r.c;return r.s0=r.s1,r.s1=r.s2,r.s2=e-(r.c=0|e)},r.c=1,r.s0=n(" "),r.s1=n(" "),r.s2=n(" "),r.s0-=n(e),r.s0<0&&(r.s0+=1),r.s1-=n(e),r.s1<0&&(r.s1+=1),r.s2-=n(e),r.s2<0&&(r.s2+=1),n=null}function o(e,r){return r.c=e.c,r.s0=e.s0,r.s1=e.s1,r.s2=e.s2,r}function t(e,r){var n=new a(e),t=r&&r.state,f=n.next;return f.int32=function(){return 4294967296*n.next()|0},f.double=function(){return f()+11102230246251565e-32*(2097152*f()|0)},f.quick=f,t&&("object"==typeof t&&o(t,n),f.state=function(){return o(n,{})}),f}r&&r.exports?r.exports=t:n&&n.amd?n(function(){return t}):this.alea=t}(0,"object"==typeof r&&r,!1)},{}],"/Users/gpriday/Downloads/trianglify-master 2/node_modules/seedrandom/lib/tychei.js":[function(e,r,n){!function(e,r,n){function a(e){var f=this,r="";f.next=function(){var e=f.b,r=f.c,n=f.d,t=f.a;return e=e<<25^e>>>7^r,r=r-n|0,n=n<<24^n>>>8^t,t=t-e|0,f.b=e=e<<20^e>>>12^r,f.c=r=r-n|0,f.d=n<<16^r>>>16^t,f.a=t-e|0},f.a=0,f.b=0,f.c=-1640531527,f.d=1367130551,e===Math.floor(e)?(f.a=e/4294967296|0,f.b=0|e):r+=e;for(var n=0;n<r.length+20;n++)f.b^=0|r.charCodeAt(n),f.next()}function o(e,r){return r.a=e.a,r.b=e.b,r.c=e.c,r.d=e.d,r}function t(e,r){function n(){return(t.next()>>>0)/4294967296}var t=new a(e),f=r&&r.state;return n.double=function(){do{var e=((t.next()>>>11)+(t.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},n.int32=t.next,n.quick=n,f&&("object"==typeof f&&o(f,t),n.state=function(){return o(t,{})}),n}r&&r.exports?r.exports=t:n&&n.amd?n(function(){return t}):this.tychei=t}(0,"object"==typeof r&&r,!1)},{}],"/Users/gpriday/Downloads/trianglify-master 2/node_modules/seedrandom/lib/xor128.js":[function(e,r,n){!function(e,r,n){function a(e){var r=this,n="";r.x=0,r.y=0,r.z=0,r.w=0,r.next=function(){var e=r.x^r.x<<11;return r.x=r.y,r.y=r.z,r.z=r.w,r.w^=r.w>>>19^e^e>>>8},e===(0|e)?r.x=e:n+=e;for(var t=0;t<n.length+64;t++)r.x^=0|n.charCodeAt(t),r.next()}function o(e,r){return r.x=e.x,r.y=e.y,r.z=e.z,r.w=e.w,r}function t(e,r){function n(){return(t.next()>>>0)/4294967296}var t=new a(e),f=r&&r.state;return n.double=function(){do{var e=((t.next()>>>11)+(t.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},n.int32=t.next,n.quick=n,f&&("object"==typeof f&&o(f,t),n.state=function(){return o(t,{})}),n}r&&r.exports?r.exports=t:n&&n.amd?n(function(){return t}):this.xor128=t}(0,"object"==typeof r&&r,!1)},{}],"/Users/gpriday/Downloads/trianglify-master 2/node_modules/seedrandom/lib/xor4096.js":[function(e,r,n){!function(e,r,n){function a(e){var a=this;a.next=function(){var e,r,n=a.w,t=a.X,f=a.i;return a.w=n=n+1640531527|0,r=t[f+34&127],e=t[f=f+1&127],r^=r<<13,e^=e<<17,r^=r>>>15,e^=e>>>12,r=t[f]=r^e,a.i=f,r+(n^n>>>16)|0},function(e,r){var n,t,f,a,o,i=[],s=128;for(r===(0|r)?(t=r,r=null):(r+="\0",t=0,s=Math.max(s,r.length)),f=0,a=-32;a<s;++a)r&&(t^=r.charCodeAt((a+32)%r.length)),0===a&&(o=t),t^=t<<10,t^=t>>>15,t^=t<<4,t^=t>>>13,0<=a&&(o=o+1640531527|0,f=0==(n=i[127&a]^=t+o)?f+1:0);for(128<=f&&(i[127&(r&&r.length||0)]=-1),f=127,a=512;0<a;--a)t=i[f+34&127],n=i[f=f+1&127],t^=t<<13,n^=n<<17,t^=t>>>15,n^=n>>>12,i[f]=t^n;e.w=o,e.X=i,e.i=f}(a,e)}function o(e,r){return r.i=e.i,r.w=e.w,r.X=e.X.slice(),r}function t(e,r){null==e&&(e=+new Date);function n(){return(t.next()>>>0)/4294967296}var t=new a(e),f=r&&r.state;return n.double=function(){do{var e=((t.next()>>>11)+(t.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},n.int32=t.next,n.quick=n,f&&(f.X&&o(f,t),n.state=function(){return o(t,{})}),n}r&&r.exports?r.exports=t:n&&n.amd?n(function(){return t}):this.xor4096=t}(0,"object"==typeof r&&r,!1)},{}],"/Users/gpriday/Downloads/trianglify-master 2/node_modules/seedrandom/lib/xorshift7.js":[function(e,r,n){!function(e,r,n){function a(e){var f=this;f.next=function(){var e,r,n=f.x,t=f.i;return e=n[t],r=(e^=e>>>7)^e<<24,r^=(e=n[t+1&7])^e>>>10,r^=(e=n[t+3&7])^e>>>3,r^=(e=n[t+4&7])^e<<7,e=n[t+7&7],r^=(e^=e<<13)^e<<9,n[t]=r,f.i=t+1&7,r},function(e,r){var n,t=[];if(r===(0|r))t[0]=r;else for(r=""+r,n=0;n<r.length;++n)t[7&n]=t[7&n]<<15^r.charCodeAt(n)+t[n+1&7]<<13;for(;t.length<8;)t.push(0);for(n=0;n<8&&0===t[n];++n);for(8==n?t[7]=-1:t[n],e.x=t,e.i=0,n=256;0<n;--n)e.next()}(f,e)}function o(e,r){return r.x=e.x.slice(),r.i=e.i,r}function t(e,r){null==e&&(e=+new Date);function n(){return(t.next()>>>0)/4294967296}var t=new a(e),f=r&&r.state;return n.double=function(){do{var e=((t.next()>>>11)+(t.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},n.int32=t.next,n.quick=n,f&&(f.x&&o(f,t),n.state=function(){return o(t,{})}),n}r&&r.exports?r.exports=t:n&&n.amd?n(function(){return t}):this.xorshift7=t}(0,"object"==typeof r&&r,!1)},{}],"/Users/gpriday/Downloads/trianglify-master 2/node_modules/seedrandom/lib/xorwow.js":[function(e,r,n){!function(e,r,n){function a(e){var r=this,n="";r.next=function(){var e=r.x^r.x>>>2;return r.x=r.y,r.y=r.z,r.z=r.w,r.w=r.v,(r.d=r.d+362437|0)+(r.v=r.v^r.v<<4^e^e<<1)|0},r.x=0,r.y=0,r.z=0,r.w=0,e===((r.v=0)|e)?r.x=e:n+=e;for(var t=0;t<n.length+64;t++)r.x^=0|n.charCodeAt(t),t==n.length&&(r.d=r.x<<10^r.x>>>4),r.next()}function o(e,r){return r.x=e.x,r.y=e.y,r.z=e.z,r.w=e.w,r.v=e.v,r.d=e.d,r}function t(e,r){function n(){return(t.next()>>>0)/4294967296}var t=new a(e),f=r&&r.state;return n.double=function(){do{var e=((t.next()>>>11)+(t.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},n.int32=t.next,n.quick=n,f&&("object"==typeof f&&o(f,t),n.state=function(){return o(t,{})}),n}r&&r.exports?r.exports=t:n&&n.amd?n(function(){return t}):this.xorwow=t}(0,"object"==typeof r&&r,!1)},{}],"/Users/gpriday/Downloads/trianglify-master 2/node_modules/seedrandom/seedrandom.js":[function(r,n,e){!function(i,s){var d,c=this,u=256,l=6,b="random",h=s.pow(u,l),g=s.pow(2,52),p=2*g,m=u-1;function e(e,r,n){function t(){for(var e=o.g(l),r=h,n=0;e<g;)e=(e+n)*u,r*=u,n=o.g(1);for(;p<=e;)e/=2,r/=2,n>>>=1;return(e+n)/r}var f=[],a=v(function e(r,n){var t,f=[],a=typeof r;if(n&&"object"==a)for(t in r)try{f.push(e(r[t],n-1))}catch(e){}return f.length?f:"string"==a?r:r+"\0"}((r=1==r?{entropy:!0}:r||{}).entropy?[e,x(i)]:null==e?function(){try{if(d)return x(d.randomBytes(u));var e=new Uint8Array(u);return(c.crypto||c.msCrypto).getRandomValues(e),x(e)}catch(e){var r=c.navigator,n=r&&r.plugins;return[+new Date,c,n,c.screen,x(i)]}}():e,3),f),o=new y(f);return t.int32=function(){return 0|o.g(4)},t.quick=function(){return o.g(4)/4294967296},t.double=t,v(x(o.S),i),(r.pass||n||function(e,r,n,t){return t&&(t.S&&w(t,o),e.state=function(){return w(o,{})}),n?(s[b]=e,r):e})(t,a,"global"in r?r.global:this==s,r.state)}function y(e){var r,n=e.length,o=this,t=0,f=o.i=o.j=0,a=o.S=[];for(n||(e=[n++]);t<u;)a[t]=t++;for(t=0;t<u;t++)a[t]=a[f=m&f+e[t%n]+(r=a[t])],a[f]=r;(o.g=function(e){for(var r,n=0,t=o.i,f=o.j,a=o.S;e--;)r=a[t=m&t+1],n=n*u+a[m&(a[t]=a[f=m&f+r])+(a[f]=r)];return o.i=t,o.j=f,n})(u)}function w(e,r){return r.i=e.i,r.j=e.j,r.S=e.S.slice(),r}function v(e,r){for(var n,t=e+"",f=0;f<t.length;)r[m&f]=m&(n^=19*r[m&f])+t.charCodeAt(f++);return x(r)}function x(e){return String.fromCharCode.apply(0,e)}if(s["seed"+b]=e,v(s.random(),i),"object"==typeof n&&n.exports){n.exports=e;try{d=r("crypto")}catch(e){}}else 0}([],Math)},{crypto:!1}]},{},["./lib/trianglify.js"])("./lib/trianglify.js")});
base/base.php CHANGED
@@ -1,294 +1,294 @@
1
- <?php
2
-
3
- include plugin_dir_path(__FILE__).'inc/fields/siteorigin-widget-field-class-loader.class.php';
4
- include plugin_dir_path(__FILE__).'siteorigin-widget.class.php';
5
-
6
- include plugin_dir_path(__FILE__).'inc/widget-manager.class.php';
7
- include plugin_dir_path(__FILE__).'inc/meta-box-manager.php';
8
- include plugin_dir_path(__FILE__).'inc/post-selector.php';
9
- include plugin_dir_path(__FILE__).'inc/string-utils.php';
10
- include plugin_dir_path(__FILE__).'inc/array-utils.php';
11
- include plugin_dir_path(__FILE__).'inc/attachments.php';
12
- include plugin_dir_path(__FILE__).'inc/actions.php';
13
- include plugin_dir_path(__FILE__).'inc/shortcode.php';
14
- include plugin_dir_path(__FILE__).'inc/video.php';
15
- include plugin_dir_path(__FILE__).'inc/routes/sowb-rest-routes.php';
16
-
17
- /**
18
- * @param $css
19
- */
20
- function siteorigin_widget_add_inline_css($css){
21
- global $siteorigin_widgets_inline_styles;
22
- if ( empty( $siteorigin_widgets_inline_styles ) ) {
23
- $siteorigin_widgets_inline_styles = array();
24
- }
25
-
26
- $siteorigin_widgets_inline_styles[] = $css;
27
- }
28
-
29
- /**
30
- * Print any inline styles that have been added with siteorigin_widget_add_inline_css
31
- */
32
- function siteorigin_widget_print_styles(){
33
- global $siteorigin_widgets_inline_styles;
34
- if ( ! empty( $siteorigin_widgets_inline_styles ) ) {
35
- foreach ($siteorigin_widgets_inline_styles as $widget_css) {
36
- ?>
37
- <style type="text/css"><?php echo($widget_css) ?></style><?php
38
- }
39
- }
40
-
41
- $siteorigin_widgets_inline_styles = array();
42
- }
43
- add_action('wp_head', 'siteorigin_widget_print_styles');
44
- add_action('wp_footer', 'siteorigin_widget_print_styles');
45
-
46
- /**
47
- * The ajax handler for getting a list of available icons.
48
- */
49
- function siteorigin_widget_get_icon_list(){
50
- if ( empty( $_REQUEST['_widgets_nonce'] ) || ! wp_verify_nonce( $_REQUEST['_widgets_nonce'], 'widgets_action' ) ) {
51
- wp_die( __( 'Invalid request.', 'so-widgets-bundle' ), 403 );
52
- }
53
-
54
- if ( empty( $_GET['family'] ) ) {
55
- wp_die( __( 'Invalid request.', 'so-widgets-bundle' ), 400 );
56
- }
57
-
58
- $widget_icon_families = apply_filters( 'siteorigin_widgets_icon_families', array() );
59
- $icons = ! empty( $widget_icon_families[ $_GET['family'] ] ) ? $widget_icon_families[ $_GET['family'] ] : array();
60
- wp_send_json( $icons );
61
- }
62
- add_action('wp_ajax_siteorigin_widgets_get_icons', 'siteorigin_widget_get_icon_list');
63
-
64
- /**
65
- * @param $icon_value
66
- * @param bool $icon_styles
67
- *
68
- * @return bool|string
69
- */
70
- function siteorigin_widget_get_icon($icon_value, $icon_styles = false) {
71
- if( empty( $icon_value ) ) return false;
72
- $value_parts = SiteOrigin_Widget_Field_Icon::get_value_parts( $icon_value );
73
- $family = $value_parts['family'];
74
- $style = empty( $value_parts['style'] ) ? null : $value_parts['style'];
75
- $icon = $value_parts['icon'];
76
- if( empty( $family ) || empty( $icon ) ) return false;
77
-
78
- static $widget_icon_families;
79
- static $widget_icons_enqueued = array();
80
-
81
- if ( empty( $widget_icon_families ) ) {
82
- $widget_icon_families = apply_filters('siteorigin_widgets_icon_families', array() );
83
- }
84
- if ( empty( $widget_icon_families[ $family ] ) ||
85
- empty( $widget_icon_families[ $family ]['icons'][ $icon ] ) ) {
86
- return false;
87
- }
88
-
89
- if ( empty( $widget_icons_enqueued[ $family ] ) &&
90
- ! empty( $widget_icon_families[ $family ]['style_uri'] ) ) {
91
- if( ! wp_style_is( 'siteorigin-widget-icon-font-'.$family ) ) {
92
- wp_enqueue_style( 'siteorigin-widget-icon-font-' . $family, $widget_icon_families[ $family ]['style_uri'] );
93
- }
94
- $family_style = 'sow-icon-' . $family . ( empty( $style ) ? '' : ' ' . $style );
95
- $icon_data = $widget_icon_families[ $family ]['icons'][ $icon ];
96
- $unicode = '';
97
- if ( is_array($icon_data) && ! empty( $icon_data['unicode'] ) ) {
98
- $unicode = $icon_data['unicode'];
99
- } else if ( is_string( $icon_data ) ) {
100
- $unicode = $icon_data;
101
- }
102
- return '<span class="' . esc_attr( $family_style ) . '" data-sow-icon="' . $unicode . '" ' . ( ! empty( $icon_styles ) ? 'style="' . implode( '; ', $icon_styles ) . '"' : '' ) . '></span>';
103
- }
104
- else {
105
- return false;
106
- }
107
-
108
- }
109
-
110
- /**
111
- * @param $font_value
112
- *
113
- * @return array
114
- */
115
- function siteorigin_widget_get_font($font_value) {
116
-
117
- $web_safe = array(
118
- 'Arial' => 'Arial, "Helvetica Neue", Helvetica, sans-serif',
119
- 'Helvetica Neue' => '"Helvetica Neue", Helvetica, Arial, sans-serif',
120
- 'Lucida Grande' => 'Lucida, Verdana, sans-serif',
121
- 'Georgia' => '"Times New Roman", Times, serif',
122
- 'Courier New' => 'Courier, mono',
123
- 'default' => 'default',
124
- );
125
-
126
- $font = array();
127
- if ( isset( $web_safe[ $font_value ] ) ) {
128
- $font['family'] = $web_safe[ $font_value ];
129
- }
130
- else if( siteorigin_widgets_is_google_webfont( $font_value ) ) {
131
- $font_parts = explode( ':', $font_value );
132
- $font['family'] = $font_parts[0];
133
- $font_url_param = urlencode( $font_parts[0] );
134
- if ( count( $font_parts ) > 1 ) {
135
- $font['weight'] = $font_parts[1];
136
- $font_url_param .= ':' . $font_parts[1];
137
- }
138
- $font['url'] = 'https://fonts.googleapis.com/css?family=' . $font_url_param;
139
- $font['css_import'] = '@import url(https://fonts.googleapis.com/css?family=' . $font_url_param . ');';
140
- }
141
- else {
142
- $font['family'] = $font_value;
143
- $font = apply_filters( 'siteorigin_widget_get_custom_font_family', $font );
144
- }
145
-
146
- return $font;
147
- }
148
-
149
- /**
150
- * Compatibility with Page Builder, add the groups and icons.
151
- *
152
- * @param $widgets
153
- *
154
- * @return mixed
155
- */
156
- function siteorigin_widget_add_bundle_groups($widgets){
157
- foreach( $widgets as $class => &$widget ) {
158
- if( preg_match('/SiteOrigin_Widgets?_(.*)_Widget/i', $class, $matches) ) {
159
- $widget['icon'] = 'so-widget-icon so-widget-icon-'.strtolower($matches[1]);
160
- $widget['groups'] = array('so-widgets-bundle');
161
- }
162
- }
163
-
164
- return $widgets;
165
- }
166
- add_filter('siteorigin_panels_widgets', 'siteorigin_widget_add_bundle_groups', 11);
167
-
168
- /**
169
- * Escape a URL
170
- *
171
- * @param $url
172
- *
173
- * @return string
174
- */
175
- function sow_esc_url( $url ) {
176
- if( preg_match('/^post: *([0-9]+)/', $url, $matches) ) {
177
- // Convert the special post URL into a permalink
178
- $url = get_the_permalink( intval($matches[1]) );
179
- if( empty($url) ) return '';
180
- }
181
-
182
- $protocols = wp_allowed_protocols();
183
- $protocols[] = 'skype';
184
- return esc_url( $url, $protocols );
185
- }
186
-
187
- /**
188
- * A special URL escaping function that handles additional protocols
189
- *
190
- * @param $url
191
- *
192
- * @return string
193
- */
194
- function sow_esc_url_raw( $url ) {
195
- if( preg_match('/^post: *([0-9]+)/', $url, $matches) ) {
196
- // Convert the special post URL into a permalink
197
- $url = get_the_permalink( intval($matches[1]) );
198
- }
199
-
200
- $protocols = wp_allowed_protocols();
201
- $protocols[] = 'skype';
202
- return esc_url_raw( $url, $protocols );
203
- }
204
-
205
- /**
206
- * Escape an HTML attribute
207
- *
208
- * This is a copy of the WP core `esc_attr` function, but modified to allow specifying arguments to the
209
- * `_wp_specialchars` function for a bit more control. This was specifically necessary to allow double-encoding for
210
- * the layout builder field.
211
- *
212
- * @param $text
213
- * @param int $quote_style
214
- * @param bool $charset
215
- * @param bool $double_encode
216
- *
217
- * @return string
218
- */
219
- function sow_esc_attr( $text, $quote_style = ENT_QUOTES, $charset = false, $double_encode = false ) {
220
- $safe_text = wp_check_invalid_utf8( $text );
221
- $safe_text = _wp_specialchars( $safe_text, $quote_style, $charset, $double_encode );
222
- return apply_filters( 'attribute_escape', $safe_text, $text );
223
- }
224
-
225
- /**
226
- * Get all the Google Web Fonts.
227
- *
228
- * @return mixed|void
229
- */
230
- function siteorigin_widgets_fonts_google_webfonts( ) {
231
- $fonts = include plugin_dir_path( __FILE__ ) . 'inc/fonts.php';
232
- $fonts = apply_filters( 'siteorigin_widgets_google_webfonts', $fonts );
233
- return !empty( $fonts ) ? $fonts : array();
234
- }
235
-
236
- function siteorigin_widgets_is_google_webfont( $font_value ) {
237
- $google_webfonts = siteorigin_widgets_fonts_google_webfonts();
238
-
239
- $font_family = explode( ':', $font_value );
240
- $font_family = $font_family[0];
241
-
242
- return isset( $google_webfonts[$font_family] );
243
- }
244
-
245
- function siteorigin_widgets_font_families( ){
246
- // Add the default fonts
247
- $font_families = array(
248
- 'Arial' => 'Arial',
249
- 'Helvetica Neue' => 'Helvetica Neue',
250
- 'Lucida Grande' => 'Lucida Grande',
251
- 'Georgia' => 'Georgia',
252
- 'Courier New' => 'Courier New',
253
- );
254
-
255
- // Add in all the Google font families
256
- foreach ( siteorigin_widgets_fonts_google_webfonts() as $font => $variants ) {
257
- foreach ( $variants as $variant ) {
258
- if ( $variant == 'regular' || $variant == 400 ) {
259
- $font_families[ $font ] = $font;
260
- }
261
- else {
262
- $font_families[ $font . ':' . $variant ] = $font . ' (' . $variant . ')';
263
- }
264
- }
265
- }
266
-
267
- return apply_filters('siteorigin_widgets_font_families', $font_families);
268
- }
269
-
270
- /**
271
- * Get list of supported measurements
272
- *
273
- * @return array
274
- */
275
- function siteorigin_widgets_get_measurements_list() {
276
- $measurements = array(
277
- 'px', '%', 'in', 'cm', 'mm', 'em', 'rem', 'pt', 'pc', 'ex', 'ch', 'vw', 'vh', 'vmin', 'vmax',
278
- );
279
-
280
- // Allow themes and plugins to trim or enhance the list.
281
- return apply_filters('siteorigin_widgets_get_measurements_list', $measurements);
282
- }
283
-
284
-
285
- /**
286
- * Returns the base URL of our widget with `$path` appended.
287
- *
288
- * @param string $path Extra path to append to the end of the URL.
289
- *
290
- * @return string Base URL of the widget, with $path appended.
291
- */
292
- function siteorigin_widgets_url( $path = '' ) {
293
- return plugins_url( 'so-widgets-bundle/' . $path );
294
- }
1
+ <?php
2
+
3
+ include plugin_dir_path(__FILE__).'inc/fields/siteorigin-widget-field-class-loader.class.php';
4
+ include plugin_dir_path(__FILE__).'siteorigin-widget.class.php';
5
+
6
+ include plugin_dir_path(__FILE__).'inc/widget-manager.class.php';
7
+ include plugin_dir_path(__FILE__).'inc/meta-box-manager.php';
8
+ include plugin_dir_path(__FILE__).'inc/post-selector.php';
9
+ include plugin_dir_path(__FILE__).'inc/string-utils.php';
10
+ include plugin_dir_path(__FILE__).'inc/array-utils.php';
11
+ include plugin_dir_path(__FILE__).'inc/attachments.php';
12
+ include plugin_dir_path(__FILE__).'inc/actions.php';
13
+ include plugin_dir_path(__FILE__).'inc/shortcode.php';
14
+ include plugin_dir_path(__FILE__).'inc/video.php';
15
+ include plugin_dir_path(__FILE__).'inc/routes/sowb-rest-routes.php';
16
+
17
+ /**
18
+ * @param $css
19
+ */
20
+ function siteorigin_widget_add_inline_css($css){
21
+ global $siteorigin_widgets_inline_styles;
22
+ if ( empty( $siteorigin_widgets_inline_styles ) ) {
23
+ $siteorigin_widgets_inline_styles = array();
24
+ }
25
+
26
+ $siteorigin_widgets_inline_styles[] = $css;
27
+ }
28
+
29
+ /**
30
+ * Print any inline styles that have been added with siteorigin_widget_add_inline_css
31
+ */
32
+ function siteorigin_widget_print_styles(){
33
+ global $siteorigin_widgets_inline_styles;
34
+ if ( ! empty( $siteorigin_widgets_inline_styles ) ) {
35
+ foreach ($siteorigin_widgets_inline_styles as $widget_css) {
36
+ ?>
37
+ <style type="text/css"><?php echo($widget_css) ?></style><?php
38
+ }
39
+ }
40
+
41
+ $siteorigin_widgets_inline_styles = array();
42
+ }
43
+ add_action('wp_head', 'siteorigin_widget_print_styles');
44
+ add_action('wp_footer', 'siteorigin_widget_print_styles');
45
+
46
+ /**
47
+ * The ajax handler for getting a list of available icons.
48
+ */
49
+ function siteorigin_widget_get_icon_list(){
50
+ if ( empty( $_REQUEST['_widgets_nonce'] ) || ! wp_verify_nonce( $_REQUEST['_widgets_nonce'], 'widgets_action' ) ) {
51
+ wp_die( __( 'Invalid request.', 'so-widgets-bundle' ), 403 );
52
+ }
53
+
54
+ if ( empty( $_GET['family'] ) ) {
55
+ wp_die( __( 'Invalid request.', 'so-widgets-bundle' ), 400 );
56
+ }
57
+
58
+ $widget_icon_families = apply_filters( 'siteorigin_widgets_icon_families', array() );
59
+ $icons = ! empty( $widget_icon_families[ $_GET['family'] ] ) ? $widget_icon_families[ $_GET['family'] ] : array();
60
+ wp_send_json( $icons );
61
+ }
62
+ add_action('wp_ajax_siteorigin_widgets_get_icons', 'siteorigin_widget_get_icon_list');
63
+
64
+ /**
65
+ * @param $icon_value
66
+ * @param bool $icon_styles
67
+ *
68
+ * @return bool|string
69
+ */
70
+ function siteorigin_widget_get_icon($icon_value, $icon_styles = false) {
71
+ if( empty( $icon_value ) ) return false;
72
+ $value_parts = SiteOrigin_Widget_Field_Icon::get_value_parts( $icon_value );
73
+ $family = $value_parts['family'];
74
+ $style = empty( $value_parts['style'] ) ? null : $value_parts['style'];
75
+ $icon = $value_parts['icon'];
76
+ if( empty( $family ) || empty( $icon ) ) return false;
77
+
78
+ static $widget_icon_families;
79
+ static $widget_icons_enqueued = array();
80
+
81
+ if ( empty( $widget_icon_families ) ) {
82
+ $widget_icon_families = apply_filters('siteorigin_widgets_icon_families', array() );
83
+ }
84
+ if ( empty( $widget_icon_families[ $family ] ) ||
85
+ empty( $widget_icon_families[ $family ]['icons'][ $icon ] ) ) {
86
+ return false;
87
+ }
88
+
89
+ if ( empty( $widget_icons_enqueued[ $family ] ) &&
90
+ ! empty( $widget_icon_families[ $family ]['style_uri'] ) ) {
91
+ if( ! wp_style_is( 'siteorigin-widget-icon-font-'.$family ) ) {
92
+ wp_enqueue_style( 'siteorigin-widget-icon-font-' . $family, $widget_icon_families[ $family ]['style_uri'] );
93
+ }
94
+ $family_style = 'sow-icon-' . $family . ( empty( $style ) ? '' : ' ' . $style );
95
+ $icon_data = $widget_icon_families[ $family ]['icons'][ $icon ];
96
+ $unicode = '';
97
+ if ( is_array($icon_data) && ! empty( $icon_data['unicode'] ) ) {
98
+ $unicode = $icon_data['unicode'];
99
+ } else if ( is_string( $icon_data ) ) {
100
+ $unicode = $icon_data;
101
+ }
102
+ return '<span class="' . esc_attr( $family_style ) . '" data-sow-icon="' . $unicode . '" ' . ( ! empty( $icon_styles ) ? 'style="' . implode( '; ', $icon_styles ) . '"' : '' ) . '></span>';
103
+ }
104
+ else {
105
+ return false;
106
+ }
107
+
108
+ }
109
+
110
+ /**
111
+ * @param $font_value
112
+ *
113
+ * @return array
114
+ */
115
+ function siteorigin_widget_get_font($font_value) {
116
+
117
+ $web_safe = array(
118
+ 'Arial' => 'Arial, "Helvetica Neue", Helvetica, sans-serif',
119
+ 'Helvetica Neue' => '"Helvetica Neue", Helvetica, Arial, sans-serif',
120
+ 'Lucida Grande' => 'Lucida, Verdana, sans-serif',
121
+ 'Georgia' => '"Times New Roman", Times, serif',
122
+ 'Courier New' => 'Courier, mono',
123
+ 'default' => 'default',
124
+ );
125
+
126
+ $font = array();
127
+ if ( isset( $web_safe[ $font_value ] ) ) {
128
+ $font['family'] = $web_safe[ $font_value ];
129
+ }
130
+ else if( siteorigin_widgets_is_google_webfont( $font_value ) ) {
131
+ $font_parts = explode( ':', $font_value );
132
+ $font['family'] = $font_parts[0];
133
+ $font_url_param = urlencode( $font_parts[0] );
134
+ if ( count( $font_parts ) > 1 ) {
135
+ $font['weight'] = $font_parts[1];
136
+ $font_url_param .= ':' . $font_parts[1];
137
+ }
138
+ $font['url'] = 'https://fonts.googleapis.com/css?family=' . $font_url_param;
139
+ $font['css_import'] = '@import url(https://fonts.googleapis.com/css?family=' . $font_url_param . ');';
140
+ }
141
+ else {
142
+ $font['family'] = $font_value;
143
+ $font = apply_filters( 'siteorigin_widget_get_custom_font_family', $font );
144
+ }
145
+
146
+ return $font;
147
+ }
148
+
149
+ /**
150
+ * Compatibility with Page Builder, add the groups and icons.
151
+ *
152
+ * @param $widgets
153
+ *
154
+ * @return mixed
155
+ */
156
+ function siteorigin_widget_add_bundle_groups($widgets){
157
+ foreach( $widgets as $class => &$widget ) {
158
+ if( preg_match('/SiteOrigin_Widgets?_(.*)_Widget/i', $class, $matches) ) {
159
+ $widget['icon'] = 'so-widget-icon so-widget-icon-'.strtolower($matches[1]);
160
+ $widget['groups'] = array('so-widgets-bundle');
161
+ }
162
+ }
163
+
164
+ return $widgets;
165
+ }
166
+ add_filter('siteorigin_panels_widgets', 'siteorigin_widget_add_bundle_groups', 11);
167
+
168
+ /**
169
+ * Escape a URL
170
+ *
171
+ * @param $url
172
+ *
173
+ * @return string
174
+ */
175
+ function sow_esc_url( $url ) {
176
+ if( preg_match('/^post: *([0-9]+)/', $url, $matches) ) {
177
+ // Convert the special post URL into a permalink
178
+ $url = get_the_permalink( intval($matches[1]) );
179
+ if( empty($url) ) return '';
180
+ }
181
+
182
+ $protocols = wp_allowed_protocols();
183
+ $protocols[] = 'skype';
184
+ return esc_url( $url, $protocols );
185
+ }
186
+
187
+ /**
188
+ * A special URL escaping function that handles additional protocols
189
+ *
190
+ * @param $url
191
+ *
192
+ * @return string
193
+ */
194
+ function sow_esc_url_raw( $url ) {
195
+ if( preg_match('/^post: *([0-9]+)/', $url, $matches) ) {
196
+ // Convert the special post URL into a permalink
197
+ $url = get_the_permalink( intval($matches[1]) );
198
+ }
199
+
200
+ $protocols = wp_allowed_protocols();
201
+ $protocols[] = 'skype';
202
+ return esc_url_raw( $url, $protocols );
203
+ }
204
+
205
+ /**
206
+ * Escape an HTML attribute
207
+ *
208
+ * This is a copy of the WP core `esc_attr` function, but modified to allow specifying arguments to the
209
+ * `_wp_specialchars` function for a bit more control. This was specifically necessary to allow double-encoding for
210
+ * the layout builder field.
211
+ *
212
+ * @param $text
213
+ * @param int $quote_style
214
+ * @param bool $charset
215
+ * @param bool $double_encode
216
+ *
217
+ * @return string
218
+ */
219
+ function sow_esc_attr( $text, $quote_style = ENT_QUOTES, $charset = false, $double_encode = false ) {
220
+ $safe_text = wp_check_invalid_utf8( $text );
221
+ $safe_text = _wp_specialchars( $safe_text, $quote_style, $charset, $double_encode );
222
+ return apply_filters( 'attribute_escape', $safe_text, $text );
223
+ }
224
+
225
+ /**
226
+ * Get all the Google Web Fonts.
227
+ *
228
+ * @return mixed|void
229
+ */
230
+ function siteorigin_widgets_fonts_google_webfonts( ) {
231
+ $fonts = include plugin_dir_path( __FILE__ ) . 'inc/fonts.php';
232
+ $fonts = apply_filters( 'siteorigin_widgets_google_webfonts', $fonts );
233
+ return !empty( $fonts ) ? $fonts : array();
234
+ }
235
+
236
+ function siteorigin_widgets_is_google_webfont( $font_value ) {
237
+ $google_webfonts = siteorigin_widgets_fonts_google_webfonts();
238
+
239
+ $font_family = explode( ':', $font_value );
240
+ $font_family = $font_family[0];
241
+
242
+ return isset( $google_webfonts[$font_family] );
243
+ }
244
+
245
+ function siteorigin_widgets_font_families( ){
246
+ // Add the default fonts
247
+ $font_families = array(
248
+ 'Arial' => 'Arial',
249
+ 'Helvetica Neue' => 'Helvetica Neue',
250
+ 'Lucida Grande' => 'Lucida Grande',
251
+ 'Georgia' => 'Georgia',
252
+ 'Courier New' => 'Courier New',
253
+ );
254
+
255
+ // Add in all the Google font families
256
+ foreach ( siteorigin_widgets_fonts_google_webfonts() as $font => $variants ) {
257
+ foreach ( $variants as $variant ) {
258
+ if ( $variant == 'regular' || $variant == 400 ) {
259
+ $font_families[ $font ] = $font;
260
+ }
261
+ else {
262
+ $font_families[ $font . ':' . $variant ] = $font . ' (' . $variant . ')';
263
+ }
264
+ }
265
+ }
266
+
267
+ return apply_filters('siteorigin_widgets_font_families', $font_families);
268
+ }
269
+
270
+ /**
271
+ * Get list of supported measurements
272
+ *
273
+ * @return array
274
+ */
275
+ function siteorigin_widgets_get_measurements_list() {
276
+ $measurements = array(
277
+ 'px', '%', 'in', 'cm', 'mm', 'em', 'rem', 'pt', 'pc', 'ex', 'ch', 'vw', 'vh', 'vmin', 'vmax',
278
+ );
279
+
280
+ // Allow themes and plugins to trim or enhance the list.
281
+ return apply_filters('siteorigin_widgets_get_measurements_list', $measurements);
282
+ }
283
+
284
+
285
+ /**
286
+ * Returns the base URL of our widget with `$path` appended.
287
+ *
288
+ * @param string $path Extra path to append to the end of the URL.
289
+ *
290
+ * @return string Base URL of the widget, with $path appended.
291
+ */
292
+ function siteorigin_widgets_url( $path = '' ) {
293
+ return plugins_url( 'so-widgets-bundle/' . $path );
294
+ }
base/css/admin.css CHANGED
@@ -1,639 +1 @@
1
- .siteorigin-widget-form-no-styles {
2
- display: none !important;
3
- }
4
- .siteorigin-widget-teaser {
5
- padding: 10px 12px;
6
- border: 1px solid #5fc133;
7
- background: #edfbe7;
8
- color: #394a3a;
9
- margin-bottom: 20px;
10
- }
11
- .siteorigin-widget-teaser .dashicons {
12
- float: right;
13
- margin: 1px 2px 6px 10px;
14
- cursor: pointer;
15
- font-size: 18px;
16
- width: 18px;
17
- height: 18px;
18
- }
19
- .siteorigin-widget-form-notification {
20
- padding: 8px 12px;
21
- border: 1px solid #a4cadd;
22
- background-color: #CDE2EC;
23
- margin-bottom: 20px;
24
- }
25
- .siteorigin-widget-form-notification > span {
26
- line-height: 22px;
27
- }
28
- .siteorigin-widget-form-notification > a.button.button-small {
29
- margin-left: 10px;
30
- height: 22px;
31
- }
32
- .siteorigin-widget-form {
33
- display: block !important;
34
- margin: 15px 0;
35
- }
36
- .siteorigin-widget-form > div:first-child {
37
- margin-top: 0;
38
- }
39
- .siteorigin-widget-form a {
40
- box-shadow: none;
41
- }
42
- .siteorigin-widget-form.siteorigin-widget-form-main {
43
- min-width: 600px;
44
- }
45
- .siteorigin-widget-form .siteorigin-widget-field {
46
- margin: 1em 0;
47
- }
48
- .siteorigin-widget-form .siteorigin-widget-field > label {
49
- display: block;
50
- margin-bottom: 3px;
51
- }
52
- .siteorigin-widget-form .siteorigin-widget-field > label.siteorigin-widget-field-label {
53
- font-weight: bold;
54
- }
55
- .siteorigin-widget-form .siteorigin-widget-field > label.so-checkbox-label {
56
- -webkit-user-select: none;
57
- -moz-user-select: none;
58
- -ms-user-select: none;
59
- user-select: none;
60
- }
61
- .siteorigin-widget-form .siteorigin-widget-field .siteorigin-widget-description {
62
- font-size: 0.9em;
63
- margin-top: 0.2em;
64
- color: #999;
65
- font-style: italic;
66
- }
67
- .siteorigin-widget-form .siteorigin-widget-field.siteorigin-widget-field-separator {
68
- margin: 1.75em 0;
69
- }
70
- .siteorigin-widget-form .siteorigin-widget-field.siteorigin-widget-field-is-optional .field-optional {
71
- font-weight: normal;
72
- font-size: 0.8em;
73
- vertical-align: super;
74
- padding-left: 0.5em;
75
- color: #54a242;
76
- font-style: italic;
77
- }
78
- .siteorigin-widget-form .siteorigin-widget-field.siteorigin-widget-field-is-required .field-required {
79
- font-weight: normal;
80
- font-size: 0.8em;
81
- vertical-align: super;
82
- padding-left: 0.5em;
83
- color: #F02311;
84
- font-style: italic;
85
- }
86
- .siteorigin-widget-form .siteorigin-widget-field input[type="text"] {
87
- width: 100%;
88
- }
89
- .siteorigin-widget-form .siteorigin-widget-field input.siteorigin-widget-input-color {
90
- width: auto;
91
- }
92
- .siteorigin-widget-form .siteorigin-widget-field textarea.siteorigin-widget-code-input {
93
- font-family: "Courier New", Courier, monospace;
94
- }
95
- .siteorigin-widget-form .siteorigin-widget-field select {
96
- min-width: 150px;
97
- }
98
- .siteorigin-widget-form .siteorigin-widget-field select[multiple] {
99
- max-height: 83px;
100
- }
101
- .siteorigin-widget-form .siteorigin-widget-field-type-slider .siteorigin-widget-slider-wrapper {
102
- margin: 10px 0;
103
- border: 1px solid #E0E0E0;
104
- padding: 12px 15px;
105
- background: #F4F4F4;
106
- -webkit-border-radius: 4px;
107
- -moz-border-radius: 4px;
108
- border-radius: 4px;
109
- max-width: 500px;
110
- display: block;
111
- margin-left: 55px;
112
- }
113
- .siteorigin-widget-form .siteorigin-widget-field-type-slider .siteorigin-widget-slider-value {
114
- display: block;
115
- float: left;
116
- margin-top: 0;
117
- border: 1px solid #E0E0E0;
118
- padding: 11px 0;
119
- background: #F4F4F4;
120
- font-weight: bold;
121
- color: #666;
122
- width: 45px;
123
- text-align: center;
124
- }
125
- .siteorigin-widget-form .siteorigin-widget-field-type-slider .siteorigin-widget-value-slider {
126
- position: relative;
127
- height: 5px;
128
- background: #A0A0A0;
129
- -webkit-box-shadow: inset 0 1px 2px rgba(0,0,0,0.25);
130
- -moz-box-shadow: inset 0 1px 2px rgba(0,0,0,0.25);
131
- box-shadow: inset 0 1px 2px rgba(0,0,0,0.25);
132
- -webkit-border-radius: 4px;
133
- -moz-border-radius: 4px;
134
- border-radius: 4px;
135
- }
136
- .siteorigin-widget-form .siteorigin-widget-field-type-slider .ui-slider-handle {
137
- cursor: move;
138
- -ms-box-sizing: border-box;
139
- -moz-box-sizing: border-box;
140
- -webkit-box-sizing: border-box;
141
- box-sizing: border-box;
142
- border: 1px solid #a4a3a8;
143
- z-index: 10;
144
- position: absolute;
145
- width: 18px;
146
- height: 18px;
147
- margin-top: -7px;
148
- margin-left: -9px;
149
- background: #F9F9F9;
150
- -webkit-border-radius: 10px;
151
- -moz-border-radius: 10px;
152
- border-radius: 10px;
153
- top: 0;
154
- left: 0;
155
- -webkit-box-shadow: inset 0 1px 0 #FFFFFF, 0 1px 1px rgba(0,0,0,0.1);
156
- -moz-box-shadow: inset 0 1px 0 #FFFFFF, 0 1px 1px rgba(0,0,0,0.1);
157
- box-shadow: inset 0 1px 0 #FFFFFF, 0 1px 1px rgba(0,0,0,0.1);
158
- }
159
- .siteorigin-widget-form .siteorigin-widget-field-type-slider input[type="number"] {
160
- display: none;
161