Version Description
- NEW feature: Now available the new "Rankings" tab in settings, here you can see a live preview of the rankings before adding it to you post
- TWEAKED: code cleanup
Download this release
Release Info
Developer | Dudo |
Plugin | Yasr – Yet Another Stars Rating |
Version | 2.6.3 |
Comparing to | |
See all releases |
Code changes from version 2.6.2 to 2.6.3
- admin/css/yasr-admin.css +59 -4
- admin/editor/yasr-editor-functions.php +10 -0
- admin/js/src/{yasr-dashboard.js → yasr-admin-dashboard.js} +0 -0
- admin/js/src/{yasr-functions.js → yasr-admin-functions.js} +0 -0
- admin/js/src/yasr-guten-blocks.js +0 -683
- admin/js/src/yasr-guten-panel.js +0 -289
- admin/js/src/yasr-settings-page.js +161 -170
- admin/js/src/yasr-settings-rankings.js +218 -0
- admin/js/yasr-admin.js +1 -1
- admin/js/yasr-editor-screen.js +1 -1
- admin/js/yasr-guten-blocks.js +0 -772
- admin/js/yasr-guten-panel.js +0 -1
- admin/js/yasr-settings.js +30 -0
- admin/settings/classes/YasrSettings.php +9 -11
- admin/settings/classes/YasrSettingsRankings.php +371 -0
- admin/settings/classes/YasrStatsVisitorMulti.php +0 -328
- admin/settings/multiset/yasr-settings-functions-multiset-page.php +51 -56
- admin/settings/rankings/yasr-ranking-builder.php +90 -0
- admin/settings/yasr-settings-functions-misc.php +12 -31
- admin/settings/yasr-settings-functions.php +0 -987
- admin/settings/yasr-settings-page.php +32 -45
- admin/settings/yasr-stats-functions.php +0 -359
- admin/yasr-admin-actions-ajax.php +21 -1
- admin/yasr-admin-filters.php +1 -1
- admin/yasr-admin-functions.php +14 -15
- admin/yasr-admin-init.php +12 -0
- admin/yasr-stats-page.php +0 -103
- includes/classes/YasrPhpFieldsHelper.php +67 -35
- includes/classes/YasrRankingData.php +77 -16
- includes/css/yasr.css +1 -1
- includes/img/logo-supporthost.svg +0 -1
- includes/js/rater-js-rtl.js +6 -2
- includes/js/rater-js.js +4 -0
- includes/js/src/ranking.js +82 -30
- includes/js/src/yasr-front.js +33 -31
- includes/js/yasr-front.js +3 -3
- includes/shortcodes/classes/YasrNoStarsRankings.php +83 -94
- includes/shortcodes/classes/YasrRankings.php +34 -72
- includes/shortcodes/classes/YasrVisitorVotes.php +2 -2
- includes/shortcodes/yasr-shortcode-functions.php +40 -39
- includes/yasr-includes-functions.php +39 -2
- public/classes/YasrPublicFilters.php +1 -1
- public/yasr-public-actions.php +1 -31
- public/yasr-public-filters.php +0 -334
- readme.txt +8 -4
- yet-another-stars-rating.php +2 -2
admin/css/yasr-admin.css
CHANGED
@@ -288,6 +288,63 @@
|
|
288 |
|
289 |
/*** End on of switch ***/
|
290 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
291 |
@media (min-width: 1177px) {
|
292 |
|
293 |
.yasr-settingsdiv {
|
@@ -296,8 +353,8 @@
|
|
296 |
width: 65%;
|
297 |
background-color: #FFF;
|
298 |
border: 1px solid #DDD;
|
299 |
-
padding-left:
|
300 |
-
padding-right:
|
301 |
padding-bottom: 10px;
|
302 |
min-height: 560px;
|
303 |
}
|
@@ -661,8 +718,6 @@
|
|
661 |
/**** End Migration Tools Page ****/
|
662 |
|
663 |
|
664 |
-
|
665 |
-
|
666 |
/*** Popup in tinymce ***/
|
667 |
|
668 |
|
288 |
|
289 |
/*** End on of switch ***/
|
290 |
|
291 |
+
|
292 |
+
/*This is the div with the created shortcode*/
|
293 |
+
|
294 |
+
.yasr-builder-ranking-container{
|
295 |
+
display: flex;
|
296 |
+
flex-direction: row;
|
297 |
+
flex-wrap: wrap;
|
298 |
+
justify-content: space-between;
|
299 |
+
align-items: stretch;
|
300 |
+
align-content: stretch;
|
301 |
+
padding-top: 10px;
|
302 |
+
padding-bottom: 10px;
|
303 |
+
}
|
304 |
+
|
305 |
+
.yasr-builder-shortcode-container {
|
306 |
+
border: dashed 2px gray;
|
307 |
+
margin-bottom: 20px;
|
308 |
+
padding: 20px;
|
309 |
+
}
|
310 |
+
|
311 |
+
.yasr-rankings-div-shortcode {
|
312 |
+
margin-bottom: 20px;
|
313 |
+
}
|
314 |
+
|
315 |
+
#yasr-builder-shortcode-buttons-container{
|
316 |
+
padding-left: 10px;
|
317 |
+
}
|
318 |
+
|
319 |
+
#yasr-ranking-source{
|
320 |
+
max-width: 165px;
|
321 |
+
}
|
322 |
+
|
323 |
+
#yasr-ranking-ctg-container {
|
324 |
+
margin-top: 15px;
|
325 |
+
padding-right: 15px;
|
326 |
+
display: flex;
|
327 |
+
flex-wrap: wrap;
|
328 |
+
}
|
329 |
+
|
330 |
+
#yasr-ranking-ctg-container > span {
|
331 |
+
margin: 5px 7px 2px 5px;
|
332 |
+
text-align: center;
|
333 |
+
}
|
334 |
+
|
335 |
+
/*Div padding*/
|
336 |
+
.yasr-div-fixed-65 {
|
337 |
+
flex-grow: 1;
|
338 |
+
flex-basis: 65%;
|
339 |
+
text-align: left;
|
340 |
+
}
|
341 |
+
|
342 |
+
.yasr-div-fixed-35 {
|
343 |
+
flex-grow: 1;
|
344 |
+
flex-basis: 35%;
|
345 |
+
text-align: left;
|
346 |
+
}
|
347 |
+
|
348 |
@media (min-width: 1177px) {
|
349 |
|
350 |
.yasr-settingsdiv {
|
353 |
width: 65%;
|
354 |
background-color: #FFF;
|
355 |
border: 1px solid #DDD;
|
356 |
+
padding-left: 15px;
|
357 |
+
padding-right: 15px;
|
358 |
padding-bottom: 10px;
|
359 |
min-height: 560px;
|
360 |
}
|
718 |
/**** End Migration Tools Page ****/
|
719 |
|
720 |
|
|
|
|
|
721 |
/*** Popup in tinymce ***/
|
722 |
|
723 |
|
admin/editor/yasr-editor-functions.php
CHANGED
@@ -457,6 +457,16 @@ function wp_ajax_yasr_create_shortcode_callback() {
|
|
457 |
|
458 |
</table>
|
459 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
460 |
</div>
|
461 |
|
462 |
<?php do_action('yasr_add_content_on_tinypopupform'); ?>
|
457 |
|
458 |
</table>
|
459 |
|
460 |
+
<div style="font-size: medium">
|
461 |
+
<?php
|
462 |
+
echo(
|
463 |
+
sprintf(__('%s Click here %s to customize the ranking and see a live preview',
|
464 |
+
'yet-another-stars-rating'),
|
465 |
+
'<a href="options-general.php?page=yasr_settings_page&tab=rankings">', '</a>')
|
466 |
+
);
|
467 |
+
?>
|
468 |
+
</div>
|
469 |
+
|
470 |
</div>
|
471 |
|
472 |
<?php do_action('yasr_add_content_on_tinypopupform'); ?>
|
admin/js/src/{yasr-dashboard.js → yasr-admin-dashboard.js}
RENAMED
File without changes
|
admin/js/src/{yasr-functions.js → yasr-admin-functions.js}
RENAMED
File without changes
|
admin/js/src/yasr-guten-blocks.js
DELETED
@@ -1,683 +0,0 @@
|
|
1 |
-
//setting costants
|
2 |
-
const { __ } = wp.i18n; // Import __() from wp.i18n
|
3 |
-
const {registerBlockType} = wp.blocks; // Import from wp.blocks
|
4 |
-
const {PanelBody, PanelRow} = wp.components;
|
5 |
-
const {Fragment} = wp.element;
|
6 |
-
const {BlockControls,InspectorControls} = wp.editor;
|
7 |
-
|
8 |
-
|
9 |
-
const yasrOptionalText = __('All these settings are optional', 'yet-another-stars-rating');
|
10 |
-
|
11 |
-
const yasrLabelSelectSize = __('Choose Size', 'yet-another-stars-rating');
|
12 |
-
|
13 |
-
const yasrSelectSizeChoose = __('Choose stars size', 'yet-another-stars-rating');
|
14 |
-
const yasrSelectSizeSmall = __('Small', 'yet-another-stars-rating');
|
15 |
-
const yasrSelectSizeMedium = __('Medium', 'yet-another-stars-rating');
|
16 |
-
const yasrSelectSizeLarge = __('Large', 'yet-another-stars-rating');
|
17 |
-
|
18 |
-
const yasrLeaveThisBlankText = __('Leave this blank if you don\'t know what you\'re doing.', 'yet-another-stars-rating');
|
19 |
-
|
20 |
-
const yasrOverallDescription = __('Remember: only the post author can rate here.', 'yet-another-stars-rating');
|
21 |
-
const yasrVisitorVotesDescription = __('This is the star set where your users will be able to vote', 'yet-another-stars-rating');
|
22 |
-
|
23 |
-
/******* function to check ajax response *****/
|
24 |
-
/*function checkResponse(res) {
|
25 |
-
if (res.status >= 400 && res.status < 600) {
|
26 |
-
throw new Error(`Failed with status ${res.status}`);
|
27 |
-
}
|
28 |
-
|
29 |
-
return res;
|
30 |
-
}*/
|
31 |
-
|
32 |
-
function YasrProText () {
|
33 |
-
|
34 |
-
const YasrProText1 = __('To be able to customize this ranking, you need', 'yet-another-stars-rating');
|
35 |
-
const YasrProText2 = __('You can buy the plugin, including one year of support, updates and upgrades, on',
|
36 |
-
'yet-another-stars-rating');
|
37 |
-
|
38 |
-
return (
|
39 |
-
<h3>
|
40 |
-
{YasrProText1}
|
41 |
-
|
42 |
-
<a href="https://yetanotherstarsrating.com/?utm_source=wp-plugin&utm_medium=gutenberg_panel&utm_campaign=yasr_editor_screen&utm_content=rankings#yasr-pro">
|
43 |
-
Yasr Pro.
|
44 |
-
</a><br />
|
45 |
-
{YasrProText2}
|
46 |
-
|
47 |
-
<a href="https://yetanotherstarsrating.com/?utm_source=wp-plugin&utm_medium=gutenberg_panel&utm_campaign=yasr_editor_screen&utm_content=rankings">
|
48 |
-
yetanotherstarsrating.com
|
49 |
-
</a>
|
50 |
-
</h3>
|
51 |
-
)
|
52 |
-
|
53 |
-
}
|
54 |
-
|
55 |
-
function YasrNoSettingsPanel (props) {
|
56 |
-
|
57 |
-
return (
|
58 |
-
<InspectorControls>
|
59 |
-
<PanelBody title='Settings'>
|
60 |
-
<YasrProText/>
|
61 |
-
</PanelBody>
|
62 |
-
</InspectorControls>
|
63 |
-
);
|
64 |
-
|
65 |
-
}
|
66 |
-
|
67 |
-
/*function YasrPrintSelectRows () {
|
68 |
-
|
69 |
-
let optionValueRows = [];
|
70 |
-
|
71 |
-
for (let i=2; i<=30; i++) {
|
72 |
-
if (i === 9) {
|
73 |
-
optionValueRows.push(<option value={i} selected disabled>{i}</option>);
|
74 |
-
} else {
|
75 |
-
optionValueRows.push(<option value={i} disabled>{i}</option>);
|
76 |
-
}
|
77 |
-
|
78 |
-
}
|
79 |
-
|
80 |
-
return(
|
81 |
-
<form>
|
82 |
-
<select>
|
83 |
-
{optionValueRows}
|
84 |
-
</select>
|
85 |
-
<span className="dashicons dashicons-lock"></span>
|
86 |
-
</form>
|
87 |
-
)
|
88 |
-
|
89 |
-
}
|
90 |
-
|
91 |
-
|
92 |
-
function YasrPrintSelectSize () {
|
93 |
-
return (
|
94 |
-
<form>
|
95 |
-
<select>
|
96 |
-
<option value="--">{yasrSelectSizeChoose}</option>
|
97 |
-
<option value="small" disabled>{yasrSelectSizeSmall}</option>
|
98 |
-
<option value="medium" disabled>{yasrSelectSizeMedium}</option>
|
99 |
-
<option value="large" disabled>{yasrSelectSizeLarge}</option>
|
100 |
-
</select>
|
101 |
-
<span className="dashicons dashicons-lock"></span>
|
102 |
-
</form>
|
103 |
-
);
|
104 |
-
}
|
105 |
-
|
106 |
-
function YasrPrintTextPosition () {
|
107 |
-
return (
|
108 |
-
<form>
|
109 |
-
<select>
|
110 |
-
<option value="before" selected disabled>Before</option>
|
111 |
-
<option value="after" disabled>After</option>
|
112 |
-
</select>
|
113 |
-
<span className="dashicons dashicons-lock"></span>
|
114 |
-
</form>
|
115 |
-
);
|
116 |
-
}
|
117 |
-
*/
|
118 |
-
/**
|
119 |
-
* Register: a Gutenberg Block.
|
120 |
-
*
|
121 |
-
* Registers a new block provided a unique name and an object defining its
|
122 |
-
* behavior. Once registered, the block is made editor as an option to any
|
123 |
-
* editor interface where blocks are implemented.
|
124 |
-
*
|
125 |
-
* @link https://wordpress.org/gutenberg/handbook/block-api/
|
126 |
-
* @param {string} name Block name.
|
127 |
-
* @param {Object} settings Block settings.
|
128 |
-
* @return {?WPBlock} The block, if it has been successfully
|
129 |
-
* registered; otherwise `undefined`.
|
130 |
-
*/
|
131 |
-
|
132 |
-
registerBlockType(
|
133 |
-
'yet-another-stars-rating/yasr-overall-rating', {
|
134 |
-
title: __( 'Yasr: Overall Rating', 'yet-another-stars-rating' ),
|
135 |
-
description: __('Insert the author rating', ''),
|
136 |
-
icon: 'star-half',
|
137 |
-
category: 'yet-another-stars-rating',
|
138 |
-
keywords: [
|
139 |
-
__('rating', 'yet-another-stars-rating'),
|
140 |
-
__('author', 'yet-another-stars-rating'),
|
141 |
-
__('overall', 'yet-another-stars-rating')
|
142 |
-
],
|
143 |
-
attributes: {
|
144 |
-
overallRatingMeta: {
|
145 |
-
type: 'number',
|
146 |
-
source: 'meta',
|
147 |
-
meta: 'yasr_overall_rating'
|
148 |
-
},
|
149 |
-
size: {
|
150 |
-
type: 'string',
|
151 |
-
default: '--'
|
152 |
-
},
|
153 |
-
postId: {
|
154 |
-
type: 'number',
|
155 |
-
default: ''
|
156 |
-
},
|
157 |
-
},
|
158 |
-
|
159 |
-
edit:
|
160 |
-
|
161 |
-
function(props) {
|
162 |
-
|
163 |
-
const { attributes: {overallRatingMeta, size, postId}, setAttributes, isSelected } = props;
|
164 |
-
|
165 |
-
let overallRating = overallRatingMeta;
|
166 |
-
|
167 |
-
let sizeAttribute = null;
|
168 |
-
let postIdAttribute = null;
|
169 |
-
let isNum = false;
|
170 |
-
|
171 |
-
if (size !== '--') {
|
172 |
-
sizeAttribute = ' size="' + size + '"';
|
173 |
-
}
|
174 |
-
|
175 |
-
isNum = /^\d+$/.test(postId);
|
176 |
-
|
177 |
-
if (postId && isNum === true) {
|
178 |
-
postIdAttribute = ' postid="' +postId + '"';
|
179 |
-
}
|
180 |
-
|
181 |
-
class YasrDivRatingOverall extends React.Component {
|
182 |
-
|
183 |
-
constructor(props) {
|
184 |
-
super(props);
|
185 |
-
this.yasrOverallRateThis = __("Rate this article / item", 'yet-another-stars-rating');
|
186 |
-
}
|
187 |
-
|
188 |
-
render () {
|
189 |
-
return (
|
190 |
-
<div>
|
191 |
-
{this.yasrOverallRateThis}
|
192 |
-
<div>
|
193 |
-
<div id="overall-rater" ref={()=>
|
194 |
-
raterJs({
|
195 |
-
starSize: 32,
|
196 |
-
step: 0.1,
|
197 |
-
showToolTip: false,
|
198 |
-
rating: overallRating,
|
199 |
-
readOnly: false,
|
200 |
-
element: document.querySelector("#overall-rater"),
|
201 |
-
rateCallback: function rateCallback(rating, done) {
|
202 |
-
|
203 |
-
rating = rating.toFixed(1);
|
204 |
-
rating = parseFloat(rating);
|
205 |
-
|
206 |
-
setAttributes( { overallRatingMeta: rating } );
|
207 |
-
|
208 |
-
this.setRating(rating);
|
209 |
-
|
210 |
-
done();
|
211 |
-
|
212 |
-
}
|
213 |
-
})
|
214 |
-
}
|
215 |
-
/>
|
216 |
-
</div>
|
217 |
-
</div>
|
218 |
-
|
219 |
-
);
|
220 |
-
}
|
221 |
-
|
222 |
-
}
|
223 |
-
|
224 |
-
function YasrPrintSelectSize () {
|
225 |
-
return (
|
226 |
-
<form>
|
227 |
-
<select value={size} onChange={ yasrSetStarsSize }>
|
228 |
-
<option value="--">{yasrSelectSizeChoose}</option>
|
229 |
-
<option value="small">{yasrSelectSizeSmall}</option>
|
230 |
-
<option value="medium">{yasrSelectSizeMedium}</option>
|
231 |
-
<option value="large">{yasrSelectSizeLarge}</option>
|
232 |
-
</select>
|
233 |
-
</form>
|
234 |
-
);
|
235 |
-
}
|
236 |
-
|
237 |
-
function yasrSetStarsSize(event) {
|
238 |
-
const selected = event.target.querySelector( 'option:checked' );
|
239 |
-
setAttributes( { size: selected.value } );
|
240 |
-
event.preventDefault();
|
241 |
-
}
|
242 |
-
|
243 |
-
function YasrPrintInputId() {
|
244 |
-
return (
|
245 |
-
<div>
|
246 |
-
<input type="text" size="4" onKeyPress={yasrSetPostId} />
|
247 |
-
</div>
|
248 |
-
);
|
249 |
-
}
|
250 |
-
|
251 |
-
function yasrSetPostId (event) {
|
252 |
-
if (event.key === 'Enter') {
|
253 |
-
const postIdValue = event.target.value;
|
254 |
-
|
255 |
-
//postID is always a string, here I check if this string is made only by digits
|
256 |
-
var isNum = /^\d+$/.test(postIdValue);
|
257 |
-
|
258 |
-
if (isNum === true) {
|
259 |
-
setAttributes({postId: postIdValue})
|
260 |
-
}
|
261 |
-
event.preventDefault();
|
262 |
-
}
|
263 |
-
}
|
264 |
-
|
265 |
-
function YasrOverallPanel (props) {
|
266 |
-
|
267 |
-
return (
|
268 |
-
<InspectorControls>
|
269 |
-
<div class="yasr-guten-block-panel yasr-guten-block-panel-center">
|
270 |
-
<YasrDivRatingOverall />
|
271 |
-
</div>
|
272 |
-
|
273 |
-
<PanelBody title='Settings'>
|
274 |
-
<h3>{yasrOptionalText}</h3>
|
275 |
-
|
276 |
-
<div className="yasr-guten-block-panel">
|
277 |
-
<label>{yasrLabelSelectSize}</label>
|
278 |
-
<div>
|
279 |
-
<YasrPrintSelectSize />
|
280 |
-
</div>
|
281 |
-
</div>
|
282 |
-
|
283 |
-
<div className="yasr-guten-block-panel">
|
284 |
-
<label>Post ID</label>
|
285 |
-
<YasrPrintInputId/>
|
286 |
-
<div className="yasr-guten-block-explain">
|
287 |
-
{yasrLeaveThisBlankText}
|
288 |
-
</div>
|
289 |
-
</div>
|
290 |
-
|
291 |
-
<div className="yasr-guten-block-panel">
|
292 |
-
{yasrOverallDescription}
|
293 |
-
</div>
|
294 |
-
</PanelBody>
|
295 |
-
</InspectorControls>
|
296 |
-
);
|
297 |
-
|
298 |
-
}
|
299 |
-
|
300 |
-
return (
|
301 |
-
<Fragment>
|
302 |
-
<YasrOverallPanel />
|
303 |
-
<div className={ props.className }>
|
304 |
-
[yasr_overall_rating{sizeAttribute}{postIdAttribute}]
|
305 |
-
{isSelected && <YasrPrintSelectSize />}
|
306 |
-
</div>
|
307 |
-
</Fragment>
|
308 |
-
);
|
309 |
-
},
|
310 |
-
|
311 |
-
/**
|
312 |
-
* The save function defines the way in which the different attributes should be combined
|
313 |
-
* into the final markup, which is then serialized by Gutenberg into post_content.
|
314 |
-
*
|
315 |
-
* The "save" property must be specified and must be a valid function.
|
316 |
-
*
|
317 |
-
* @link https://wordpress.org/gutenberg/handbook/block-api/block-edit-save/
|
318 |
-
*/
|
319 |
-
save:
|
320 |
-
function( props ) {
|
321 |
-
const {attributes: {size, postId}} = props;
|
322 |
-
|
323 |
-
let yasrOverallAttributes = null;
|
324 |
-
|
325 |
-
if (size) {
|
326 |
-
yasrOverallAttributes += ' size="' +size+ '"';
|
327 |
-
}
|
328 |
-
if (postId) {
|
329 |
-
yasrOverallAttributes += ' postid="'+postId+'"';
|
330 |
-
}
|
331 |
-
|
332 |
-
return (
|
333 |
-
<div>[yasr_overall_rating {yasrOverallAttributes}]</div>
|
334 |
-
);
|
335 |
-
},
|
336 |
-
|
337 |
-
});
|
338 |
-
|
339 |
-
registerBlockType(
|
340 |
-
'yet-another-stars-rating/yasr-visitor-votes', {
|
341 |
-
|
342 |
-
title: __( 'Yasr: Visitor Votes', 'yet-another-stars-rating' ),
|
343 |
-
description: __('Insert the ability for your visitors to vote', 'yet-another-stars-rating'),
|
344 |
-
icon: 'star-half',
|
345 |
-
category: 'yet-another-stars-rating',
|
346 |
-
keywords: [
|
347 |
-
__('rating', 'yet-another-stars-rating'),
|
348 |
-
__('visitor', 'yet-another-stars-rating'),
|
349 |
-
__('votes', 'yet-another-stars-rating')
|
350 |
-
],
|
351 |
-
attributes: {
|
352 |
-
//name of the attribute
|
353 |
-
size: {
|
354 |
-
type: 'string',
|
355 |
-
default: '--'
|
356 |
-
},
|
357 |
-
postId: {
|
358 |
-
type: 'number',
|
359 |
-
default: ''
|
360 |
-
},
|
361 |
-
},
|
362 |
-
|
363 |
-
edit:
|
364 |
-
|
365 |
-
function( props ) {
|
366 |
-
|
367 |
-
const { attributes: { size, postId }, setAttributes, isSelected } = props;
|
368 |
-
|
369 |
-
let sizeAttribute = null;
|
370 |
-
let postIdAttribute = null;
|
371 |
-
let isNum = false;
|
372 |
-
|
373 |
-
isNum = /^\d+$/.test(postId);
|
374 |
-
|
375 |
-
if (size !== '--') {
|
376 |
-
sizeAttribute = ' size="' + size + '"';
|
377 |
-
}
|
378 |
-
|
379 |
-
if (postId && isNum === true) {
|
380 |
-
postIdAttribute = ' postid="' +postId + '"';
|
381 |
-
}
|
382 |
-
|
383 |
-
|
384 |
-
function YasrPrintSelectSize () {
|
385 |
-
return (
|
386 |
-
<form>
|
387 |
-
<select value={size} onChange={ yasrSetStarsSize }>
|
388 |
-
<option value="--">{yasrSelectSizeChoose}</option>
|
389 |
-
<option value="small">{yasrSelectSizeSmall}</option>
|
390 |
-
<option value="medium">{yasrSelectSizeMedium}</option>
|
391 |
-
<option value="large">{yasrSelectSizeLarge}</option>
|
392 |
-
</select>
|
393 |
-
</form>
|
394 |
-
);
|
395 |
-
}
|
396 |
-
|
397 |
-
function yasrSetStarsSize(event) {
|
398 |
-
const selected = event.target.querySelector( 'option:checked' );
|
399 |
-
setAttributes( { size: selected.value } );
|
400 |
-
event.preventDefault();
|
401 |
-
}
|
402 |
-
|
403 |
-
function YasrPrintInputId() {
|
404 |
-
return (
|
405 |
-
<div>
|
406 |
-
<input type="text" size="4" onKeyPress={yasrSetPostId} />
|
407 |
-
</div>
|
408 |
-
);
|
409 |
-
}
|
410 |
-
|
411 |
-
function yasrSetPostId (event) {
|
412 |
-
if (event.key === 'Enter') {
|
413 |
-
const postIdValue = event.target.value;
|
414 |
-
|
415 |
-
//postID is always a string, here I check if this string is made only by digits
|
416 |
-
var isNum = /^\d+$/.test(postIdValue);
|
417 |
-
|
418 |
-
if (isNum === true) {
|
419 |
-
setAttributes({postId: postIdValue})
|
420 |
-
}
|
421 |
-
event.preventDefault();
|
422 |
-
}
|
423 |
-
}
|
424 |
-
|
425 |
-
function YasrVVPanel (props) {
|
426 |
-
|
427 |
-
return (
|
428 |
-
<InspectorControls>
|
429 |
-
<PanelBody title='Settings'>
|
430 |
-
<h3>{yasrOptionalText}</h3>
|
431 |
-
|
432 |
-
<div className="yasr-guten-block-panel">
|
433 |
-
<label>{yasrLabelSelectSize}</label>
|
434 |
-
<div>
|
435 |
-
<YasrPrintSelectSize />
|
436 |
-
</div>
|
437 |
-
</div>
|
438 |
-
|
439 |
-
<div className="yasr-guten-block-panel">
|
440 |
-
<label>Post ID</label>
|
441 |
-
<YasrPrintInputId/>
|
442 |
-
<div className="yasr-guten-block-explain">
|
443 |
-
{yasrLeaveThisBlankText}
|
444 |
-
</div>
|
445 |
-
</div>
|
446 |
-
|
447 |
-
<div className="yasr-guten-block-panel">
|
448 |
-
{yasrVisitorVotesDescription}
|
449 |
-
</div>
|
450 |
-
</PanelBody>
|
451 |
-
</InspectorControls>
|
452 |
-
);
|
453 |
-
|
454 |
-
}
|
455 |
-
|
456 |
-
return (
|
457 |
-
<Fragment>
|
458 |
-
<YasrVVPanel />
|
459 |
-
<div className={props.className}>
|
460 |
-
[yasr_visitor_votes{sizeAttribute}{postIdAttribute}]
|
461 |
-
{isSelected && <YasrPrintSelectSize />}
|
462 |
-
</div>
|
463 |
-
</Fragment>
|
464 |
-
);
|
465 |
-
},
|
466 |
-
|
467 |
-
/**
|
468 |
-
* The save function defines the way in which the different attributes should be combined
|
469 |
-
* into the final markup, which is then serialized by Gutenberg into post_content.
|
470 |
-
*
|
471 |
-
* The "save" property must be specified and must be a valid function.
|
472 |
-
*
|
473 |
-
* @link https://wordpress.org/gutenberg/handbook/block-api/block-edit-save/
|
474 |
-
*/
|
475 |
-
save:
|
476 |
-
function( props ) {
|
477 |
-
const { attributes: {size, postId} } = props;
|
478 |
-
|
479 |
-
let yasrVVAttributes = null;
|
480 |
-
|
481 |
-
if (size) {
|
482 |
-
yasrVVAttributes += ' size="' +size+ '"';
|
483 |
-
}
|
484 |
-
if (postId) {
|
485 |
-
yasrVVAttributes += ' postid="'+postId+'"';
|
486 |
-
}
|
487 |
-
|
488 |
-
return (
|
489 |
-
<div>[yasr_visitor_votes {yasrVVAttributes}]</div>
|
490 |
-
);
|
491 |
-
},
|
492 |
-
|
493 |
-
});
|
494 |
-
|
495 |
-
registerBlockType(
|
496 |
-
'yet-another-stars-rating/overall-rating-ranking', {
|
497 |
-
|
498 |
-
title: __('Yasr: Top 10 Reviews', 'yet-another-stars-rating'),
|
499 |
-
description: __(
|
500 |
-
'This ranking shows the highest rated posts rated through the overall_rating shortcode.',
|
501 |
-
'yet-another-stars-rating'
|
502 |
-
),
|
503 |
-
icon: 'star-half',
|
504 |
-
category: 'yet-another-stars-rating',
|
505 |
-
keywords: [
|
506 |
-
__('ranking', 'yet-another-stars-rating'),
|
507 |
-
__('highest', 'yet-another-stars-rating'),
|
508 |
-
__('chart', 'yet-another-stars-rating')
|
509 |
-
],
|
510 |
-
|
511 |
-
edit:
|
512 |
-
function(props) {
|
513 |
-
return (
|
514 |
-
<Fragment>
|
515 |
-
<YasrNoSettingsPanel />
|
516 |
-
<div className={props.className}>
|
517 |
-
[yasr_top_ten_highest_rated]
|
518 |
-
</div>
|
519 |
-
</Fragment>
|
520 |
-
);
|
521 |
-
},
|
522 |
-
|
523 |
-
|
524 |
-
/**
|
525 |
-
* The save function defines the way in which the different attributes should be combined
|
526 |
-
* into the final markup, which is then serialized by Gutenberg into post_content.
|
527 |
-
*
|
528 |
-
* The "save" property must be specified and must be a valid function.
|
529 |
-
*
|
530 |
-
* @link https://wordpress.org/gutenberg/handbook/block-api/block-edit-save/
|
531 |
-
*/
|
532 |
-
save:
|
533 |
-
function(props) {
|
534 |
-
return (
|
535 |
-
<div>[yasr_top_ten_highest_rated]</div>
|
536 |
-
);
|
537 |
-
},
|
538 |
-
|
539 |
-
});
|
540 |
-
|
541 |
-
registerBlockType(
|
542 |
-
'yet-another-stars-rating/visitor-votes-ranking', {
|
543 |
-
|
544 |
-
title: __('Yasr: Top 10 By Visitors Votes', 'yet-another-stars-rating'),
|
545 |
-
description: __(
|
546 |
-
'This ranking shows both the highest and most rated posts rated through the yasr_visitor_votes shortcode. For an item to appear in this chart, it has to be rated at least twice. ',
|
547 |
-
'yet-another-stars-rating'
|
548 |
-
),
|
549 |
-
icon: 'star-half',
|
550 |
-
category: 'yet-another-stars-rating',
|
551 |
-
keywords: [
|
552 |
-
__('ranking', 'yet-another-stars-rating'),
|
553 |
-
__('highest', 'yet-another-stars-rating'),
|
554 |
-
__('most', 'yet-another-stars-rating'),
|
555 |
-
__('chart', 'yet-another-stars-rating')
|
556 |
-
],
|
557 |
-
|
558 |
-
edit:
|
559 |
-
|
560 |
-
function(props) {
|
561 |
-
|
562 |
-
return (
|
563 |
-
<Fragment>
|
564 |
-
<YasrNoSettingsPanel />
|
565 |
-
<div className={props.className}>
|
566 |
-
[yasr_most_or_highest_rated_posts]
|
567 |
-
</div>
|
568 |
-
</Fragment>
|
569 |
-
);
|
570 |
-
},
|
571 |
-
|
572 |
-
/**
|
573 |
-
* The save function defines the way in which the different attributes should be combined
|
574 |
-
* into the final markup, which is then serialized by Gutenberg into post_content.
|
575 |
-
*
|
576 |
-
* The "save" property must be specified and must be a valid function.
|
577 |
-
*
|
578 |
-
* @link https://wordpress.org/gutenberg/handbook/block-api/block-edit-save/
|
579 |
-
*/
|
580 |
-
save:
|
581 |
-
function(props) {
|
582 |
-
return (
|
583 |
-
<div>[yasr_most_or_highest_rated_posts]</div>
|
584 |
-
);
|
585 |
-
},
|
586 |
-
|
587 |
-
});
|
588 |
-
|
589 |
-
registerBlockType(
|
590 |
-
'yet-another-stars-rating/most-active-reviewers', {
|
591 |
-
|
592 |
-
title: __('Yasr: Most Active Authors', 'yet-another-stars-rating'),
|
593 |
-
description: __('This ranking shows the 5 most active reviewers on your site.',
|
594 |
-
'yet-another-stars-rating'
|
595 |
-
),
|
596 |
-
icon: 'star-half',
|
597 |
-
category: 'yet-another-stars-rating',
|
598 |
-
keywords: [
|
599 |
-
__('ranking', 'yet-another-stars-rating'),
|
600 |
-
__('highest', 'yet-another-stars-rating'),
|
601 |
-
__('most', 'yet-another-stars-rating'),
|
602 |
-
__('chart', 'yet-another-stars-rating'),
|
603 |
-
__('authors', 'yet-another-stars-rating')
|
604 |
-
],
|
605 |
-
|
606 |
-
edit:
|
607 |
-
|
608 |
-
function(props) {
|
609 |
-
|
610 |
-
return (
|
611 |
-
<Fragment>
|
612 |
-
<YasrNoSettingsPanel />
|
613 |
-
<div className={props.className}>
|
614 |
-
[yasr_top_5_reviewers]
|
615 |
-
</div>
|
616 |
-
</Fragment>
|
617 |
-
);
|
618 |
-
},
|
619 |
-
|
620 |
-
/**
|
621 |
-
* The save function defines the way in which the different attributes should be combined
|
622 |
-
* into the final markup, which is then serialized by Gutenberg into post_content.
|
623 |
-
*
|
624 |
-
* The "save" property must be specified and must be a valid function.
|
625 |
-
*
|
626 |
-
* @link https://wordpress.org/gutenberg/handbook/block-api/block-edit-save/
|
627 |
-
*/
|
628 |
-
save:
|
629 |
-
function(props) {
|
630 |
-
return (
|
631 |
-
<div>[yasr_top_5_reviewers]</div>
|
632 |
-
);
|
633 |
-
},
|
634 |
-
|
635 |
-
});
|
636 |
-
|
637 |
-
registerBlockType(
|
638 |
-
'yet-another-stars-rating/most-active-users', {
|
639 |
-
|
640 |
-
title: __('Yasr: Most Active Visitors', 'yet-another-stars-rating'),
|
641 |
-
description: __('This ranking shows the 10 most active users, displaying the login name if logged in or “Anonymous” if not.',
|
642 |
-
'yet-another-stars-rating'
|
643 |
-
),
|
644 |
-
icon: 'star-half',
|
645 |
-
category: 'yet-another-stars-rating',
|
646 |
-
keywords: [
|
647 |
-
__('ranking', 'yet-another-stars-rating'),
|
648 |
-
__('highest', 'yet-another-stars-rating'),
|
649 |
-
__('most', 'yet-another-stars-rating'),
|
650 |
-
__('chart', 'yet-another-stars-rating'),
|
651 |
-
__('visitors', 'yet-another-stars-rating')
|
652 |
-
],
|
653 |
-
|
654 |
-
edit:
|
655 |
-
|
656 |
-
function(props) {
|
657 |
-
|
658 |
-
return (
|
659 |
-
<Fragment>
|
660 |
-
<YasrNoSettingsPanel />
|
661 |
-
<div className={props.className}>
|
662 |
-
[yasr_top_ten_active_users]
|
663 |
-
</div>
|
664 |
-
</Fragment>
|
665 |
-
);
|
666 |
-
},
|
667 |
-
|
668 |
-
/**
|
669 |
-
* The save function defines the way in which the different attributes should be combined
|
670 |
-
* into the final markup, which is then serialized by Gutenberg into post_content.
|
671 |
-
*
|
672 |
-
* The "save" property must be specified and must be a valid function.
|
673 |
-
*
|
674 |
-
* @link https://wordpress.org/gutenberg/handbook/block-api/block-edit-save/
|
675 |
-
*/
|
676 |
-
save:
|
677 |
-
function(props) {
|
678 |
-
return (
|
679 |
-
<div>[yasr_top_ten_active_users]</div>
|
680 |
-
);
|
681 |
-
},
|
682 |
-
|
683 |
-
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/js/src/yasr-guten-panel.js
DELETED
@@ -1,289 +0,0 @@
|
|
1 |
-
const {registerPlugin} = wp.plugins;
|
2 |
-
const {PluginSidebar, PluginSidebarMoreMenuItem} = wp.editPost;
|
3 |
-
const {TextControl, PanelBody, PanelRow} = wp.components;
|
4 |
-
const {BlockControls,InspectorControls} = wp.editor;
|
5 |
-
|
6 |
-
const yasrDisableAutoInsert = __('Disable auto insert for this post or page?', 'yet-another-stars-rating');
|
7 |
-
const yasrRichSnippetOptions = __('Rich snippet options', 'yet-another-stars-rating');
|
8 |
-
const yasrPostExcluded = __('Is this a review?', 'yet-another-stars-rating');
|
9 |
-
const yasrSelectSnippetTitle = __('Select ItemType ', 'yet-another-stars-rating');
|
10 |
-
|
11 |
-
const ContentBelowSidebar = () => {
|
12 |
-
return <div/>;
|
13 |
-
};
|
14 |
-
|
15 |
-
|
16 |
-
class YasrDivRatingOverall extends React.Component {
|
17 |
-
|
18 |
-
shouldComponentUpdate(nextProps, nextState) {
|
19 |
-
return false;
|
20 |
-
}
|
21 |
-
|
22 |
-
constructor(props) {
|
23 |
-
super(props);
|
24 |
-
this.yasrOverallRateThis = __("Rate this article / item", 'yet-another-stars-rating');
|
25 |
-
this.yasrOverallMoreInfo =
|
26 |
-
__("This is the same value that you find the \"Yasr: Overall Rating\" block.",
|
27 |
-
'yet-another-stars-rating');
|
28 |
-
}
|
29 |
-
|
30 |
-
printDivOverallRater() {
|
31 |
-
return(
|
32 |
-
<div>
|
33 |
-
<div id="overall-rater-panel" ref={()=>
|
34 |
-
raterJs({
|
35 |
-
starSize: 32,
|
36 |
-
step: 0.1,
|
37 |
-
showToolTip: false,
|
38 |
-
rating: wp.data.select('core/editor').getCurrentPost().meta.yasr_overall_rating,
|
39 |
-
readOnly: false,
|
40 |
-
element: document.querySelector("#overall-rater-panel"),
|
41 |
-
rateCallback: function(rating, done){
|
42 |
-
|
43 |
-
rating = rating.toFixed(1);
|
44 |
-
rating = parseFloat(rating);
|
45 |
-
|
46 |
-
wp.data.dispatch('core/editor').editPost(
|
47 |
-
{ meta: { yasr_overall_rating: rating } }
|
48 |
-
);
|
49 |
-
|
50 |
-
this.setRating(rating);
|
51 |
-
|
52 |
-
done();
|
53 |
-
}
|
54 |
-
})
|
55 |
-
}
|
56 |
-
/>
|
57 |
-
<br />
|
58 |
-
{this.yasrOverallMoreInfo}
|
59 |
-
</div>
|
60 |
-
)
|
61 |
-
}
|
62 |
-
|
63 |
-
render () {
|
64 |
-
return (
|
65 |
-
<div>
|
66 |
-
{this.yasrOverallRateThis}
|
67 |
-
<div>
|
68 |
-
{this.printDivOverallRater()}
|
69 |
-
</div>
|
70 |
-
</div>
|
71 |
-
|
72 |
-
);
|
73 |
-
}
|
74 |
-
|
75 |
-
}
|
76 |
-
|
77 |
-
class YasrSideBarAutoInsert extends React.Component {
|
78 |
-
|
79 |
-
constructor(props) {
|
80 |
-
super(props);
|
81 |
-
|
82 |
-
let isThisPostExluded = wp.data.select('core/editor').getCurrentPost().meta.yasr_auto_insert_disabled;
|
83 |
-
let isThisPostExludedCheckbox = false;
|
84 |
-
|
85 |
-
if (isThisPostExluded === 'yes') {
|
86 |
-
isThisPostExludedCheckbox = true;
|
87 |
-
}
|
88 |
-
|
89 |
-
this.state = {postExcluded: isThisPostExludedCheckbox};
|
90 |
-
|
91 |
-
this.yasrUpdatePostMetaAutoInsert = this.yasrUpdatePostMetaAutoInsert.bind(this);
|
92 |
-
}
|
93 |
-
|
94 |
-
yasrUpdatePostMetaAutoInsert(event) {
|
95 |
-
const target = event.target;
|
96 |
-
const postExcluded = target.type === 'checkbox' ? target.checked : target.value;
|
97 |
-
|
98 |
-
this.setState({postExcluded: postExcluded});
|
99 |
-
|
100 |
-
if (postExcluded === true) {
|
101 |
-
wp.data.dispatch('core/editor').editPost(
|
102 |
-
{ meta: { yasr_auto_insert_disabled: 'yes' } }
|
103 |
-
);
|
104 |
-
} else {
|
105 |
-
wp.data.dispatch('core/editor').editPost(
|
106 |
-
{ meta: { yasr_auto_insert_disabled: 'no' } }
|
107 |
-
);
|
108 |
-
}
|
109 |
-
}
|
110 |
-
|
111 |
-
render () {
|
112 |
-
return (
|
113 |
-
<div className="yasr-guten-block-panel-center">
|
114 |
-
<hr />
|
115 |
-
<label><span>{yasrDisableAutoInsert}</span></label>
|
116 |
-
<div className="yasr-onoffswitch-big yasr-onoffswitch-big-center" id="yasr-switcher-disable-auto-insert">
|
117 |
-
<input type="checkbox"
|
118 |
-
name="yasr_auto_insert_disabled"
|
119 |
-
className="yasr-onoffswitch-checkbox"
|
120 |
-
value="yes"
|
121 |
-
id="yasr-auto-insert-disabled-switch"
|
122 |
-
defaultChecked={this.state.postExcluded}
|
123 |
-
onChange={this.yasrUpdatePostMetaAutoInsert}
|
124 |
-
/>
|
125 |
-
<label className="yasr-onoffswitch-label" htmlFor="yasr-auto-insert-disabled-switch">
|
126 |
-
<span className="yasr-onoffswitch-inner"/>
|
127 |
-
<span className="yasr-onoffswitch-switch"/>
|
128 |
-
</label>
|
129 |
-
</div>
|
130 |
-
</div>
|
131 |
-
);
|
132 |
-
}
|
133 |
-
|
134 |
-
}
|
135 |
-
|
136 |
-
/*class YasrDivIsReview extends React.Component {
|
137 |
-
|
138 |
-
constructor(props) {
|
139 |
-
super(props);
|
140 |
-
|
141 |
-
let isThisPostReview = wp.data.select('core/editor').getCurrentPost().meta.yasr_post_is_review;
|
142 |
-
let isThisPostReviewCheckbox = false;
|
143 |
-
|
144 |
-
if (isThisPostReview === 'yes') {
|
145 |
-
isThisPostReviewCheckbox = true;
|
146 |
-
}
|
147 |
-
|
148 |
-
this.state = {postIsReview: isThisPostReviewCheckbox};
|
149 |
-
|
150 |
-
this.yasrUpdatePostMetaIsReview = this.yasrUpdatePostMetaIsReview.bind(this);
|
151 |
-
}
|
152 |
-
|
153 |
-
yasrUpdatePostMetaIsReview(event) {
|
154 |
-
|
155 |
-
const target = event.target;
|
156 |
-
const postIsReview = target.type === 'checkbox' ? target.checked : target.value;
|
157 |
-
|
158 |
-
this.setState({postIsReview: postIsReview});
|
159 |
-
|
160 |
-
if (postIsReview === true) {
|
161 |
-
wp.data.dispatch('core/editor').editPost(
|
162 |
-
{ meta: { yasr_post_is_review: 'yes' } }
|
163 |
-
);
|
164 |
-
} else {
|
165 |
-
wp.data.dispatch('core/editor').editPost(
|
166 |
-
{ meta: { yasr_post_is_review: 'no' } }
|
167 |
-
);
|
168 |
-
}
|
169 |
-
|
170 |
-
}
|
171 |
-
|
172 |
-
render () {
|
173 |
-
return (
|
174 |
-
<div className="yasr-guten-block-panel-center">
|
175 |
-
<div className="rich-snippet-title">{yasrRichSnippetOptions}</div>
|
176 |
-
<label><span>{yasrPostExcluded}</span></label>
|
177 |
-
<div className="yasr-onoffswitch-big yasr-onoffswitch-big-center" id="yasr-switcher-post-is-review">
|
178 |
-
<input type="checkbox"
|
179 |
-
name="yasr_post_is_review"
|
180 |
-
className="yasr-onoffswitch-checkbox"
|
181 |
-
value="yes"
|
182 |
-
id="yasr-post-is-review-switch"
|
183 |
-
defaultChecked={this.state.postIsReview}
|
184 |
-
onChange={this.yasrUpdatePostMetaIsReview}
|
185 |
-
/>
|
186 |
-
<label className="yasr-onoffswitch-label" htmlFor="yasr-post-is-review-switch">
|
187 |
-
<span className="yasr-onoffswitch-inner"></span>
|
188 |
-
<span className="yasr-onoffswitch-switch"></span>
|
189 |
-
</label>
|
190 |
-
</div>
|
191 |
-
<p></p>
|
192 |
-
</div>
|
193 |
-
);
|
194 |
-
}
|
195 |
-
|
196 |
-
}
|
197 |
-
|
198 |
-
class YasrSideBarSelectSnippets extends React.Component {
|
199 |
-
|
200 |
-
supportedItemtype;
|
201 |
-
|
202 |
-
constructor(props) {
|
203 |
-
super(props);
|
204 |
-
|
205 |
-
//at the begin, get the default type
|
206 |
-
let snippetType = yasrConstantGutenberg.defaultItemType;
|
207 |
-
|
208 |
-
//get array with all supported itemtypes
|
209 |
-
this.supportedItemtype = wp.data.select('core/editor').getCurrentPost().yasr_all_itemtypes;
|
210 |
-
|
211 |
-
//get postmeta itemtype
|
212 |
-
let postMetaItemType = wp.data.select('core/editor').getCurrentPost().meta.yasr_review_type;
|
213 |
-
|
214 |
-
//if the postmeta is in the array of all item, set in the select the postmeta_itemtype
|
215 |
-
if(this.supportedItemtype.includes(postMetaItemType)) {
|
216 |
-
snippetType = postMetaItemType;
|
217 |
-
}
|
218 |
-
|
219 |
-
this.state = {snippet: snippetType};
|
220 |
-
|
221 |
-
this.yasrSetItemType = this.yasrSetItemType.bind(this);
|
222 |
-
}
|
223 |
-
|
224 |
-
yasrSetItemType(event) {
|
225 |
-
this.setState({snippet: event.target.value});
|
226 |
-
|
227 |
-
wp.data.dispatch( 'core/editor' ).editPost(
|
228 |
-
{ meta: { yasr_review_type: event.target.value } }
|
229 |
-
);
|
230 |
-
}
|
231 |
-
|
232 |
-
render() {
|
233 |
-
return (
|
234 |
-
<div className="yasr-guten-block-panel-center">
|
235 |
-
<label><span>{yasrSelectSnippetTitle}</span></label>
|
236 |
-
<select value={this.state.snippet} onChange={this.yasrSetItemType}>
|
237 |
-
{this.supportedItemtype.map((snippet) => {
|
238 |
-
return <option value={snippet}>{snippet}</option>;
|
239 |
-
})}
|
240 |
-
</select>
|
241 |
-
</div>
|
242 |
-
);
|
243 |
-
}
|
244 |
-
}*/
|
245 |
-
|
246 |
-
class yasrSidebar extends React.Component {
|
247 |
-
|
248 |
-
constructor(props) {
|
249 |
-
super(props);
|
250 |
-
|
251 |
-
let yasrAutoInsertEnabled = false;
|
252 |
-
|
253 |
-
//this is not for the post, but from settings
|
254 |
-
if (yasrConstantGutenberg.autoInsert !== 'disabled') {
|
255 |
-
yasrAutoInsertEnabled = true;
|
256 |
-
}
|
257 |
-
|
258 |
-
this.state = {yasrAutoInsertEnabled: yasrAutoInsertEnabled};
|
259 |
-
|
260 |
-
}
|
261 |
-
|
262 |
-
render() {
|
263 |
-
return (
|
264 |
-
<Fragment>
|
265 |
-
<PluginSidebarMoreMenuItem name="yasr-sidebar" type="sidebar" target="yasr-guten-sidebar" >
|
266 |
-
{ __( 'YASR post settings', 'yet-another-stars-rating' ) }
|
267 |
-
</PluginSidebarMoreMenuItem>
|
268 |
-
<PluginSidebar name="yasr-guten-sidebar" title="YASR Settings">
|
269 |
-
<PanelBody>
|
270 |
-
<div className="yasr-guten-block-panel yasr-guten-block-panel-center">
|
271 |
-
<YasrDivRatingOverall />
|
272 |
-
{this.state.yasrAutoInsertEnabled && <YasrSideBarAutoInsert/>}
|
273 |
-
{wp.hooks.applyFilters( 'yasr_add_content_bottom_sidebar', <ContentBelowSidebar /> )}
|
274 |
-
</div>
|
275 |
-
</PanelBody>
|
276 |
-
</PluginSidebar>
|
277 |
-
</Fragment>
|
278 |
-
);
|
279 |
-
}
|
280 |
-
}
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
//Custom sidebar
|
285 |
-
registerPlugin( 'yasr-sidebar', {
|
286 |
-
icon: 'star-half',
|
287 |
-
title: __( 'Yasr: Page Settings', 'yet-another-stars-rating' ),
|
288 |
-
render: yasrSidebar
|
289 |
-
} );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/js/src/yasr-settings-page.js
CHANGED
@@ -1,98 +1,129 @@
|
|
1 |
/****** Yasr Settings Page ******/
|
2 |
|
3 |
-
|
|
|
4 |
|
5 |
-
|
6 |
-
|
7 |
-
}
|
8 |
-
|
9 |
-
//get active Tab
|
10 |
-
let activeTab = document.getElementsByClassName('nav-tab-active')[0].id;
|
11 |
|
12 |
-
|
13 |
-
|
|
|
14 |
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
|
|
|
|
|
|
|
19 |
|
20 |
-
|
|
|
|
|
|
|
|
|
21 |
jQuery('.yasr-auto-insert-options-class').prop('disabled', true);
|
22 |
}
|
|
|
23 |
|
24 |
-
|
|
|
|
|
|
|
|
|
25 |
jQuery('.yasr-stars-title-options-class').prop('disabled', true);
|
26 |
}
|
|
|
27 |
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
} else {
|
33 |
-
jQuery('.yasr-auto-insert-options-class').prop('disabled', true);
|
34 |
-
}
|
35 |
-
});
|
36 |
|
37 |
-
|
38 |
-
jQuery(
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
|
|
45 |
|
46 |
-
|
47 |
-
if (textBeforeStars === false) {
|
48 |
jQuery(".yasr-general-options-text-before").find(':input').prop('disabled', true);
|
49 |
}
|
50 |
|
51 |
-
|
52 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
53 |
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
jQuery('#yasr-general-options-custom-text-after-visitor').val('[Total: %total_count% Average: %average%]');
|
58 |
-
jQuery('#yasr-general-options-custom-text-must-sign-in').val('You must sign in to vote');
|
59 |
-
jQuery('#yasr-general-options-custom-text-already-rated').val('You have already voted for this article');
|
60 |
|
61 |
-
|
62 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
63 |
}
|
64 |
|
|
|
|
|
|
|
|
|
65 |
});
|
66 |
|
67 |
-
jQuery('#yasr-doc-custom-text-link').on('click', function () {
|
68 |
-
jQuery('#yasr-doc-custom-text-div').toggle('slow');
|
69 |
-
return false;
|
70 |
-
});
|
71 |
|
72 |
-
|
73 |
-
jQuery('#yasr-stats-explained').toggle('slow');
|
74 |
-
return false;
|
75 |
-
});
|
76 |
|
77 |
-
|
78 |
|
|
|
|
|
79 |
|
80 |
-
|
81 |
-
|
|
|
|
|
82 |
|
83 |
-
|
|
|
|
|
|
|
84 |
|
85 |
-
|
86 |
-
jQuery('#yasr-multi-set-doc-box').toggle("slow");
|
87 |
-
});
|
88 |
|
89 |
-
jQuery('#yasr-multi-set-doc-link-hide').on('click', function () {
|
90 |
-
jQuery('#yasr-multi-set-doc-box').toggle("slow");
|
91 |
});
|
92 |
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
counter++;
|
97 |
|
98 |
jQuery("#yasr-add-field-edit-multiset").on('click', function () {
|
@@ -101,152 +132,112 @@ document.addEventListener('DOMContentLoaded', function(event) {
|
|
101 |
jQuery('#yasr-add-field-edit-multiset').hide();
|
102 |
return false;
|
103 |
}
|
104 |
-
|
105 |
var newTextBoxDiv = jQuery(document.createElement('tr'));
|
106 |
newTextBoxDiv.html('<td colspan="2">Element #' + counter + ' <input type="text" name="edit-multi-set-element-' + counter + '" value="" ></td>');
|
107 |
newTextBoxDiv.appendTo("#yasr-table-form-edit-multi-set");
|
108 |
counter++;
|
109 |
});
|
110 |
|
|
|
111 |
|
112 |
-
|
113 |
-
|
114 |
-
if (nMultiSet > 1) {
|
115 |
-
|
116 |
-
//If more then 1 set is used...
|
117 |
-
jQuery('#yasr-button-select-set-edit-form').on("click", function () {
|
118 |
-
|
119 |
-
var data = {
|
120 |
-
action: 'yasr_get_multi_set',
|
121 |
-
set_id: jQuery('#yasr_select_edit_set').val()
|
122 |
-
};
|
123 |
-
|
124 |
-
jQuery.post(ajaxurl, data, function (response) {
|
125 |
-
jQuery('#yasr-multi-set-response').show();
|
126 |
-
jQuery('#yasr-multi-set-response').html(response);
|
127 |
-
});
|
128 |
|
129 |
-
|
130 |
|
131 |
-
|
|
|
|
|
|
|
|
|
132 |
|
133 |
-
|
134 |
-
|
135 |
-
|
|
|
136 |
|
137 |
-
|
138 |
-
if (counter > 9) {
|
139 |
-
jQuery('#yasr-element-limit').show();
|
140 |
-
jQuery('#yasr-add-field-edit-multiset').hide();
|
141 |
-
return false;
|
142 |
-
}
|
143 |
-
var newTextBoxDiv = jQuery(document.createElement('tr'));
|
144 |
-
newTextBoxDiv.html('<td colspan="2">Element #' + counter + ' <input type="text" name="edit-multi-set-element-' + counter + '" value="" ></td>');
|
145 |
-
newTextBoxDiv.appendTo("#yasr-table-form-edit-multi-set");
|
146 |
-
counter++;
|
147 |
-
});
|
148 |
|
149 |
-
|
|
|
150 |
|
151 |
-
|
|
|
|
|
152 |
|
153 |
-
|
154 |
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
);
|
160 |
|
161 |
-
jQuery
|
162 |
-
|
163 |
-
|
164 |
});
|
165 |
|
166 |
-
}
|
167 |
-
|
168 |
-
if (activeTab === 'migration_tools') {
|
169 |
-
jQuery('#yasr-import-ratemypost-submit').on('click', function () {
|
170 |
|
171 |
-
|
172 |
-
document.getElementById('yasr-import-ratemypost-answer').innerHTML = '<img src="'
|
173 |
-
+ yasrCommonDataAdmin.loaderHtml + '"</img>';
|
174 |
|
175 |
-
|
|
|
|
|
176 |
|
177 |
-
|
178 |
-
action: 'yasr_import_ratemypost',
|
179 |
-
nonce: nonce
|
180 |
-
};
|
181 |
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
|
|
|
|
|
|
|
187 |
});
|
188 |
|
189 |
-
|
190 |
|
191 |
-
|
192 |
-
document.getElementById('yasr-import-wppr-answer').innerHTML = '<img src="'
|
193 |
-
+ yasrCommonDataAdmin.loaderHtml + '"</img>';
|
194 |
|
195 |
-
|
|
|
|
|
196 |
|
197 |
-
|
198 |
-
action: 'yasr_import_wppr',
|
199 |
-
nonce: nonce
|
200 |
-
};
|
201 |
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
|
|
|
|
|
|
|
207 |
});
|
208 |
|
209 |
-
|
210 |
|
211 |
-
|
212 |
-
|
213 |
-
+ yasrCommonDataAdmin.loaderHtml + '"</img>';
|
214 |
|
215 |
-
|
|
|
|
|
216 |
|
217 |
-
|
218 |
-
action: 'yasr_import_kksr',
|
219 |
-
nonce: nonce
|
220 |
-
};
|
221 |
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
|
|
|
|
|
|
|
227 |
});
|
228 |
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
//show loader on click
|
233 |
-
document.getElementById('yasr-import-mr-answer').innerHTML = '<img src="'
|
234 |
-
+ yasrCommonDataAdmin.loaderHtml + '"</img>';
|
235 |
-
|
236 |
-
var nonce = document.getElementById('yasr-import-mr-nonce').value;
|
237 |
-
|
238 |
-
var data = {
|
239 |
-
action: 'yasr_import_mr',
|
240 |
-
nonce: nonce
|
241 |
-
};
|
242 |
-
|
243 |
-
jQuery.post(ajaxurl, data, function (response) {
|
244 |
-
//response = JSON.parse(response);
|
245 |
-
document.getElementById('yasr-import-mr-answer').innerHTML = response;
|
246 |
-
});
|
247 |
-
|
248 |
-
});
|
249 |
-
}
|
250 |
-
});
|
251 |
|
252 |
/****** End Yasr Settings Page ******/
|
1 |
/****** Yasr Settings Page ******/
|
2 |
|
3 |
+
//get active Tab
|
4 |
+
export const activeTab = document.getElementsByClassName('nav-tab-active')[0].id;
|
5 |
|
6 |
+
//-------------------General Settings Code---------------------
|
7 |
+
if (activeTab === 'general_settings') {
|
|
|
|
|
|
|
|
|
8 |
|
9 |
+
let autoInsertEnabled = document.getElementById('yasr_auto_insert_switch').checked;
|
10 |
+
let starsTitleEnabled = document.getElementById('yasr-general-options-stars-title-switch').checked;
|
11 |
+
let textBeforeStars = document.getElementById('yasr-general-options-text-before-stars-switch').checked;
|
12 |
|
13 |
+
if (autoInsertEnabled === false) {
|
14 |
+
jQuery('.yasr-auto-insert-options-class').prop('disabled', true);
|
15 |
+
}
|
16 |
|
17 |
+
if(starsTitleEnabled === false) {
|
18 |
+
jQuery('.yasr-stars-title-options-class').prop('disabled', true);
|
19 |
+
}
|
20 |
|
21 |
+
//First Div, for auto insert
|
22 |
+
jQuery('#yasr_auto_insert_switch').change(function () {
|
23 |
+
if (jQuery(this).is(':checked')) {
|
24 |
+
jQuery('.yasr-auto-insert-options-class').prop('disabled', false);
|
25 |
+
} else {
|
26 |
jQuery('.yasr-auto-insert-options-class').prop('disabled', true);
|
27 |
}
|
28 |
+
});
|
29 |
|
30 |
+
//Second Div, for stars title
|
31 |
+
jQuery('#yasr-general-options-stars-title-switch').change(function () {
|
32 |
+
if (jQuery(this).is(':checked')) {
|
33 |
+
jQuery('.yasr-stars-title-options-class').prop('disabled', false);
|
34 |
+
} else {
|
35 |
jQuery('.yasr-stars-title-options-class').prop('disabled', true);
|
36 |
}
|
37 |
+
});
|
38 |
|
39 |
+
//for text before stars
|
40 |
+
if (textBeforeStars === false) {
|
41 |
+
jQuery(".yasr-general-options-text-before").find(':input').prop('disabled', true);
|
42 |
+
}
|
|
|
|
|
|
|
|
|
43 |
|
44 |
+
jQuery('#yasr-general-options-text-before-stars-switch').change(function () {
|
45 |
+
if (jQuery(this).is(':checked')) {
|
46 |
+
|
47 |
+
jQuery(".yasr-general-options-text-before").find(':input').prop('disabled', false);
|
48 |
+
jQuery('#yasr-general-options-custom-text-before-overall').val('Our Score');
|
49 |
+
jQuery('#yasr-general-options-custom-text-before-visitor').val('Click to rate this post!');
|
50 |
+
jQuery('#yasr-general-options-custom-text-after-visitor').val('[Total: %total_count% Average: %average%]');
|
51 |
+
jQuery('#yasr-general-options-custom-text-must-sign-in').val('You must sign in to vote');
|
52 |
+
jQuery('#yasr-general-options-custom-text-already-rated').val('You have already voted for this article');
|
53 |
|
54 |
+
} else {
|
|
|
55 |
jQuery(".yasr-general-options-text-before").find(':input').prop('disabled', true);
|
56 |
}
|
57 |
|
58 |
+
});
|
59 |
+
|
60 |
+
jQuery('#yasr-doc-custom-text-link').on('click', function () {
|
61 |
+
jQuery('#yasr-doc-custom-text-div').toggle('slow');
|
62 |
+
return false;
|
63 |
+
});
|
64 |
+
|
65 |
+
jQuery('#yasr-stats-explained-link').on('click', function () {
|
66 |
+
jQuery('#yasr-stats-explained').toggle('slow');
|
67 |
+
return false;
|
68 |
+
});
|
69 |
+
|
70 |
+
} //End if general settings
|
71 |
+
|
72 |
+
//--------------Multi Sets Page ------------------
|
73 |
+
if (activeTab === 'manage_multi') {
|
74 |
+
|
75 |
+
let nMultiSet = parseInt(document.getElementById('n-multiset').value);
|
76 |
+
|
77 |
+
jQuery('#yasr-multi-set-doc-link').on('click', function () {
|
78 |
+
jQuery('#yasr-multi-set-doc-box').toggle("slow");
|
79 |
+
});
|
80 |
|
81 |
+
jQuery('#yasr-multi-set-doc-link-hide').on('click', function () {
|
82 |
+
jQuery('#yasr-multi-set-doc-box').toggle("slow");
|
83 |
+
});
|
|
|
|
|
|
|
84 |
|
85 |
+
if (nMultiSet === 1) {
|
86 |
+
var counter = jQuery("#yasr-edit-form-number-elements").attr('value');
|
87 |
+
|
88 |
+
counter++;
|
89 |
+
|
90 |
+
jQuery("#yasr-add-field-edit-multiset").on('click', function () {
|
91 |
+
if (counter > 9) {
|
92 |
+
jQuery('#yasr-element-limit').show();
|
93 |
+
jQuery('#yasr-add-field-edit-multiset').hide();
|
94 |
+
return false;
|
95 |
}
|
96 |
|
97 |
+
var newTextBoxDiv = jQuery(document.createElement('tr'));
|
98 |
+
newTextBoxDiv.html('<td colspan="2">Element #' + counter + ' <input type="text" name="edit-multi-set-element-' + counter + '" value="" ></td>');
|
99 |
+
newTextBoxDiv.appendTo("#yasr-table-form-edit-multi-set");
|
100 |
+
counter++;
|
101 |
});
|
102 |
|
|
|
|
|
|
|
|
|
103 |
|
104 |
+
} //End if ($n_multi_set == 1)
|
|
|
|
|
|
|
105 |
|
106 |
+
else if (nMultiSet > 1) {
|
107 |
|
108 |
+
//If more then 1 set is used...
|
109 |
+
jQuery('#yasr-button-select-set-edit-form').on("click", function () {
|
110 |
|
111 |
+
var data = {
|
112 |
+
action: 'yasr_get_multi_set',
|
113 |
+
set_id: jQuery('#yasr_select_edit_set').val()
|
114 |
+
};
|
115 |
|
116 |
+
jQuery.post(ajaxurl, data, function (response) {
|
117 |
+
jQuery('#yasr-multi-set-response').show();
|
118 |
+
jQuery('#yasr-multi-set-response').html(response);
|
119 |
+
});
|
120 |
|
121 |
+
return false; // prevent default click action from happening!
|
|
|
|
|
122 |
|
|
|
|
|
123 |
});
|
124 |
|
125 |
+
jQuery(document).ajaxComplete(function () {
|
126 |
+
var counter = jQuery("#yasr-edit-form-number-elements").attr('value');
|
|
|
127 |
counter++;
|
128 |
|
129 |
jQuery("#yasr-add-field-edit-multiset").on('click', function () {
|
132 |
jQuery('#yasr-add-field-edit-multiset').hide();
|
133 |
return false;
|
134 |
}
|
|
|
135 |
var newTextBoxDiv = jQuery(document.createElement('tr'));
|
136 |
newTextBoxDiv.html('<td colspan="2">Element #' + counter + ' <input type="text" name="edit-multi-set-element-' + counter + '" value="" ></td>');
|
137 |
newTextBoxDiv.appendTo("#yasr-table-form-edit-multi-set");
|
138 |
counter++;
|
139 |
});
|
140 |
|
141 |
+
});
|
142 |
|
143 |
+
} //End if ($n_multi_set > 1)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
144 |
|
145 |
+
} //end if active_tab=='manage_multi'
|
146 |
|
147 |
+
if (activeTab === 'style_options') {
|
148 |
+
wp.codeEditor.initialize(
|
149 |
+
document.getElementById('yasr_style_options_textarea'),
|
150 |
+
yasr_cm_settings
|
151 |
+
);
|
152 |
|
153 |
+
jQuery('#yasr-color-scheme-preview-link').on('click', function () {
|
154 |
+
jQuery('#yasr-color-scheme-preview').toggle('slow');
|
155 |
+
return false; // prevent default click action from happening!
|
156 |
+
});
|
157 |
|
158 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
159 |
|
160 |
+
if (activeTab === 'migration_tools') {
|
161 |
+
jQuery('#yasr-import-ratemypost-submit').on('click', function () {
|
162 |
|
163 |
+
//show loader on click
|
164 |
+
document.getElementById('yasr-import-ratemypost-answer').innerHTML = '<img src="'
|
165 |
+
+ yasrCommonData.loaderHtml + '"</img>';
|
166 |
|
167 |
+
var nonce = document.getElementById('yasr-import-rmp-nonce').value;
|
168 |
|
169 |
+
var data = {
|
170 |
+
action: 'yasr_import_ratemypost',
|
171 |
+
nonce: nonce
|
172 |
+
};
|
|
|
173 |
|
174 |
+
jQuery.post(ajaxurl, data, function (response) {
|
175 |
+
response = JSON.parse(response);
|
176 |
+
document.getElementById('yasr-import-ratemypost-answer').innerHTML = response;
|
177 |
});
|
178 |
|
179 |
+
});
|
|
|
|
|
|
|
180 |
|
181 |
+
jQuery('#yasr-import-wppr-submit').on('click', function () {
|
|
|
|
|
182 |
|
183 |
+
//show loader on click
|
184 |
+
document.getElementById('yasr-import-wppr-answer').innerHTML = '<img src="'
|
185 |
+
+ yasrCommonData.loaderHtml + '"</img>';
|
186 |
|
187 |
+
var nonce = document.getElementById('yasr-import-wppr-nonce').value;
|
|
|
|
|
|
|
188 |
|
189 |
+
var data = {
|
190 |
+
action: 'yasr_import_wppr',
|
191 |
+
nonce: nonce
|
192 |
+
};
|
193 |
|
194 |
+
jQuery.post(ajaxurl, data, function (response) {
|
195 |
+
//response = JSON.parse(response);
|
196 |
+
document.getElementById('yasr-import-wppr-answer').innerHTML = response;
|
197 |
});
|
198 |
|
199 |
+
});
|
200 |
|
201 |
+
jQuery('#yasr-import-kksr-submit').on('click', function () {
|
|
|
|
|
202 |
|
203 |
+
//show loader on click
|
204 |
+
document.getElementById('yasr-import-kksr-answer').innerHTML = '<img src="'
|
205 |
+
+ yasrCommonData.loaderHtml + '"</img>';
|
206 |
|
207 |
+
var nonce = document.getElementById('yasr-import-kksr-nonce').value;
|
|
|
|
|
|
|
208 |
|
209 |
+
var data = {
|
210 |
+
action: 'yasr_import_kksr',
|
211 |
+
nonce: nonce
|
212 |
+
};
|
213 |
|
214 |
+
jQuery.post(ajaxurl, data, function (response) {
|
215 |
+
//response = JSON.parse(response);
|
216 |
+
document.getElementById('yasr-import-kksr-answer').innerHTML = response;
|
217 |
});
|
218 |
|
219 |
+
});
|
220 |
|
221 |
+
//import multi rating
|
222 |
+
jQuery('#yasr-import-mr-submit').on('click', function () {
|
|
|
223 |
|
224 |
+
//show loader on click
|
225 |
+
document.getElementById('yasr-import-mr-answer').innerHTML = '<img src="'
|
226 |
+
+ yasrCommonData.loaderHtml + '"</img>';
|
227 |
|
228 |
+
var nonce = document.getElementById('yasr-import-mr-nonce').value;
|
|
|
|
|
|
|
229 |
|
230 |
+
var data = {
|
231 |
+
action: 'yasr_import_mr',
|
232 |
+
nonce: nonce
|
233 |
+
};
|
234 |
|
235 |
+
jQuery.post(ajaxurl, data, function (response) {
|
236 |
+
//response = JSON.parse(response);
|
237 |
+
document.getElementById('yasr-import-mr-answer').innerHTML = response;
|
238 |
});
|
239 |
|
240 |
+
});
|
241 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
242 |
|
243 |
/****** End Yasr Settings Page ******/
|
admin/js/src/yasr-settings-rankings.js
ADDED
@@ -0,0 +1,218 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import {activeTab} from "./yasr-settings-page";
|
2 |
+
import {yasrDrawRankings} from "../../../includes/js/src/ranking";
|
3 |
+
const { __ } = wp.i18n; // Import __() from wp.i18n
|
4 |
+
|
5 |
+
|
6 |
+
if (activeTab === 'rankings') {
|
7 |
+
|
8 |
+
let elementsClassParents = '.yasr-builder-elements-parents'; //class shared between all elements
|
9 |
+
let elementsClassChilds = '.yasr-builder-elements-childs'; //class shared between all elements
|
10 |
+
|
11 |
+
jQuery(elementsClassParents).prop('disabled', true); //disable all parents elements;
|
12 |
+
jQuery(elementsClassChilds).prop('disabled', true); //disable all childs elements;
|
13 |
+
|
14 |
+
//add action in yasr-settings-page
|
15 |
+
wp.hooks.doAction('yasrBuilderBegin', elementsClassParents, elementsClassChilds);
|
16 |
+
|
17 |
+
let shortcode;
|
18 |
+
let filterShortcodeAttributes = [];
|
19 |
+
|
20 |
+
//initialize shortcode attributes
|
21 |
+
let shortcodeAttributes = yasrReturnShortcodeAttributes();
|
22 |
+
|
23 |
+
shortcode = shortcodeAttributes['name'];
|
24 |
+
document.getElementById('yasr-builder-shortcode').textContent = '['+shortcode+']';
|
25 |
+
document.getElementById('yasr-builder-copy-shortcode').setAttribute('data-shortcode', '['+shortcode+']');
|
26 |
+
|
27 |
+
const previewButton = document.getElementById('yasr-builder-button-preview');
|
28 |
+
const copyButton = document.getElementById('yasr-builder-copy-shortcode');
|
29 |
+
const previewDiv = document.getElementById('yasr-builder-preview');
|
30 |
+
|
31 |
+
//This is the select for data Source
|
32 |
+
const selectDataSource = document.getElementById('yasr-ranking-source');
|
33 |
+
const divView = document.getElementById('builder-vv-default-view');
|
34 |
+
const divVotes = document.getElementById('builder-vv-required-votes');
|
35 |
+
const divSize = document.getElementById('builder-stars-size');
|
36 |
+
const divOverallTxt = document.getElementById('builder-overall-text');
|
37 |
+
const divUsername = document.getElementById('builder-username-options');
|
38 |
+
const divCategory = document.getElementById('builder-category');
|
39 |
+
const divCpt = document.getElementById('builder-cpt');
|
40 |
+
|
41 |
+
let dataSource = selectDataSource.value;
|
42 |
+
let previewClicked = false;
|
43 |
+
|
44 |
+
//if on page load is overall_rating (e.g. on page refresh) text div must be displayed
|
45 |
+
if(dataSource === 'yasr_ov_ranking') {
|
46 |
+
yasrBuilderOvOptions(divOverallTxt, divSize, divView, divVotes, divUsername, divCategory, divCpt);
|
47 |
+
}
|
48 |
+
else if(selectDataSource.value === 'yasr_most_active_users' || selectDataSource.value === 'yasr_top_reviewers') {
|
49 |
+
yasrBuilderNoStarsOptions (divOverallTxt, divSize, divView, divVotes, divUsername, divCategory, divCpt);
|
50 |
+
}
|
51 |
+
|
52 |
+
//event listener for all change events
|
53 |
+
document.addEventListener('change', event => {
|
54 |
+
if(event.target.id === 'yasr-ranking-source') {
|
55 |
+
//when event is on main select, be sure the preview div is empty
|
56 |
+
|
57 |
+
previewDiv.innerHTML = '';
|
58 |
+
if(event.target.value === 'yasr_ov_ranking') {
|
59 |
+
yasrBuilderOvOptions (divOverallTxt, divSize, divView, divVotes, divUsername, divCategory, divCpt);
|
60 |
+
}
|
61 |
+
else if(event.target.value === 'yasr_most_active_users' || event.target.value === 'yasr_top_reviewers') {
|
62 |
+
yasrBuilderNoStarsOptions (divOverallTxt, divSize, divView, divVotes, divUsername, divCategory, divCpt);
|
63 |
+
}
|
64 |
+
//By default, show setting for yasr_most_or_highest_rated_posts
|
65 |
+
else {
|
66 |
+
yasrBuilderVvOptions (divOverallTxt, divSize, divView, divVotes, divUsername, divCategory, divCpt)
|
67 |
+
}
|
68 |
+
//be sure shortcodeAttributes is initialized again
|
69 |
+
shortcodeAttributes = yasrReturnShortcodeAttributes();
|
70 |
+
shortcodeAttributes['name'] = event.target.value;
|
71 |
+
shortcode = shortcodeAttributes['name'];
|
72 |
+
}
|
73 |
+
else {
|
74 |
+
//use this filter to add new attributes
|
75 |
+
filterShortcodeAttributes = wp.hooks.applyFilters('yasrBuilderFilterShortcode', shortcodeAttributes);
|
76 |
+
|
77 |
+
//loop the shortcodeAttributes array from 'rows'
|
78 |
+
//and if the key is found in filterShortcodeAttributes make the assigment
|
79 |
+
for(let i=1; shortcodeAttributes.length; i++) {
|
80 |
+
if(filterShortcodeAttributes.hasOwnProperty(shortcodeAttributes[i])) {
|
81 |
+
shortcodeAttributes[i] = filterShortcodeAttributes[i];
|
82 |
+
}
|
83 |
+
}
|
84 |
+
|
85 |
+
shortcode =
|
86 |
+
shortcodeAttributes['name']+
|
87 |
+
shortcodeAttributes['rows']+
|
88 |
+
shortcodeAttributes['view']+
|
89 |
+
shortcodeAttributes['minvotesmost']+
|
90 |
+
shortcodeAttributes['minvoteshg']+
|
91 |
+
shortcodeAttributes['size']+
|
92 |
+
shortcodeAttributes['txtPosition']+
|
93 |
+
shortcodeAttributes['txt']+
|
94 |
+
shortcodeAttributes['display']+
|
95 |
+
shortcodeAttributes['category']+
|
96 |
+
shortcodeAttributes['cpt'];
|
97 |
+
|
98 |
+
}
|
99 |
+
|
100 |
+
document.getElementById('yasr-builder-shortcode').textContent = '['+shortcode+']';
|
101 |
+
document.getElementById('yasr-builder-copy-shortcode').setAttribute('data-shortcode', '['+shortcode+']');
|
102 |
+
|
103 |
+
//If the previewButton was already clicked, and if the event is no the select, make fetch again
|
104 |
+
if(previewClicked === true && event.target.id !== 'yasr-ranking-source' && event.target.name !== 'yasr-builder-category-radio') {
|
105 |
+
yasrBuilderDoFetch(event);
|
106 |
+
}
|
107 |
+
});
|
108 |
+
|
109 |
+
|
110 |
+
|
111 |
+
//event listener click on button
|
112 |
+
copyButton.onclick = function (event) {
|
113 |
+
let el = document.getElementById(event.target.id);
|
114 |
+
copyToClipboard(el.getAttribute("data-shortcode"));
|
115 |
+
}
|
116 |
+
|
117 |
+
previewButton.onclick = function (event) {
|
118 |
+
yasrBuilderDoFetch(event);
|
119 |
+
previewClicked = true;
|
120 |
+
}
|
121 |
+
|
122 |
+
function yasrBuilderDoFetch(event) {
|
123 |
+
const shortcode = selectDataSource.value
|
124 |
+
const fullShortcode = document.getElementById('yasr-builder-shortcode').textContent;
|
125 |
+
fetch(ajaxurl +'?action=yasr_rankings_preview_shortcode&shortcode='+shortcode+'&full_shortcode='+fullShortcode)
|
126 |
+
.then(response => {
|
127 |
+
if (response.ok === true) {
|
128 |
+
return response.json();
|
129 |
+
} else {
|
130 |
+
console.info(__('Ajax Call Failed. Shortcode preview can\'t be done', 'yet-another-stars-rating'));
|
131 |
+
return 'KO';
|
132 |
+
}
|
133 |
+
})
|
134 |
+
.catch((error) => {
|
135 |
+
console.info(error);
|
136 |
+
})
|
137 |
+
.then(response => {
|
138 |
+
if (response !== 'KO') {
|
139 |
+
let newDiv = document.createElement('div');
|
140 |
+
newDiv.innerHTML = response;
|
141 |
+
|
142 |
+
//if a child already exists, replace it
|
143 |
+
if (previewDiv.childNodes.length > 0) {
|
144 |
+
previewDiv.replaceChild(newDiv, previewDiv.childNodes[0]);
|
145 |
+
} else {
|
146 |
+
previewDiv.appendChild(newDiv);
|
147 |
+
}
|
148 |
+
}
|
149 |
+
})
|
150 |
+
.then(response => {
|
151 |
+
if (shortcode === 'yasr_ov_ranking' || shortcode === 'yasr_most_or_highest_rated_posts') {
|
152 |
+
yasrDrawRankings();
|
153 |
+
}
|
154 |
+
})
|
155 |
+
}
|
156 |
+
|
157 |
+
/**
|
158 |
+
* This function return the default array for shortcode attributes
|
159 |
+
*
|
160 |
+
* @return {{txt: string, size: string, txtPosition: string, name: string, rows: string}}
|
161 |
+
*/
|
162 |
+
function yasrReturnShortcodeAttributes() {
|
163 |
+
return {
|
164 |
+
name: 'yasr_most_or_highest_rated_posts',
|
165 |
+
rows: '',
|
166 |
+
size: '',
|
167 |
+
view: '',
|
168 |
+
minvotesmost: '',
|
169 |
+
minvoteshg: '',
|
170 |
+
txtPosition: '',
|
171 |
+
txt: '',
|
172 |
+
display: '',
|
173 |
+
category: '',
|
174 |
+
cpt: ''
|
175 |
+
};
|
176 |
+
}
|
177 |
+
|
178 |
+
|
179 |
+
function yasrBuilderOvOptions (divOverallTxt, divSize, divView, divVotes, divUsername, divCategory, divCpt) {
|
180 |
+
//show custom text for overall
|
181 |
+
divOverallTxt.style.display = '';
|
182 |
+
divSize.style.display = '';
|
183 |
+
divCategory.style.display = '';
|
184 |
+
divView.style.display = 'none';
|
185 |
+
divVotes.style.display = 'none';
|
186 |
+
divUsername.style.display = 'none';
|
187 |
+
if(divCpt !== null) {
|
188 |
+
divCpt.style.display = '';
|
189 |
+
}
|
190 |
+
|
191 |
+
}
|
192 |
+
|
193 |
+
function yasrBuilderVvOptions (divOverallTxt, divSize, divView, divVotes, divUsername, divCategory, divCpt) {
|
194 |
+
divView.style.display = ''
|
195 |
+
divVotes.style.display = '';
|
196 |
+
divSize.style.display = '';
|
197 |
+
divCategory.style.display = '';
|
198 |
+
divOverallTxt.style.display = 'none';
|
199 |
+
divUsername.style.display = 'none';
|
200 |
+
if(divCpt !== null) {
|
201 |
+
divCpt.style.display = '';
|
202 |
+
}
|
203 |
+
}
|
204 |
+
|
205 |
+
function yasrBuilderNoStarsOptions (divOverallTxt, divSize, divView, divVotes, divUsername, divCategory, divCpt) {
|
206 |
+
divUsername.style.display = '';
|
207 |
+
divOverallTxt.style.display = 'none';
|
208 |
+
divView.style.display = 'none';
|
209 |
+
divVotes.style.display = 'none';
|
210 |
+
divSize.style.display = 'none';
|
211 |
+
divCategory.style.display = 'none';
|
212 |
+
|
213 |
+
if(divCpt !== null) {
|
214 |
+
divCpt.style.display = 'none';
|
215 |
+
}
|
216 |
+
}
|
217 |
+
|
218 |
+
}
|
admin/js/yasr-admin.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(e){var
|
1 |
+
!function(e){var a={};function o(t){if(a[t])return a[t].exports;var r=a[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,o),r.l=!0,r.exports}o.m=e,o.c=a,o.d=function(e,a,t){o.o(e,a)||Object.defineProperty(e,a,{enumerable:!0,get:t})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,a){if(1&a&&(e=o(e)),8&a)return e;if(4&a&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(o.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&a&&"string"!=typeof e)for(var r in e)o.d(t,r,function(a){return e[a]}.bind(null,r));return t},o.n=function(e){var a=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(a,"a",a),a},o.o=function(e,a){return Object.prototype.hasOwnProperty.call(e,a)},o.p="",o(o.s=0)}([function(e,a,o){o(1),e.exports=o(2)},function(e,a){copyToClipboard=e=>{const a=document.createElement("textarea");a.value=e,a.setAttribute("readonly",""),a.style.position="absolute",a.style.left="-9999px",document.body.appendChild(a),a.select(),document.execCommand("copy"),document.body.removeChild(a)},tippy(document.querySelectorAll(".yasr-copy-shortcode"),{content:"Copied! Insert into your post!",theme:"yasr",arrow:"true",arrowType:"round",trigger:"click"})},function(e,a){jQuery(document).ready((function(){jQuery(".yasr-log-pagenum").on("click",(function(){jQuery("#yasr-loader-log-metabox").show();var e={action:"yasr_change_log_page",pagenum:jQuery(this).val(),totalpages:jQuery("#yasr-log-total-pages").data("yasr-log-total-pages")};jQuery.post(ajaxurl,e,(function(e){jQuery("#yasr-loader-log-metabox").hide(),jQuery("#yasr-log-container").html(e)}))})),jQuery(document).ajaxComplete((function(e,a,o){var t=!0;void 0!==o.data&&(t=o.data.search("action=yasr_change_log_page")),-1!==t&&jQuery(".yasr-log-pagenum").on("click",(function(){jQuery("#yasr-loader-log-metabox").show();var e={action:"yasr_change_log_page",pagenum:jQuery(this).val(),totalpages:jQuery("#yasr-log-total-pages").data("yasr-log-total-pages")};jQuery.post(ajaxurl,e,(function(e){jQuery("#yasr-log-container").html(e)}))}))}))})),jQuery(document).ready((function(){jQuery(".yasr-user-log-page-num").on("click",(function(){jQuery("#yasr-loader-user-log-metabox").show();var e={action:"yasr_change_user_log_page",pagenum:jQuery(this).val(),totalpages:jQuery("#yasr-user-log-total-pages").data("yasr-log-total-pages")};jQuery.post(ajaxurl,e,(function(e){jQuery("#yasr-loader-log-metabox").hide(),jQuery("#yasr-user-log-container").html(e)}))})),jQuery(document).ajaxComplete((function(e,a,o){void 0!==o.data&&-1!==o.data.search("action=yasr_change_user_log_page")&&jQuery(".yasr-user-log-page-num").on("click",(function(){jQuery("#yasr-loader-user-log-metabox").show();var e={action:"yasr_change_user_log_page",pagenum:jQuery(this).val(),totalpages:jQuery("#yasr-user-log-total-pages").data("yasr-log-total-pages")};jQuery.post(ajaxurl,e,(function(e){jQuery("#yasr-user-log-container").html(e)}))}))}))}))}]);
|
admin/js/yasr-editor-screen.js
CHANGED
@@ -249,7 +249,7 @@ function yasrPrintAdminMultiSet(setId, postid, moreThanOneMultiSet) {
|
|
249 |
content += '<td><div class="yasr-multiset-admin" id="yasr-multiset-admin-' + valueID + '" data-rating="'
|
250 |
+ valueRating + '" data-multi-idfield="' + valueID + '"></div>';
|
251 |
content += '<span id="yasr-loader-multi-set-field-' + valueID + '" style="display: none">';
|
252 |
-
content += '<img src="' +
|
253 |
content += '</span>';
|
254 |
content += '</td>';
|
255 |
content += '</tr>';
|
249 |
content += '<td><div class="yasr-multiset-admin" id="yasr-multiset-admin-' + valueID + '" data-rating="'
|
250 |
+ valueRating + '" data-multi-idfield="' + valueID + '"></div>';
|
251 |
content += '<span id="yasr-loader-multi-set-field-' + valueID + '" style="display: none">';
|
252 |
+
content += '<img src="' + yasrCommonData.loaderHtml + '" alt="yasr-loader"></span>';
|
253 |
content += '</span>';
|
254 |
content += '</td>';
|
255 |
content += '</tr>';
|
admin/js/yasr-guten-blocks.js
DELETED
@@ -1,772 +0,0 @@
|
|
1 |
-
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
2 |
-
|
3 |
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
4 |
-
|
5 |
-
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
6 |
-
|
7 |
-
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
8 |
-
|
9 |
-
//setting costants
|
10 |
-
var __ = wp.i18n.__; // Import __() from wp.i18n
|
11 |
-
|
12 |
-
var registerBlockType = wp.blocks.registerBlockType; // Import from wp.blocks
|
13 |
-
|
14 |
-
var _wp$components = wp.components,
|
15 |
-
PanelBody = _wp$components.PanelBody,
|
16 |
-
PanelRow = _wp$components.PanelRow;
|
17 |
-
var Fragment = wp.element.Fragment;
|
18 |
-
var _wp$editor = wp.editor,
|
19 |
-
BlockControls = _wp$editor.BlockControls,
|
20 |
-
InspectorControls = _wp$editor.InspectorControls;
|
21 |
-
|
22 |
-
|
23 |
-
var yasrOptionalText = __('All these settings are optional', 'yet-another-stars-rating');
|
24 |
-
|
25 |
-
var yasrLabelSelectSize = __('Choose Size', 'yet-another-stars-rating');
|
26 |
-
|
27 |
-
var yasrSelectSizeChoose = __('Choose stars size', 'yet-another-stars-rating');
|
28 |
-
var yasrSelectSizeSmall = __('Small', 'yet-another-stars-rating');
|
29 |
-
var yasrSelectSizeMedium = __('Medium', 'yet-another-stars-rating');
|
30 |
-
var yasrSelectSizeLarge = __('Large', 'yet-another-stars-rating');
|
31 |
-
|
32 |
-
var yasrLeaveThisBlankText = __('Leave this blank if you don\'t know what you\'re doing.', 'yet-another-stars-rating');
|
33 |
-
|
34 |
-
var yasrOverallDescription = __('Remember: only the post author can rate here.', 'yet-another-stars-rating');
|
35 |
-
var yasrVisitorVotesDescription = __('This is the star set where your users will be able to vote', 'yet-another-stars-rating');
|
36 |
-
|
37 |
-
/******* function to check ajax response *****/
|
38 |
-
/*function checkResponse(res) {
|
39 |
-
if (res.status >= 400 && res.status < 600) {
|
40 |
-
throw new Error(`Failed with status ${res.status}`);
|
41 |
-
}
|
42 |
-
|
43 |
-
return res;
|
44 |
-
}*/
|
45 |
-
|
46 |
-
function YasrProText() {
|
47 |
-
|
48 |
-
var YasrProText1 = __('To be able to customize this ranking, you need', 'yet-another-stars-rating');
|
49 |
-
var YasrProText2 = __('You can buy the plugin, including one year of support, updates and upgrades, on', 'yet-another-stars-rating');
|
50 |
-
|
51 |
-
return React.createElement(
|
52 |
-
'h3',
|
53 |
-
null,
|
54 |
-
YasrProText1,
|
55 |
-
'\xA0',
|
56 |
-
React.createElement(
|
57 |
-
'a',
|
58 |
-
{ href: 'https://yetanotherstarsrating.com/?utm_source=wp-plugin&utm_medium=gutenberg_panel&utm_campaign=yasr_editor_screen&utm_content=rankings#yasr-pro' },
|
59 |
-
'Yasr Pro.'
|
60 |
-
),
|
61 |
-
React.createElement('br', null),
|
62 |
-
YasrProText2,
|
63 |
-
'\xA0',
|
64 |
-
React.createElement(
|
65 |
-
'a',
|
66 |
-
{ href: 'https://yetanotherstarsrating.com/?utm_source=wp-plugin&utm_medium=gutenberg_panel&utm_campaign=yasr_editor_screen&utm_content=rankings' },
|
67 |
-
'yetanotherstarsrating.com'
|
68 |
-
)
|
69 |
-
);
|
70 |
-
}
|
71 |
-
|
72 |
-
function YasrNoSettingsPanel(props) {
|
73 |
-
|
74 |
-
return React.createElement(
|
75 |
-
InspectorControls,
|
76 |
-
null,
|
77 |
-
React.createElement(
|
78 |
-
PanelBody,
|
79 |
-
{ title: 'Settings' },
|
80 |
-
React.createElement(YasrProText, null)
|
81 |
-
)
|
82 |
-
);
|
83 |
-
}
|
84 |
-
|
85 |
-
/*function YasrPrintSelectRows () {
|
86 |
-
|
87 |
-
let optionValueRows = [];
|
88 |
-
|
89 |
-
for (let i=2; i<=30; i++) {
|
90 |
-
if (i === 9) {
|
91 |
-
optionValueRows.push(<option value={i} selected disabled>{i}</option>);
|
92 |
-
} else {
|
93 |
-
optionValueRows.push(<option value={i} disabled>{i}</option>);
|
94 |
-
}
|
95 |
-
|
96 |
-
}
|
97 |
-
|
98 |
-
return(
|
99 |
-
<form>
|
100 |
-
<select>
|
101 |
-
{optionValueRows}
|
102 |
-
</select>
|
103 |
-
<span className="dashicons dashicons-lock"></span>
|
104 |
-
</form>
|
105 |
-
)
|
106 |
-
|
107 |
-
}
|
108 |
-
|
109 |
-
|
110 |
-
function YasrPrintSelectSize () {
|
111 |
-
return (
|
112 |
-
<form>
|
113 |
-
<select>
|
114 |
-
<option value="--">{yasrSelectSizeChoose}</option>
|
115 |
-
<option value="small" disabled>{yasrSelectSizeSmall}</option>
|
116 |
-
<option value="medium" disabled>{yasrSelectSizeMedium}</option>
|
117 |
-
<option value="large" disabled>{yasrSelectSizeLarge}</option>
|
118 |
-
</select>
|
119 |
-
<span className="dashicons dashicons-lock"></span>
|
120 |
-
</form>
|
121 |
-
);
|
122 |
-
}
|
123 |
-
|
124 |
-
function YasrPrintTextPosition () {
|
125 |
-
return (
|
126 |
-
<form>
|
127 |
-
<select>
|
128 |
-
<option value="before" selected disabled>Before</option>
|
129 |
-
<option value="after" disabled>After</option>
|
130 |
-
</select>
|
131 |
-
<span className="dashicons dashicons-lock"></span>
|
132 |
-
</form>
|
133 |
-
);
|
134 |
-
}
|
135 |
-
*/
|
136 |
-
/**
|
137 |
-
* Register: a Gutenberg Block.
|
138 |
-
*
|
139 |
-
* Registers a new block provided a unique name and an object defining its
|
140 |
-
* behavior. Once registered, the block is made editor as an option to any
|
141 |
-
* editor interface where blocks are implemented.
|
142 |
-
*
|
143 |
-
* @link https://wordpress.org/gutenberg/handbook/block-api/
|
144 |
-
* @param {string} name Block name.
|
145 |
-
* @param {Object} settings Block settings.
|
146 |
-
* @return {?WPBlock} The block, if it has been successfully
|
147 |
-
* registered; otherwise `undefined`.
|
148 |
-
*/
|
149 |
-
|
150 |
-
registerBlockType('yet-another-stars-rating/yasr-overall-rating', {
|
151 |
-
title: __('Yasr: Overall Rating', 'yet-another-stars-rating'),
|
152 |
-
description: __('Insert the author rating', ''),
|
153 |
-
icon: 'star-half',
|
154 |
-
category: 'yet-another-stars-rating',
|
155 |
-
keywords: [__('rating', 'yet-another-stars-rating'), __('author', 'yet-another-stars-rating'), __('overall', 'yet-another-stars-rating')],
|
156 |
-
attributes: {
|
157 |
-
overallRatingMeta: {
|
158 |
-
type: 'number',
|
159 |
-
source: 'meta',
|
160 |
-
meta: 'yasr_overall_rating'
|
161 |
-
},
|
162 |
-
size: {
|
163 |
-
type: 'string',
|
164 |
-
default: '--'
|
165 |
-
},
|
166 |
-
postId: {
|
167 |
-
type: 'number',
|
168 |
-
default: ''
|
169 |
-
}
|
170 |
-
},
|
171 |
-
|
172 |
-
edit: function edit(props) {
|
173 |
-
var _props$attributes = props.attributes,
|
174 |
-
overallRatingMeta = _props$attributes.overallRatingMeta,
|
175 |
-
size = _props$attributes.size,
|
176 |
-
postId = _props$attributes.postId,
|
177 |
-
setAttributes = props.setAttributes,
|
178 |
-
isSelected = props.isSelected;
|
179 |
-
|
180 |
-
|
181 |
-
var overallRating = overallRatingMeta;
|
182 |
-
|
183 |
-
var sizeAttribute = null;
|
184 |
-
var postIdAttribute = null;
|
185 |
-
var isNum = false;
|
186 |
-
|
187 |
-
if (size !== '--') {
|
188 |
-
sizeAttribute = ' size="' + size + '"';
|
189 |
-
}
|
190 |
-
|
191 |
-
isNum = /^\d+$/.test(postId);
|
192 |
-
|
193 |
-
if (postId && isNum === true) {
|
194 |
-
postIdAttribute = ' postid="' + postId + '"';
|
195 |
-
}
|
196 |
-
|
197 |
-
var YasrDivRatingOverall = function (_React$Component) {
|
198 |
-
_inherits(YasrDivRatingOverall, _React$Component);
|
199 |
-
|
200 |
-
function YasrDivRatingOverall(props) {
|
201 |
-
_classCallCheck(this, YasrDivRatingOverall);
|
202 |
-
|
203 |
-
var _this = _possibleConstructorReturn(this, (YasrDivRatingOverall.__proto__ || Object.getPrototypeOf(YasrDivRatingOverall)).call(this, props));
|
204 |
-
|
205 |
-
_this.yasrOverallRateThis = __("Rate this article / item", 'yet-another-stars-rating');
|
206 |
-
return _this;
|
207 |
-
}
|
208 |
-
|
209 |
-
_createClass(YasrDivRatingOverall, [{
|
210 |
-
key: 'render',
|
211 |
-
value: function render() {
|
212 |
-
return React.createElement(
|
213 |
-
'div',
|
214 |
-
null,
|
215 |
-
this.yasrOverallRateThis,
|
216 |
-
React.createElement(
|
217 |
-
'div',
|
218 |
-
null,
|
219 |
-
React.createElement('div', { id: 'overall-rater', ref: function ref() {
|
220 |
-
return raterJs({
|
221 |
-
starSize: 32,
|
222 |
-
step: 0.1,
|
223 |
-
showToolTip: false,
|
224 |
-
rating: overallRating,
|
225 |
-
readOnly: false,
|
226 |
-
element: document.querySelector("#overall-rater"),
|
227 |
-
rateCallback: function rateCallback(rating, done) {
|
228 |
-
|
229 |
-
rating = rating.toFixed(1);
|
230 |
-
rating = parseFloat(rating);
|
231 |
-
|
232 |
-
setAttributes({ overallRatingMeta: rating });
|
233 |
-
|
234 |
-
this.setRating(rating);
|
235 |
-
|
236 |
-
done();
|
237 |
-
}
|
238 |
-
});
|
239 |
-
}
|
240 |
-
})
|
241 |
-
)
|
242 |
-
);
|
243 |
-
}
|
244 |
-
}]);
|
245 |
-
|
246 |
-
return YasrDivRatingOverall;
|
247 |
-
}(React.Component);
|
248 |
-
|
249 |
-
function YasrPrintSelectSize() {
|
250 |
-
return React.createElement(
|
251 |
-
'form',
|
252 |
-
null,
|
253 |
-
React.createElement(
|
254 |
-
'select',
|
255 |
-
{ value: size, onChange: yasrSetStarsSize },
|
256 |
-
React.createElement(
|
257 |
-
'option',
|
258 |
-
{ value: '--' },
|
259 |
-
yasrSelectSizeChoose
|
260 |
-
),
|
261 |
-
React.createElement(
|
262 |
-
'option',
|
263 |
-
{ value: 'small' },
|
264 |
-
yasrSelectSizeSmall
|
265 |
-
),
|
266 |
-
React.createElement(
|
267 |
-
'option',
|
268 |
-
{ value: 'medium' },
|
269 |
-
yasrSelectSizeMedium
|
270 |
-
),
|
271 |
-
React.createElement(
|
272 |
-
'option',
|
273 |
-
{ value: 'large' },
|
274 |
-
yasrSelectSizeLarge
|
275 |
-
)
|
276 |
-
)
|
277 |
-
);
|
278 |
-
}
|
279 |
-
|
280 |
-
function yasrSetStarsSize(event) {
|
281 |
-
var selected = event.target.querySelector('option:checked');
|
282 |
-
setAttributes({ size: selected.value });
|
283 |
-
event.preventDefault();
|
284 |
-
}
|
285 |
-
|
286 |
-
function YasrPrintInputId() {
|
287 |
-
return React.createElement(
|
288 |
-
'div',
|
289 |
-
null,
|
290 |
-
React.createElement('input', { type: 'text', size: '4', onKeyPress: yasrSetPostId })
|
291 |
-
);
|
292 |
-
}
|
293 |
-
|
294 |
-
function yasrSetPostId(event) {
|
295 |
-
if (event.key === 'Enter') {
|
296 |
-
var postIdValue = event.target.value;
|
297 |
-
|
298 |
-
//postID is always a string, here I check if this string is made only by digits
|
299 |
-
var isNum = /^\d+$/.test(postIdValue);
|
300 |
-
|
301 |
-
if (isNum === true) {
|
302 |
-
setAttributes({ postId: postIdValue });
|
303 |
-
}
|
304 |
-
event.preventDefault();
|
305 |
-
}
|
306 |
-
}
|
307 |
-
|
308 |
-
function YasrOverallPanel(props) {
|
309 |
-
|
310 |
-
return React.createElement(
|
311 |
-
InspectorControls,
|
312 |
-
null,
|
313 |
-
React.createElement(
|
314 |
-
'div',
|
315 |
-
{ 'class': 'yasr-guten-block-panel yasr-guten-block-panel-center' },
|
316 |
-
React.createElement(YasrDivRatingOverall, null)
|
317 |
-
),
|
318 |
-
React.createElement(
|
319 |
-
PanelBody,
|
320 |
-
{ title: 'Settings' },
|
321 |
-
React.createElement(
|
322 |
-
'h3',
|
323 |
-
null,
|
324 |
-
yasrOptionalText
|
325 |
-
),
|
326 |
-
React.createElement(
|
327 |
-
'div',
|
328 |
-
{ className: 'yasr-guten-block-panel' },
|
329 |
-
React.createElement(
|
330 |
-
'label',
|
331 |
-
null,
|
332 |
-
yasrLabelSelectSize
|
333 |
-
),
|
334 |
-
React.createElement(
|
335 |
-
'div',
|
336 |
-
null,
|
337 |
-
React.createElement(YasrPrintSelectSize, null)
|
338 |
-
)
|
339 |
-
),
|
340 |
-
React.createElement(
|
341 |
-
'div',
|
342 |
-
{ className: 'yasr-guten-block-panel' },
|
343 |
-
React.createElement(
|
344 |
-
'label',
|
345 |
-
null,
|
346 |
-
'Post ID'
|
347 |
-
),
|
348 |
-
React.createElement(YasrPrintInputId, null),
|
349 |
-
React.createElement(
|
350 |
-
'div',
|
351 |
-
{ className: 'yasr-guten-block-explain' },
|
352 |
-
yasrLeaveThisBlankText
|
353 |
-
)
|
354 |
-
),
|
355 |
-
React.createElement(
|
356 |
-
'div',
|
357 |
-
{ className: 'yasr-guten-block-panel' },
|
358 |
-
yasrOverallDescription
|
359 |
-
)
|
360 |
-
)
|
361 |
-
);
|
362 |
-
}
|
363 |
-
|
364 |
-
return React.createElement(
|
365 |
-
Fragment,
|
366 |
-
null,
|
367 |
-
React.createElement(YasrOverallPanel, null),
|
368 |
-
React.createElement(
|
369 |
-
'div',
|
370 |
-
{ className: props.className },
|
371 |
-
'[yasr_overall_rating',
|
372 |
-
sizeAttribute,
|
373 |
-
postIdAttribute,
|
374 |
-
']',
|
375 |
-
isSelected && React.createElement(YasrPrintSelectSize, null)
|
376 |
-
)
|
377 |
-
);
|
378 |
-
},
|
379 |
-
|
380 |
-
/**
|
381 |
-
* The save function defines the way in which the different attributes should be combined
|
382 |
-
* into the final markup, which is then serialized by Gutenberg into post_content.
|
383 |
-
*
|
384 |
-
* The "save" property must be specified and must be a valid function.
|
385 |
-
*
|
386 |
-
* @link https://wordpress.org/gutenberg/handbook/block-api/block-edit-save/
|
387 |
-
*/
|
388 |
-
save: function save(props) {
|
389 |
-
var _props$attributes2 = props.attributes,
|
390 |
-
size = _props$attributes2.size,
|
391 |
-
postId = _props$attributes2.postId;
|
392 |
-
|
393 |
-
|
394 |
-
var yasrOverallAttributes = null;
|
395 |
-
|
396 |
-
if (size) {
|
397 |
-
yasrOverallAttributes += ' size="' + size + '"';
|
398 |
-
}
|
399 |
-
if (postId) {
|
400 |
-
yasrOverallAttributes += ' postid="' + postId + '"';
|
401 |
-
}
|
402 |
-
|
403 |
-
return React.createElement(
|
404 |
-
'div',
|
405 |
-
null,
|
406 |
-
'[yasr_overall_rating ',
|
407 |
-
yasrOverallAttributes,
|
408 |
-
']'
|
409 |
-
);
|
410 |
-
}
|
411 |
-
|
412 |
-
});
|
413 |
-
|
414 |
-
registerBlockType('yet-another-stars-rating/yasr-visitor-votes', {
|
415 |
-
|
416 |
-
title: __('Yasr: Visitor Votes', 'yet-another-stars-rating'),
|
417 |
-
description: __('Insert the ability for your visitors to vote', 'yet-another-stars-rating'),
|
418 |
-
icon: 'star-half',
|
419 |
-
category: 'yet-another-stars-rating',
|
420 |
-
keywords: [__('rating', 'yet-another-stars-rating'), __('visitor', 'yet-another-stars-rating'), __('votes', 'yet-another-stars-rating')],
|
421 |
-
attributes: {
|
422 |
-
//name of the attribute
|
423 |
-
size: {
|
424 |
-
type: 'string',
|
425 |
-
default: '--'
|
426 |
-
},
|
427 |
-
postId: {
|
428 |
-
type: 'number',
|
429 |
-
default: ''
|
430 |
-
}
|
431 |
-
},
|
432 |
-
|
433 |
-
edit: function edit(props) {
|
434 |
-
var _props$attributes3 = props.attributes,
|
435 |
-
size = _props$attributes3.size,
|
436 |
-
postId = _props$attributes3.postId,
|
437 |
-
setAttributes = props.setAttributes,
|
438 |
-
isSelected = props.isSelected;
|
439 |
-
|
440 |
-
|
441 |
-
var sizeAttribute = null;
|
442 |
-
var postIdAttribute = null;
|
443 |
-
var isNum = false;
|
444 |
-
|
445 |
-
isNum = /^\d+$/.test(postId);
|
446 |
-
|
447 |
-
if (size !== '--') {
|
448 |
-
sizeAttribute = ' size="' + size + '"';
|
449 |
-
}
|
450 |
-
|
451 |
-
if (postId && isNum === true) {
|
452 |
-
postIdAttribute = ' postid="' + postId + '"';
|
453 |
-
}
|
454 |
-
|
455 |
-
function YasrPrintSelectSize() {
|
456 |
-
return React.createElement(
|
457 |
-
'form',
|
458 |
-
null,
|
459 |
-
React.createElement(
|
460 |
-
'select',
|
461 |
-
{ value: size, onChange: yasrSetStarsSize },
|
462 |
-
React.createElement(
|
463 |
-
'option',
|
464 |
-
{ value: '--' },
|
465 |
-
yasrSelectSizeChoose
|
466 |
-
),
|
467 |
-
React.createElement(
|
468 |
-
'option',
|
469 |
-
{ value: 'small' },
|
470 |
-
yasrSelectSizeSmall
|
471 |
-
),
|
472 |
-
React.createElement(
|
473 |
-
'option',
|
474 |
-
{ value: 'medium' },
|
475 |
-
yasrSelectSizeMedium
|
476 |
-
),
|
477 |
-
React.createElement(
|
478 |
-
'option',
|
479 |
-
{ value: 'large' },
|
480 |
-
yasrSelectSizeLarge
|
481 |
-
)
|
482 |
-
)
|
483 |
-
);
|
484 |
-
}
|
485 |
-
|
486 |
-
function yasrSetStarsSize(event) {
|
487 |
-
var selected = event.target.querySelector('option:checked');
|
488 |
-
setAttributes({ size: selected.value });
|
489 |
-
event.preventDefault();
|
490 |
-
}
|
491 |
-
|
492 |
-
function YasrPrintInputId() {
|
493 |
-
return React.createElement(
|
494 |
-
'div',
|
495 |
-
null,
|
496 |
-
React.createElement('input', { type: 'text', size: '4', onKeyPress: yasrSetPostId })
|
497 |
-
);
|
498 |
-
}
|
499 |
-
|
500 |
-
function yasrSetPostId(event) {
|
501 |
-
if (event.key === 'Enter') {
|
502 |
-
var postIdValue = event.target.value;
|
503 |
-
|
504 |
-
//postID is always a string, here I check if this string is made only by digits
|
505 |
-
var isNum = /^\d+$/.test(postIdValue);
|
506 |
-
|
507 |
-
if (isNum === true) {
|
508 |
-
setAttributes({ postId: postIdValue });
|
509 |
-
}
|
510 |
-
event.preventDefault();
|
511 |
-
}
|
512 |
-
}
|
513 |
-
|
514 |
-
function YasrVVPanel(props) {
|
515 |
-
|
516 |
-
return React.createElement(
|
517 |
-
InspectorControls,
|
518 |
-
null,
|
519 |
-
React.createElement(
|
520 |
-
PanelBody,
|
521 |
-
{ title: 'Settings' },
|
522 |
-
React.createElement(
|
523 |
-
'h3',
|
524 |
-
null,
|
525 |
-
yasrOptionalText
|
526 |
-
),
|
527 |
-
React.createElement(
|
528 |
-
'div',
|
529 |
-
{ className: 'yasr-guten-block-panel' },
|
530 |
-
React.createElement(
|
531 |
-
'label',
|
532 |
-
null,
|
533 |
-
yasrLabelSelectSize
|
534 |
-
),
|
535 |
-
React.createElement(
|
536 |
-
'div',
|
537 |
-
null,
|
538 |
-
React.createElement(YasrPrintSelectSize, null)
|
539 |
-
)
|
540 |
-
),
|
541 |
-
React.createElement(
|
542 |
-
'div',
|
543 |
-
{ className: 'yasr-guten-block-panel' },
|
544 |
-
React.createElement(
|
545 |
-
'label',
|
546 |
-
null,
|
547 |
-
'Post ID'
|
548 |
-
),
|
549 |
-
React.createElement(YasrPrintInputId, null),
|
550 |
-
React.createElement(
|
551 |
-
'div',
|
552 |
-
{ className: 'yasr-guten-block-explain' },
|
553 |
-
yasrLeaveThisBlankText
|
554 |
-
)
|
555 |
-
),
|
556 |
-
React.createElement(
|
557 |
-
'div',
|
558 |
-
{ className: 'yasr-guten-block-panel' },
|
559 |
-
yasrVisitorVotesDescription
|
560 |
-
)
|
561 |
-
)
|
562 |
-
);
|
563 |
-
}
|
564 |
-
|
565 |
-
return React.createElement(
|
566 |
-
Fragment,
|
567 |
-
null,
|
568 |
-
React.createElement(YasrVVPanel, null),
|
569 |
-
React.createElement(
|
570 |
-
'div',
|
571 |
-
{ className: props.className },
|
572 |
-
'[yasr_visitor_votes',
|
573 |
-
sizeAttribute,
|
574 |
-
postIdAttribute,
|
575 |
-
']',
|
576 |
-
isSelected && React.createElement(YasrPrintSelectSize, null)
|
577 |
-
)
|
578 |
-
);
|
579 |
-
},
|
580 |
-
|
581 |
-
/**
|
582 |
-
* The save function defines the way in which the different attributes should be combined
|
583 |
-
* into the final markup, which is then serialized by Gutenberg into post_content.
|
584 |
-
*
|
585 |
-
* The "save" property must be specified and must be a valid function.
|
586 |
-
*
|
587 |
-
* @link https://wordpress.org/gutenberg/handbook/block-api/block-edit-save/
|
588 |
-
*/
|
589 |
-
save: function save(props) {
|
590 |
-
var _props$attributes4 = props.attributes,
|
591 |
-
size = _props$attributes4.size,
|
592 |
-
postId = _props$attributes4.postId;
|
593 |
-
|
594 |
-
|
595 |
-
var yasrVVAttributes = null;
|
596 |
-
|
597 |
-
if (size) {
|
598 |
-
yasrVVAttributes += ' size="' + size + '"';
|
599 |
-
}
|
600 |
-
if (postId) {
|
601 |
-
yasrVVAttributes += ' postid="' + postId + '"';
|
602 |
-
}
|
603 |
-
|
604 |
-
return React.createElement(
|
605 |
-
'div',
|
606 |
-
null,
|
607 |
-
'[yasr_visitor_votes ',
|
608 |
-
yasrVVAttributes,
|
609 |
-
']'
|
610 |
-
);
|
611 |
-
}
|
612 |
-
|
613 |
-
});
|
614 |
-
|
615 |
-
registerBlockType('yet-another-stars-rating/overall-rating-ranking', {
|
616 |
-
|
617 |
-
title: __('Yasr: Top 10 Reviews', 'yet-another-stars-rating'),
|
618 |
-
description: __('This ranking shows the highest rated posts rated through the overall_rating shortcode.', 'yet-another-stars-rating'),
|
619 |
-
icon: 'star-half',
|
620 |
-
category: 'yet-another-stars-rating',
|
621 |
-
keywords: [__('ranking', 'yet-another-stars-rating'), __('highest', 'yet-another-stars-rating'), __('chart', 'yet-another-stars-rating')],
|
622 |
-
|
623 |
-
edit: function edit(props) {
|
624 |
-
return React.createElement(
|
625 |
-
Fragment,
|
626 |
-
null,
|
627 |
-
React.createElement(YasrNoSettingsPanel, null),
|
628 |
-
React.createElement(
|
629 |
-
'div',
|
630 |
-
{ className: props.className },
|
631 |
-
'[yasr_top_ten_highest_rated]'
|
632 |
-
)
|
633 |
-
);
|
634 |
-
},
|
635 |
-
|
636 |
-
/**
|
637 |
-
* The save function defines the way in which the different attributes should be combined
|
638 |
-
* into the final markup, which is then serialized by Gutenberg into post_content.
|
639 |
-
*
|
640 |
-
* The "save" property must be specified and must be a valid function.
|
641 |
-
*
|
642 |
-
* @link https://wordpress.org/gutenberg/handbook/block-api/block-edit-save/
|
643 |
-
*/
|
644 |
-
save: function save(props) {
|
645 |
-
return React.createElement(
|
646 |
-
'div',
|
647 |
-
null,
|
648 |
-
'[yasr_top_ten_highest_rated]'
|
649 |
-
);
|
650 |
-
}
|
651 |
-
|
652 |
-
});
|
653 |
-
|
654 |
-
registerBlockType('yet-another-stars-rating/visitor-votes-ranking', {
|
655 |
-
|
656 |
-
title: __('Yasr: Top 10 By Visitors Votes', 'yet-another-stars-rating'),
|
657 |
-
description: __('This ranking shows both the highest and most rated posts rated through the yasr_visitor_votes shortcode. For an item to appear in this chart, it has to be rated at least twice. ', 'yet-another-stars-rating'),
|
658 |
-
icon: 'star-half',
|
659 |
-
category: 'yet-another-stars-rating',
|
660 |
-
keywords: [__('ranking', 'yet-another-stars-rating'), __('highest', 'yet-another-stars-rating'), __('most', 'yet-another-stars-rating'), __('chart', 'yet-another-stars-rating')],
|
661 |
-
|
662 |
-
edit: function edit(props) {
|
663 |
-
|
664 |
-
return React.createElement(
|
665 |
-
Fragment,
|
666 |
-
null,
|
667 |
-
React.createElement(YasrNoSettingsPanel, null),
|
668 |
-
React.createElement(
|
669 |
-
'div',
|
670 |
-
{ className: props.className },
|
671 |
-
'[yasr_most_or_highest_rated_posts]'
|
672 |
-
)
|
673 |
-
);
|
674 |
-
},
|
675 |
-
|
676 |
-
/**
|
677 |
-
* The save function defines the way in which the different attributes should be combined
|
678 |
-
* into the final markup, which is then serialized by Gutenberg into post_content.
|
679 |
-
*
|
680 |
-
* The "save" property must be specified and must be a valid function.
|
681 |
-
*
|
682 |
-
* @link https://wordpress.org/gutenberg/handbook/block-api/block-edit-save/
|
683 |
-
*/
|
684 |
-
save: function save(props) {
|
685 |
-
return React.createElement(
|
686 |
-
'div',
|
687 |
-
null,
|
688 |
-
'[yasr_most_or_highest_rated_posts]'
|
689 |
-
);
|
690 |
-
}
|
691 |
-
|
692 |
-
});
|
693 |
-
|
694 |
-
registerBlockType('yet-another-stars-rating/most-active-reviewers', {
|
695 |
-
|
696 |
-
title: __('Yasr: Most Active Authors', 'yet-another-stars-rating'),
|
697 |
-
description: __('This ranking shows the 5 most active reviewers on your site.', 'yet-another-stars-rating'),
|
698 |
-
icon: 'star-half',
|
699 |
-
category: 'yet-another-stars-rating',
|
700 |
-
keywords: [__('ranking', 'yet-another-stars-rating'), __('highest', 'yet-another-stars-rating'), __('most', 'yet-another-stars-rating'), __('chart', 'yet-another-stars-rating'), __('authors', 'yet-another-stars-rating')],
|
701 |
-
|
702 |
-
edit: function edit(props) {
|
703 |
-
|
704 |
-
return React.createElement(
|
705 |
-
Fragment,
|
706 |
-
null,
|
707 |
-
React.createElement(YasrNoSettingsPanel, null),
|
708 |
-
React.createElement(
|
709 |
-
'div',
|
710 |
-
{ className: props.className },
|
711 |
-
'[yasr_top_5_reviewers]'
|
712 |
-
)
|
713 |
-
);
|
714 |
-
},
|
715 |
-
|
716 |
-
/**
|
717 |
-
* The save function defines the way in which the different attributes should be combined
|
718 |
-
* into the final markup, which is then serialized by Gutenberg into post_content.
|
719 |
-
*
|
720 |
-
* The "save" property must be specified and must be a valid function.
|
721 |
-
*
|
722 |
-
* @link https://wordpress.org/gutenberg/handbook/block-api/block-edit-save/
|
723 |
-
*/
|
724 |
-
save: function save(props) {
|
725 |
-
return React.createElement(
|
726 |
-
'div',
|
727 |
-
null,
|
728 |
-
'[yasr_top_5_reviewers]'
|
729 |
-
);
|
730 |
-
}
|
731 |
-
|
732 |
-
});
|
733 |
-
|
734 |
-
registerBlockType('yet-another-stars-rating/most-active-users', {
|
735 |
-
|
736 |
-
title: __('Yasr: Most Active Visitors', 'yet-another-stars-rating'),
|
737 |
-
description: __('This ranking shows the 10 most active users, displaying the login name if logged in or “Anonymous” if not.', 'yet-another-stars-rating'),
|
738 |
-
icon: 'star-half',
|
739 |
-
category: 'yet-another-stars-rating',
|
740 |
-
keywords: [__('ranking', 'yet-another-stars-rating'), __('highest', 'yet-another-stars-rating'), __('most', 'yet-another-stars-rating'), __('chart', 'yet-another-stars-rating'), __('visitors', 'yet-another-stars-rating')],
|
741 |
-
|
742 |
-
edit: function edit(props) {
|
743 |
-
|
744 |
-
return React.createElement(
|
745 |
-
Fragment,
|
746 |
-
null,
|
747 |
-
React.createElement(YasrNoSettingsPanel, null),
|
748 |
-
React.createElement(
|
749 |
-
'div',
|
750 |
-
{ className: props.className },
|
751 |
-
'[yasr_top_ten_active_users]'
|
752 |
-
)
|
753 |
-
);
|
754 |
-
},
|
755 |
-
|
756 |
-
/**
|
757 |
-
* The save function defines the way in which the different attributes should be combined
|
758 |
-
* into the final markup, which is then serialized by Gutenberg into post_content.
|
759 |
-
*
|
760 |
-
* The "save" property must be specified and must be a valid function.
|
761 |
-
*
|
762 |
-
* @link https://wordpress.org/gutenberg/handbook/block-api/block-edit-save/
|
763 |
-
*/
|
764 |
-
save: function save(props) {
|
765 |
-
return React.createElement(
|
766 |
-
'div',
|
767 |
-
null,
|
768 |
-
'[yasr_top_ten_active_users]'
|
769 |
-
);
|
770 |
-
}
|
771 |
-
|
772 |
-
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/js/yasr-guten-panel.js
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
!function(e){var t={};function a(r){if(t[r])return t[r].exports;var n=t[r]={i:r,l:!1,exports:{}};return e[r].call(n.exports,n,n.exports,a),n.l=!0,n.exports}a.m=e,a.c=t,a.d=function(e,t,r){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(a.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)a.d(r,n,function(t){return e[t]}.bind(null,n));return r},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="",a(a.s=0)}([function(e,t,a){e.exports=a(1)},function(e,t){const{registerPlugin:a}=wp.plugins,{PluginSidebar:r,PluginSidebarMoreMenuItem:n}=wp.editPost,{TextControl:s,PanelBody:l,PanelRow:o}=wp.components,{BlockControls:i,InspectorControls:c}=wp.editor,{Fragment:u}=wp.element,d=__("Disable auto insert for this post or page?","yet-another-stars-rating"),p=(__("Rich snippet options","yet-another-stars-rating"),__("Is this a review?","yet-another-stars-rating"),__("Select ItemType ","yet-another-stars-rating"),()=>React.createElement("div",null));class y extends React.Component{shouldComponentUpdate(e,t){return!1}constructor(e){super(e),this.yasrOverallRateThis=__("Rate this article / item","yet-another-stars-rating"),this.yasrOverallMoreInfo=__('This is the same value that you find the "Yasr: Overall Rating" block.',"yet-another-stars-rating")}printDivOverallRater(){return React.createElement("div",null,React.createElement("div",{id:"overall-rater-panel",ref:()=>raterJs({starSize:32,step:.1,showToolTip:!1,rating:wp.data.select("core/editor").getCurrentPost().meta.yasr_overall_rating,readOnly:!1,element:document.querySelector("#overall-rater-panel"),rateCallback:function(e,t){e=e.toFixed(1),e=parseFloat(e),wp.data.dispatch("core/editor").editPost({meta:{yasr_overall_rating:e}}),this.setRating(e),t()}})}),React.createElement("br",null),this.yasrOverallMoreInfo)}render(){return React.createElement("div",null,this.yasrOverallRateThis,React.createElement("div",null,this.printDivOverallRater()))}}class h extends React.Component{constructor(e){super(e);let t=!1;"yes"===wp.data.select("core/editor").getCurrentPost().meta.yasr_auto_insert_disabled&&(t=!0),this.state={postExcluded:t},this.yasrUpdatePostMetaAutoInsert=this.yasrUpdatePostMetaAutoInsert.bind(this)}yasrUpdatePostMetaAutoInsert(e){const t=e.target,a="checkbox"===t.type?t.checked:t.value;this.setState({postExcluded:a}),!0===a?wp.data.dispatch("core/editor").editPost({meta:{yasr_auto_insert_disabled:"yes"}}):wp.data.dispatch("core/editor").editPost({meta:{yasr_auto_insert_disabled:"no"}})}render(){return React.createElement("div",{className:"yasr-guten-block-panel-center"},React.createElement("hr",null),React.createElement("label",null,React.createElement("span",null,d)),React.createElement("div",{className:"yasr-onoffswitch-big yasr-onoffswitch-big-center",id:"yasr-switcher-disable-auto-insert"},React.createElement("input",{type:"checkbox",name:"yasr_auto_insert_disabled",className:"yasr-onoffswitch-checkbox",value:"yes",id:"yasr-auto-insert-disabled-switch",defaultChecked:this.state.postExcluded,onChange:this.yasrUpdatePostMetaAutoInsert}),React.createElement("label",{className:"yasr-onoffswitch-label",htmlFor:"yasr-auto-insert-disabled-switch"},React.createElement("span",{className:"yasr-onoffswitch-inner"}),React.createElement("span",{className:"yasr-onoffswitch-switch"}))))}}class m extends React.Component{constructor(e){super(e);let t=!1;"disabled"!==yasrConstantGutenberg.autoInsert&&(t=!0),this.state={yasrAutoInsertEnabled:t}}render(){return React.createElement(u,null,React.createElement(n,{name:"yasr-sidebar",type:"sidebar",target:"yasr-guten-sidebar"},__("YASR post settings","yet-another-stars-rating")),React.createElement(r,{name:"yasr-guten-sidebar",title:"YASR Settings"},React.createElement(l,null,React.createElement("div",{className:"yasr-guten-block-panel yasr-guten-block-panel-center"},React.createElement(y,null),this.state.yasrAutoInsertEnabled&&React.createElement(h,null),React.createElement(p,null)))))}}a("yasr-sidebar",{icon:"star-half",title:__("Yasr: Page Settings","yet-another-stars-rating"),render:m})}]);
|
|
admin/js/yasr-settings.js
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
!function(e){var t={};function n(r){if(t[r])return t[r].exports;var a=t[r]={i:r,l:!1,exports:{}};return e[r].call(a.exports,a,a.exports,n),a.l=!0,a.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)n.d(r,a,function(t){return e[t]}.bind(null,a));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=4)}([function(e,t,n){"use strict";e.exports=n(5)},function(e,t,n){"use strict";n.r(t),n.d(t,"activeTab",(function(){return r}));var r=document.getElementsByClassName("nav-tab-active")[0].id;if("general_settings"===r){var a=document.getElementById("yasr_auto_insert_switch").checked,l=document.getElementById("yasr-general-options-stars-title-switch").checked,o=document.getElementById("yasr-general-options-text-before-stars-switch").checked;!1===a&&jQuery(".yasr-auto-insert-options-class").prop("disabled",!0),!1===l&&jQuery(".yasr-stars-title-options-class").prop("disabled",!0),jQuery("#yasr_auto_insert_switch").change((function(){jQuery(this).is(":checked")?jQuery(".yasr-auto-insert-options-class").prop("disabled",!1):jQuery(".yasr-auto-insert-options-class").prop("disabled",!0)})),jQuery("#yasr-general-options-stars-title-switch").change((function(){jQuery(this).is(":checked")?jQuery(".yasr-stars-title-options-class").prop("disabled",!1):jQuery(".yasr-stars-title-options-class").prop("disabled",!0)})),!1===o&&jQuery(".yasr-general-options-text-before").find(":input").prop("disabled",!0),jQuery("#yasr-general-options-text-before-stars-switch").change((function(){jQuery(this).is(":checked")?(jQuery(".yasr-general-options-text-before").find(":input").prop("disabled",!1),jQuery("#yasr-general-options-custom-text-before-overall").val("Our Score"),jQuery("#yasr-general-options-custom-text-before-visitor").val("Click to rate this post!"),jQuery("#yasr-general-options-custom-text-after-visitor").val("[Total: %total_count% Average: %average%]"),jQuery("#yasr-general-options-custom-text-must-sign-in").val("You must sign in to vote"),jQuery("#yasr-general-options-custom-text-already-rated").val("You have already voted for this article")):jQuery(".yasr-general-options-text-before").find(":input").prop("disabled",!0)})),jQuery("#yasr-doc-custom-text-link").on("click",(function(){return jQuery("#yasr-doc-custom-text-div").toggle("slow"),!1})),jQuery("#yasr-stats-explained-link").on("click",(function(){return jQuery("#yasr-stats-explained").toggle("slow"),!1}))}if("manage_multi"===r){var i=parseInt(document.getElementById("n-multiset").value);if(jQuery("#yasr-multi-set-doc-link").on("click",(function(){jQuery("#yasr-multi-set-doc-box").toggle("slow")})),jQuery("#yasr-multi-set-doc-link-hide").on("click",(function(){jQuery("#yasr-multi-set-doc-box").toggle("slow")})),1===i){var u=jQuery("#yasr-edit-form-number-elements").attr("value");u++,jQuery("#yasr-add-field-edit-multiset").on("click",(function(){if(u>9)return jQuery("#yasr-element-limit").show(),jQuery("#yasr-add-field-edit-multiset").hide(),!1;var e=jQuery(document.createElement("tr"));e.html('<td colspan="2">Element #'+u+' <input type="text" name="edit-multi-set-element-'+u+'" value="" ></td>'),e.appendTo("#yasr-table-form-edit-multi-set"),u++}))}else i>1&&(jQuery("#yasr-button-select-set-edit-form").on("click",(function(){var e={action:"yasr_get_multi_set",set_id:jQuery("#yasr_select_edit_set").val()};return jQuery.post(ajaxurl,e,(function(e){jQuery("#yasr-multi-set-response").show(),jQuery("#yasr-multi-set-response").html(e)})),!1})),jQuery(document).ajaxComplete((function(){var e=jQuery("#yasr-edit-form-number-elements").attr("value");e++,jQuery("#yasr-add-field-edit-multiset").on("click",(function(){if(e>9)return jQuery("#yasr-element-limit").show(),jQuery("#yasr-add-field-edit-multiset").hide(),!1;var t=jQuery(document.createElement("tr"));t.html('<td colspan="2">Element #'+e+' <input type="text" name="edit-multi-set-element-'+e+'" value="" ></td>'),t.appendTo("#yasr-table-form-edit-multi-set"),e++}))})))}"style_options"===r&&(wp.codeEditor.initialize(document.getElementById("yasr_style_options_textarea"),yasr_cm_settings),jQuery("#yasr-color-scheme-preview-link").on("click",(function(){return jQuery("#yasr-color-scheme-preview").toggle("slow"),!1}))),"migration_tools"===r&&(jQuery("#yasr-import-ratemypost-submit").on("click",(function(){document.getElementById("yasr-import-ratemypost-answer").innerHTML='<img src="'+yasrCommonData.loaderHtml+'"</img>';var e={action:"yasr_import_ratemypost",nonce:document.getElementById("yasr-import-rmp-nonce").value};jQuery.post(ajaxurl,e,(function(e){e=JSON.parse(e),document.getElementById("yasr-import-ratemypost-answer").innerHTML=e}))})),jQuery("#yasr-import-wppr-submit").on("click",(function(){document.getElementById("yasr-import-wppr-answer").innerHTML='<img src="'+yasrCommonData.loaderHtml+'"</img>';var e={action:"yasr_import_wppr",nonce:document.getElementById("yasr-import-wppr-nonce").value};jQuery.post(ajaxurl,e,(function(e){document.getElementById("yasr-import-wppr-answer").innerHTML=e}))})),jQuery("#yasr-import-kksr-submit").on("click",(function(){document.getElementById("yasr-import-kksr-answer").innerHTML='<img src="'+yasrCommonData.loaderHtml+'"</img>';var e={action:"yasr_import_kksr",nonce:document.getElementById("yasr-import-kksr-nonce").value};jQuery.post(ajaxurl,e,(function(e){document.getElementById("yasr-import-kksr-answer").innerHTML=e}))})),jQuery("#yasr-import-mr-submit").on("click",(function(){document.getElementById("yasr-import-mr-answer").innerHTML='<img src="'+yasrCommonData.loaderHtml+'"</img>';var e={action:"yasr_import_mr",nonce:document.getElementById("yasr-import-mr-nonce").value};jQuery.post(ajaxurl,e,(function(e){document.getElementById("yasr-import-mr-answer").innerHTML=e}))})))},function(e,t,n){"use strict";
|
2 |
+
/*
|
3 |
+
object-assign
|
4 |
+
(c) Sindre Sorhus
|
5 |
+
@license MIT
|
6 |
+
*/var r=Object.getOwnPropertySymbols,a=Object.prototype.hasOwnProperty,l=Object.prototype.propertyIsEnumerable;function o(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,i,u=o(e),s=1;s<arguments.length;s++){for(var c in n=Object(arguments[s]))a.call(n,c)&&(u[c]=n[c]);if(r){i=r(n);for(var f=0;f<i.length;f++)l.call(n,i[f])&&(u[i[f]]=n[i[f]])}}return u}},function(e,t,n){"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE){0;try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}}(),e.exports=n(6)},function(e,t,n){n(1),e.exports=n(9)},function(e,t,n){"use strict";
|
7 |
+
/** @license React v17.0.1
|
8 |
+
* react.production.min.js
|
9 |
+
*
|
10 |
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
11 |
+
*
|
12 |
+
* This source code is licensed under the MIT license found in the
|
13 |
+
* LICENSE file in the root directory of this source tree.
|
14 |
+
*/var r=n(2),a=60103,l=60106;t.Fragment=60107,t.StrictMode=60108,t.Profiler=60114;var o=60109,i=60110,u=60112;t.Suspense=60113;var s=60115,c=60116;if("function"==typeof Symbol&&Symbol.for){var f=Symbol.for;a=f("react.element"),l=f("react.portal"),t.Fragment=f("react.fragment"),t.StrictMode=f("react.strict_mode"),t.Profiler=f("react.profiler"),o=f("react.provider"),i=f("react.context"),u=f("react.forward_ref"),t.Suspense=f("react.suspense"),s=f("react.memo"),c=f("react.lazy")}var d="function"==typeof Symbol&&Symbol.iterator;function p(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var m={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},h={};function y(e,t,n){this.props=e,this.context=t,this.refs=h,this.updater=n||m}function g(){}function v(e,t,n){this.props=e,this.context=t,this.refs=h,this.updater=n||m}y.prototype.isReactComponent={},y.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error(p(85));this.updater.enqueueSetState(this,e,t,"setState")},y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},g.prototype=y.prototype;var b=v.prototype=new g;b.constructor=v,r(b,y.prototype),b.isPureReactComponent=!0;var w={current:null},k=Object.prototype.hasOwnProperty,E={key:!0,ref:!0,__self:!0,__source:!0};function S(e,t,n){var r,l={},o=null,i=null;if(null!=t)for(r in void 0!==t.ref&&(i=t.ref),void 0!==t.key&&(o=""+t.key),t)k.call(t,r)&&!E.hasOwnProperty(r)&&(l[r]=t[r]);var u=arguments.length-2;if(1===u)l.children=n;else if(1<u){for(var s=Array(u),c=0;c<u;c++)s[c]=arguments[c+2];l.children=s}if(e&&e.defaultProps)for(r in u=e.defaultProps)void 0===l[r]&&(l[r]=u[r]);return{$$typeof:a,type:e,key:o,ref:i,props:l,_owner:w.current}}function _(e){return"object"==typeof e&&null!==e&&e.$$typeof===a}var x=/\/+/g;function C(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function P(e,t,n,r,o){var i=typeof e;"undefined"!==i&&"boolean"!==i||(e=null);var u=!1;if(null===e)u=!0;else switch(i){case"string":case"number":u=!0;break;case"object":switch(e.$$typeof){case a:case l:u=!0}}if(u)return o=o(u=e),e=""===r?"."+C(u,0):r,Array.isArray(o)?(n="",null!=e&&(n=e.replace(x,"$&/")+"/"),P(o,t,n,"",(function(e){return e}))):null!=o&&(_(o)&&(o=function(e,t){return{$$typeof:a,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(o,n+(!o.key||u&&u.key===o.key?"":(""+o.key).replace(x,"$&/")+"/")+e)),t.push(o)),1;if(u=0,r=""===r?".":r+":",Array.isArray(e))for(var s=0;s<e.length;s++){var c=r+C(i=e[s],s);u+=P(i,t,n,c,o)}else if("function"==typeof(c=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=d&&e[d]||e["@@iterator"])?e:null}(e)))for(e=c.call(e),s=0;!(i=e.next()).done;)u+=P(i=i.value,t,n,c=r+C(i,s++),o);else if("object"===i)throw t=""+e,Error(p(31,"[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t));return u}function T(e,t,n){if(null==e)return e;var r=[],a=0;return P(e,r,"","",(function(e){return t.call(n,e,a++)})),r}function N(e){if(-1===e._status){var t=e._result;t=t(),e._status=0,e._result=t,t.then((function(t){0===e._status&&(t=t.default,e._status=1,e._result=t)}),(function(t){0===e._status&&(e._status=2,e._result=t)}))}if(1===e._status)return e._result;throw e._result}var L={current:null};function I(){var e=L.current;if(null===e)throw Error(p(321));return e}var z={ReactCurrentDispatcher:L,ReactCurrentBatchConfig:{transition:0},ReactCurrentOwner:w,IsSomeRendererActing:{current:!1},assign:r};t.Children={map:T,forEach:function(e,t,n){T(e,(function(){t.apply(this,arguments)}),n)},count:function(e){var t=0;return T(e,(function(){t++})),t},toArray:function(e){return T(e,(function(e){return e}))||[]},only:function(e){if(!_(e))throw Error(p(143));return e}},t.Component=y,t.PureComponent=v,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=z,t.cloneElement=function(e,t,n){if(null==e)throw Error(p(267,e));var l=r({},e.props),o=e.key,i=e.ref,u=e._owner;if(null!=t){if(void 0!==t.ref&&(i=t.ref,u=w.current),void 0!==t.key&&(o=""+t.key),e.type&&e.type.defaultProps)var s=e.type.defaultProps;for(c in t)k.call(t,c)&&!E.hasOwnProperty(c)&&(l[c]=void 0===t[c]&&void 0!==s?s[c]:t[c])}var c=arguments.length-2;if(1===c)l.children=n;else if(1<c){s=Array(c);for(var f=0;f<c;f++)s[f]=arguments[f+2];l.children=s}return{$$typeof:a,type:e.type,key:o,ref:i,props:l,_owner:u}},t.createContext=function(e,t){return void 0===t&&(t=null),(e={$$typeof:i,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:o,_context:e},e.Consumer=e},t.createElement=S,t.createFactory=function(e){var t=S.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:u,render:e}},t.isValidElement=_,t.lazy=function(e){return{$$typeof:c,_payload:{_status:-1,_result:e},_init:N}},t.memo=function(e,t){return{$$typeof:s,type:e,compare:void 0===t?null:t}},t.useCallback=function(e,t){return I().useCallback(e,t)},t.useContext=function(e,t){return I().useContext(e,t)},t.useDebugValue=function(){},t.useEffect=function(e,t){return I().useEffect(e,t)},t.useImperativeHandle=function(e,t,n){return I().useImperativeHandle(e,t,n)},t.useLayoutEffect=function(e,t){return I().useLayoutEffect(e,t)},t.useMemo=function(e,t){return I().useMemo(e,t)},t.useReducer=function(e,t,n){return I().useReducer(e,t,n)},t.useRef=function(e){return I().useRef(e)},t.useState=function(e){return I().useState(e)},t.version="17.0.1"},function(e,t,n){"use strict";
|
15 |
+
/** @license React v17.0.1
|
16 |
+
* react-dom.production.min.js
|
17 |
+
*
|
18 |
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
19 |
+
*
|
20 |
+
* This source code is licensed under the MIT license found in the
|
21 |
+
* LICENSE file in the root directory of this source tree.
|
22 |
+
*/var r=n(0),a=n(2),l=n(7);function o(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}if(!r)throw Error(o(227));var i=new Set,u={};function s(e,t){c(e,t),c(e+"Capture",t)}function c(e,t){for(u[e]=t,e=0;e<t.length;e++)i.add(t[e])}var f=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),d=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,p=Object.prototype.hasOwnProperty,m={},h={};function y(e,t,n,r,a,l,o){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=a,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=l,this.removeEmptyString=o}var g={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){g[e]=new y(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];g[t]=new y(t,1,!1,e[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){g[e]=new y(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){g[e]=new y(e,2,!1,e,null,!1,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){g[e]=new y(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){g[e]=new y(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){g[e]=new y(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){g[e]=new y(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){g[e]=new y(e,5,!1,e.toLowerCase(),null,!1,!1)}));var v=/[\-:]([a-z])/g;function b(e){return e[1].toUpperCase()}function w(e,t,n,r){var a=g.hasOwnProperty(t)?g[t]:null;(null!==a?0===a.type:!r&&(2<t.length&&("o"===t[0]||"O"===t[0])&&("n"===t[1]||"N"===t[1])))||(function(e,t,n,r){if(null==t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,a,r)&&(n=null),r||null===a?function(e){return!!p.call(h,e)||!p.call(m,e)&&(d.test(e)?h[e]=!0:(m[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):a.mustUseProperty?e[a.propertyName]=null===n?3!==a.type&&"":n:(t=a.attributeName,r=a.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(a=a.type)||4===a&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(v,b);g[t]=new y(t,1,!1,e,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(v,b);g[t]=new y(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(v,b);g[t]=new y(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){g[e]=new y(e,1,!1,e.toLowerCase(),null,!1,!1)})),g.xlinkHref=new y("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){g[e]=new y(e,1,!1,e.toLowerCase(),null,!0,!0)}));var k=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,E=60103,S=60106,_=60107,x=60108,C=60114,P=60109,T=60110,N=60112,L=60113,I=60120,z=60115,O=60116,M=60121,R=60128,j=60129,D=60130,F=60131;if("function"==typeof Symbol&&Symbol.for){var B=Symbol.for;E=B("react.element"),S=B("react.portal"),_=B("react.fragment"),x=B("react.strict_mode"),C=B("react.profiler"),P=B("react.provider"),T=B("react.context"),N=B("react.forward_ref"),L=B("react.suspense"),I=B("react.suspense_list"),z=B("react.memo"),O=B("react.lazy"),M=B("react.block"),B("react.scope"),R=B("react.opaque.id"),j=B("react.debug_trace_mode"),D=B("react.offscreen"),F=B("react.legacy_hidden")}var U,Q="function"==typeof Symbol&&Symbol.iterator;function A(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=Q&&e[Q]||e["@@iterator"])?e:null}function H(e){if(void 0===U)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);U=t&&t[1]||""}return"\n"+U+e}var V=!1;function $(e,t){if(!e||V)return"";V=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(e){var r=e}Reflect.construct(e,[],t)}else{try{t.call()}catch(e){r=e}e.call(t.prototype)}else{try{throw Error()}catch(e){r=e}e()}}catch(e){if(e&&r&&"string"==typeof e.stack){for(var a=e.stack.split("\n"),l=r.stack.split("\n"),o=a.length-1,i=l.length-1;1<=o&&0<=i&&a[o]!==l[i];)i--;for(;1<=o&&0<=i;o--,i--)if(a[o]!==l[i]){if(1!==o||1!==i)do{if(o--,0>--i||a[o]!==l[i])return"\n"+a[o].replace(" at new "," at ")}while(1<=o&&0<=i);break}}}finally{V=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?H(e):""}function W(e){switch(e.tag){case 5:return H(e.type);case 16:return H("Lazy");case 13:return H("Suspense");case 19:return H("SuspenseList");case 0:case 2:case 15:return e=$(e.type,!1);case 11:return e=$(e.type.render,!1);case 22:return e=$(e.type._render,!1);case 1:return e=$(e.type,!0);default:return""}}function q(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case _:return"Fragment";case S:return"Portal";case C:return"Profiler";case x:return"StrictMode";case L:return"Suspense";case I:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case T:return(e.displayName||"Context")+".Consumer";case P:return(e._context.displayName||"Context")+".Provider";case N:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(""!==t?"ForwardRef("+t+")":"ForwardRef");case z:return q(e.type);case M:return q(e._render);case O:t=e._payload,e=e._init;try{return q(e(t))}catch(e){}}return null}function K(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function Y(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function X(e){e._valueTracker||(e._valueTracker=function(e){var t=Y(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var a=n.get,l=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return a.call(this)},set:function(e){r=""+e,l.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function G(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Y(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function J(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function Z(e,t){var n=t.checked;return a({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function ee(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=K(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function te(e,t){null!=(t=t.checked)&&w(e,"checked",t,!1)}function ne(e,t){te(e,t);var n=K(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?ae(e,t.type,n):t.hasOwnProperty("defaultValue")&&ae(e,t.type,K(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function re(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function ae(e,t,n){"number"===t&&J(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}function le(e,t){return e=a({children:void 0},t),(t=function(e){var t="";return r.Children.forEach(e,(function(e){null!=e&&(t+=e)})),t}(t.children))&&(e.children=t),e}function oe(e,t,n,r){if(e=e.options,t){t={};for(var a=0;a<n.length;a++)t["$"+n[a]]=!0;for(n=0;n<e.length;n++)a=t.hasOwnProperty("$"+e[n].value),e[n].selected!==a&&(e[n].selected=a),a&&r&&(e[n].defaultSelected=!0)}else{for(n=""+K(n),t=null,a=0;a<e.length;a++){if(e[a].value===n)return e[a].selected=!0,void(r&&(e[a].defaultSelected=!0));null!==t||e[a].disabled||(t=e[a])}null!==t&&(t.selected=!0)}}function ie(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(o(91));return a({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function ue(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(o(92));if(Array.isArray(n)){if(!(1>=n.length))throw Error(o(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:K(n)}}function se(e,t){var n=K(t.value),r=K(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function ce(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}var fe="http://www.w3.org/1999/xhtml",de="http://www.w3.org/2000/svg";function pe(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function me(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?pe(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var he,ye=function(e){return"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(t,n,r,a){MSApp.execUnsafeLocalFunction((function(){return e(t,n)}))}:e}((function(e,t){if(e.namespaceURI!==de||"innerHTML"in e)e.innerHTML=t;else{for((he=he||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=he.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}}));function ge(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var ve={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},be=["Webkit","ms","Moz","O"];function we(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||ve.hasOwnProperty(e)&&ve[e]?(""+t).trim():t+"px"}function ke(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),a=we(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,a):e[n]=a}}Object.keys(ve).forEach((function(e){be.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),ve[t]=ve[e]}))}));var Ee=a({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Se(e,t){if(t){if(Ee[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(o(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(o(60));if("object"!=typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(o(61))}if(null!=t.style&&"object"!=typeof t.style)throw Error(o(62))}}function _e(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}function xe(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var Ce=null,Pe=null,Te=null;function Ne(e){if(e=Jr(e)){if("function"!=typeof Ce)throw Error(o(280));var t=e.stateNode;t&&(t=ea(t),Ce(e.stateNode,e.type,t))}}function Le(e){Pe?Te?Te.push(e):Te=[e]:Pe=e}function Ie(){if(Pe){var e=Pe,t=Te;if(Te=Pe=null,Ne(e),t)for(e=0;e<t.length;e++)Ne(t[e])}}function ze(e,t){return e(t)}function Oe(e,t,n,r,a){return e(t,n,r,a)}function Me(){}var Re=ze,je=!1,De=!1;function Fe(){null===Pe&&null===Te||(Me(),Ie())}function Be(e,t){var n=e.stateNode;if(null===n)return null;var r=ea(n);if(null===r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!=typeof n)throw Error(o(231,t,typeof n));return n}var Ue=!1;if(f)try{var Qe={};Object.defineProperty(Qe,"passive",{get:function(){Ue=!0}}),window.addEventListener("test",Qe,Qe),window.removeEventListener("test",Qe,Qe)}catch(e){Ue=!1}function Ae(e,t,n,r,a,l,o,i,u){var s=Array.prototype.slice.call(arguments,3);try{t.apply(n,s)}catch(e){this.onError(e)}}var He=!1,Ve=null,$e=!1,We=null,qe={onError:function(e){He=!0,Ve=e}};function Ke(e,t,n,r,a,l,o,i,u){He=!1,Ve=null,Ae.apply(qe,arguments)}function Ye(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!=(1026&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function Xe(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function Ge(e){if(Ye(e)!==e)throw Error(o(188))}function Je(e){if(!(e=function(e){var t=e.alternate;if(!t){if(null===(t=Ye(e)))throw Error(o(188));return t!==e?null:e}for(var n=e,r=t;;){var a=n.return;if(null===a)break;var l=a.alternate;if(null===l){if(null!==(r=a.return)){n=r;continue}break}if(a.child===l.child){for(l=a.child;l;){if(l===n)return Ge(a),e;if(l===r)return Ge(a),t;l=l.sibling}throw Error(o(188))}if(n.return!==r.return)n=a,r=l;else{for(var i=!1,u=a.child;u;){if(u===n){i=!0,n=a,r=l;break}if(u===r){i=!0,r=a,n=l;break}u=u.sibling}if(!i){for(u=l.child;u;){if(u===n){i=!0,n=l,r=a;break}if(u===r){i=!0,r=l,n=a;break}u=u.sibling}if(!i)throw Error(o(189))}}if(n.alternate!==r)throw Error(o(190))}if(3!==n.tag)throw Error(o(188));return n.stateNode.current===n?e:t}(e)))return null;for(var t=e;;){if(5===t.tag||6===t.tag)return t;if(t.child)t.child.return=t,t=t.child;else{if(t===e)break;for(;!t.sibling;){if(!t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}}return null}function Ze(e,t){for(var n=e.alternate;null!==t;){if(t===e||t===n)return!0;t=t.return}return!1}var et,tt,nt,rt,at=!1,lt=[],ot=null,it=null,ut=null,st=new Map,ct=new Map,ft=[],dt="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function pt(e,t,n,r,a){return{blockedOn:e,domEventName:t,eventSystemFlags:16|n,nativeEvent:a,targetContainers:[r]}}function mt(e,t){switch(e){case"focusin":case"focusout":ot=null;break;case"dragenter":case"dragleave":it=null;break;case"mouseover":case"mouseout":ut=null;break;case"pointerover":case"pointerout":st.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ct.delete(t.pointerId)}}function ht(e,t,n,r,a,l){return null===e||e.nativeEvent!==l?(e=pt(t,n,r,a,l),null!==t&&(null!==(t=Jr(t))&&tt(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==a&&-1===t.indexOf(a)&&t.push(a),e)}function yt(e){var t=Gr(e.target);if(null!==t){var n=Ye(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=Xe(n)))return e.blockedOn=t,void rt(e.lanePriority,(function(){l.unstable_runWithPriority(e.priority,(function(){nt(n)}))}))}else if(3===t&&n.stateNode.hydrate)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function gt(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=Jt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=Jr(n))&&tt(t),e.blockedOn=n,!1;t.shift()}return!0}function vt(e,t,n){gt(e)&&n.delete(t)}function bt(){for(at=!1;0<lt.length;){var e=lt[0];if(null!==e.blockedOn){null!==(e=Jr(e.blockedOn))&&et(e);break}for(var t=e.targetContainers;0<t.length;){var n=Jt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n){e.blockedOn=n;break}t.shift()}null===e.blockedOn&<.shift()}null!==ot&>(ot)&&(ot=null),null!==it&>(it)&&(it=null),null!==ut&>(ut)&&(ut=null),st.forEach(vt),ct.forEach(vt)}function wt(e,t){e.blockedOn===t&&(e.blockedOn=null,at||(at=!0,l.unstable_scheduleCallback(l.unstable_NormalPriority,bt)))}function kt(e){function t(t){return wt(t,e)}if(0<lt.length){wt(lt[0],e);for(var n=1;n<lt.length;n++){var r=lt[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==ot&&wt(ot,e),null!==it&&wt(it,e),null!==ut&&wt(ut,e),st.forEach(t),ct.forEach(t),n=0;n<ft.length;n++)(r=ft[n]).blockedOn===e&&(r.blockedOn=null);for(;0<ft.length&&null===(n=ft[0]).blockedOn;)yt(n),null===n.blockedOn&&ft.shift()}function Et(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var St={animationend:Et("Animation","AnimationEnd"),animationiteration:Et("Animation","AnimationIteration"),animationstart:Et("Animation","AnimationStart"),transitionend:Et("Transition","TransitionEnd")},_t={},xt={};function Ct(e){if(_t[e])return _t[e];if(!St[e])return e;var t,n=St[e];for(t in n)if(n.hasOwnProperty(t)&&t in xt)return _t[e]=n[t];return e}f&&(xt=document.createElement("div").style,"AnimationEvent"in window||(delete St.animationend.animation,delete St.animationiteration.animation,delete St.animationstart.animation),"TransitionEvent"in window||delete St.transitionend.transition);var Pt=Ct("animationend"),Tt=Ct("animationiteration"),Nt=Ct("animationstart"),Lt=Ct("transitionend"),It=new Map,zt=new Map,Ot=["abort","abort",Pt,"animationEnd",Tt,"animationIteration",Nt,"animationStart","canplay","canPlay","canplaythrough","canPlayThrough","durationchange","durationChange","emptied","emptied","encrypted","encrypted","ended","ended","error","error","gotpointercapture","gotPointerCapture","load","load","loadeddata","loadedData","loadedmetadata","loadedMetadata","loadstart","loadStart","lostpointercapture","lostPointerCapture","playing","playing","progress","progress","seeking","seeking","stalled","stalled","suspend","suspend","timeupdate","timeUpdate",Lt,"transitionEnd","waiting","waiting"];function Mt(e,t){for(var n=0;n<e.length;n+=2){var r=e[n],a=e[n+1];a="on"+(a[0].toUpperCase()+a.slice(1)),zt.set(r,t),It.set(r,a),s(a,[r])}}(0,l.unstable_now)();var Rt=8;function jt(e){if(0!=(1&e))return Rt=15,1;if(0!=(2&e))return Rt=14,2;if(0!=(4&e))return Rt=13,4;var t=24&e;return 0!==t?(Rt=12,t):0!=(32&e)?(Rt=11,32):0!==(t=192&e)?(Rt=10,t):0!=(256&e)?(Rt=9,256):0!==(t=3584&e)?(Rt=8,t):0!=(4096&e)?(Rt=7,4096):0!==(t=4186112&e)?(Rt=6,t):0!==(t=62914560&e)?(Rt=5,t):67108864&e?(Rt=4,67108864):0!=(134217728&e)?(Rt=3,134217728):0!==(t=805306368&e)?(Rt=2,t):0!=(1073741824&e)?(Rt=1,1073741824):(Rt=8,e)}function Dt(e,t){var n=e.pendingLanes;if(0===n)return Rt=0;var r=0,a=0,l=e.expiredLanes,o=e.suspendedLanes,i=e.pingedLanes;if(0!==l)r=l,a=Rt=15;else if(0!==(l=134217727&n)){var u=l&~o;0!==u?(r=jt(u),a=Rt):0!==(i&=l)&&(r=jt(i),a=Rt)}else 0!==(l=n&~o)?(r=jt(l),a=Rt):0!==i&&(r=jt(i),a=Rt);if(0===r)return 0;if(r=n&((0>(r=31-Ht(r))?0:1<<r)<<1)-1,0!==t&&t!==r&&0==(t&o)){if(jt(t),a<=Rt)return t;Rt=a}if(0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)a=1<<(n=31-Ht(t)),r|=e[n],t&=~a;return r}function Ft(e){return 0!==(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function Bt(e,t){switch(e){case 15:return 1;case 14:return 2;case 12:return 0===(e=Ut(24&~t))?Bt(10,t):e;case 10:return 0===(e=Ut(192&~t))?Bt(8,t):e;case 8:return 0===(e=Ut(3584&~t))&&(0===(e=Ut(4186112&~t))&&(e=512)),e;case 2:return 0===(t=Ut(805306368&~t))&&(t=268435456),t}throw Error(o(358,e))}function Ut(e){return e&-e}function Qt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function At(e,t,n){e.pendingLanes|=t;var r=t-1;e.suspendedLanes&=r,e.pingedLanes&=r,(e=e.eventTimes)[t=31-Ht(t)]=n}var Ht=Math.clz32?Math.clz32:function(e){return 0===e?32:31-(Vt(e)/$t|0)|0},Vt=Math.log,$t=Math.LN2;var Wt=l.unstable_UserBlockingPriority,qt=l.unstable_runWithPriority,Kt=!0;function Yt(e,t,n,r){je||Me();var a=Gt,l=je;je=!0;try{Oe(a,e,t,n,r)}finally{(je=l)||Fe()}}function Xt(e,t,n,r){qt(Wt,Gt.bind(null,e,t,n,r))}function Gt(e,t,n,r){var a;if(Kt)if((a=0==(4&t))&&0<lt.length&&-1<dt.indexOf(e))e=pt(null,e,t,n,r),lt.push(e);else{var l=Jt(e,t,n,r);if(null===l)a&&mt(e,r);else{if(a){if(-1<dt.indexOf(e))return e=pt(l,e,t,n,r),void lt.push(e);if(function(e,t,n,r,a){switch(t){case"focusin":return ot=ht(ot,e,t,n,r,a),!0;case"dragenter":return it=ht(it,e,t,n,r,a),!0;case"mouseover":return ut=ht(ut,e,t,n,r,a),!0;case"pointerover":var l=a.pointerId;return st.set(l,ht(st.get(l)||null,e,t,n,r,a)),!0;case"gotpointercapture":return l=a.pointerId,ct.set(l,ht(ct.get(l)||null,e,t,n,r,a)),!0}return!1}(l,e,t,n,r))return;mt(e,r)}Lr(e,t,r,null,n)}}}function Jt(e,t,n,r){var a=xe(r);if(null!==(a=Gr(a))){var l=Ye(a);if(null===l)a=null;else{var o=l.tag;if(13===o){if(null!==(a=Xe(l)))return a;a=null}else if(3===o){if(l.stateNode.hydrate)return 3===l.tag?l.stateNode.containerInfo:null;a=null}else l!==a&&(a=null)}}return Lr(e,t,r,a,n),null}var Zt=null,en=null,tn=null;function nn(){if(tn)return tn;var e,t,n=en,r=n.length,a="value"in Zt?Zt.value:Zt.textContent,l=a.length;for(e=0;e<r&&n[e]===a[e];e++);var o=r-e;for(t=1;t<=o&&n[r-t]===a[l-t];t++);return tn=a.slice(e,1<t?1-t:void 0)}function rn(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function an(){return!0}function ln(){return!1}function on(e){function t(t,n,r,a,l){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=a,this.target=l,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(a):a[o]);return this.isDefaultPrevented=(null!=a.defaultPrevented?a.defaultPrevented:!1===a.returnValue)?an:ln,this.isPropagationStopped=ln,this}return a(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=an)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=an)},persist:function(){},isPersistent:an}),t}var un,sn,cn,fn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},dn=on(fn),pn=a({},fn,{view:0,detail:0}),mn=on(pn),hn=a({},pn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Cn,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==cn&&(cn&&"mousemove"===e.type?(un=e.screenX-cn.screenX,sn=e.screenY-cn.screenY):sn=un=0,cn=e),un)},movementY:function(e){return"movementY"in e?e.movementY:sn}}),yn=on(hn),gn=on(a({},hn,{dataTransfer:0})),vn=on(a({},pn,{relatedTarget:0})),bn=on(a({},fn,{animationName:0,elapsedTime:0,pseudoElement:0})),wn=on(a({},fn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}})),kn=on(a({},fn,{data:0})),En={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Sn={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},_n={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function xn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=_n[e])&&!!t[e]}function Cn(){return xn}var Pn=on(a({},pn,{key:function(e){if(e.key){var t=En[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=rn(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?Sn[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Cn,charCode:function(e){return"keypress"===e.type?rn(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?rn(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}})),Tn=on(a({},hn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Nn=on(a({},pn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Cn})),Ln=on(a({},fn,{propertyName:0,elapsedTime:0,pseudoElement:0})),In=on(a({},hn,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),zn=[9,13,27,32],On=f&&"CompositionEvent"in window,Mn=null;f&&"documentMode"in document&&(Mn=document.documentMode);var Rn=f&&"TextEvent"in window&&!Mn,jn=f&&(!On||Mn&&8<Mn&&11>=Mn),Dn=String.fromCharCode(32),Fn=!1;function Bn(e,t){switch(e){case"keyup":return-1!==zn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Un(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var Qn=!1;var An={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Hn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!An[e.type]:"textarea"===t}function Vn(e,t,n,r){Le(r),0<(t=zr(t,"onChange")).length&&(n=new dn("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var $n=null,Wn=null;function qn(e){_r(e,0)}function Kn(e){if(G(Zr(e)))return e}function Yn(e,t){if("change"===e)return t}var Xn=!1;if(f){var Gn;if(f){var Jn="oninput"in document;if(!Jn){var Zn=document.createElement("div");Zn.setAttribute("oninput","return;"),Jn="function"==typeof Zn.oninput}Gn=Jn}else Gn=!1;Xn=Gn&&(!document.documentMode||9<document.documentMode)}function er(){$n&&($n.detachEvent("onpropertychange",tr),Wn=$n=null)}function tr(e){if("value"===e.propertyName&&Kn(Wn)){var t=[];if(Vn(t,Wn,e,xe(e)),e=qn,je)e(t);else{je=!0;try{ze(e,t)}finally{je=!1,Fe()}}}}function nr(e,t,n){"focusin"===e?(er(),Wn=n,($n=t).attachEvent("onpropertychange",tr)):"focusout"===e&&er()}function rr(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Kn(Wn)}function ar(e,t){if("click"===e)return Kn(t)}function lr(e,t){if("input"===e||"change"===e)return Kn(t)}var or="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},ir=Object.prototype.hasOwnProperty;function ur(e,t){if(or(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++)if(!ir.call(t,n[r])||!or(e[n[r]],t[n[r]]))return!1;return!0}function sr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function cr(e,t){var n,r=sr(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=sr(r)}}function fr(){for(var e=window,t=J();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(e){n=!1}if(!n)break;t=J((e=t.contentWindow).document)}return t}function dr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}var pr=f&&"documentMode"in document&&11>=document.documentMode,mr=null,hr=null,yr=null,gr=!1;function vr(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;gr||null==mr||mr!==J(r)||("selectionStart"in(r=mr)&&dr(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},yr&&ur(yr,r)||(yr=r,0<(r=zr(hr,"onSelect")).length&&(t=new dn("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=mr)))}Mt("cancel cancel click click close close contextmenu contextMenu copy copy cut cut auxclick auxClick dblclick doubleClick dragend dragEnd dragstart dragStart drop drop focusin focus focusout blur input input invalid invalid keydown keyDown keypress keyPress keyup keyUp mousedown mouseDown mouseup mouseUp paste paste pause pause play play pointercancel pointerCancel pointerdown pointerDown pointerup pointerUp ratechange rateChange reset reset seeked seeked submit submit touchcancel touchCancel touchend touchEnd touchstart touchStart volumechange volumeChange".split(" "),0),Mt("drag drag dragenter dragEnter dragexit dragExit dragleave dragLeave dragover dragOver mousemove mouseMove mouseout mouseOut mouseover mouseOver pointermove pointerMove pointerout pointerOut pointerover pointerOver scroll scroll toggle toggle touchmove touchMove wheel wheel".split(" "),1),Mt(Ot,2);for(var br="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),wr=0;wr<br.length;wr++)zt.set(br[wr],0);c("onMouseEnter",["mouseout","mouseover"]),c("onMouseLeave",["mouseout","mouseover"]),c("onPointerEnter",["pointerout","pointerover"]),c("onPointerLeave",["pointerout","pointerover"]),s("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),s("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),s("onBeforeInput",["compositionend","keypress","textInput","paste"]),s("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),s("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),s("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var kr="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Er=new Set("cancel close invalid load scroll toggle".split(" ").concat(kr));function Sr(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,r,a,l,i,u,s){if(Ke.apply(this,arguments),He){if(!He)throw Error(o(198));var c=Ve;He=!1,Ve=null,$e||($e=!0,We=c)}}(r,t,void 0,e),e.currentTarget=null}function _r(e,t){t=0!=(4&t);for(var n=0;n<e.length;n++){var r=e[n],a=r.event;r=r.listeners;e:{var l=void 0;if(t)for(var o=r.length-1;0<=o;o--){var i=r[o],u=i.instance,s=i.currentTarget;if(i=i.listener,u!==l&&a.isPropagationStopped())break e;Sr(a,i,s),l=u}else for(o=0;o<r.length;o++){if(u=(i=r[o]).instance,s=i.currentTarget,i=i.listener,u!==l&&a.isPropagationStopped())break e;Sr(a,i,s),l=u}}}if($e)throw e=We,$e=!1,We=null,e}function xr(e,t){var n=ta(t),r=e+"__bubble";n.has(r)||(Nr(t,e,2,!1),n.add(r))}var Cr="_reactListening"+Math.random().toString(36).slice(2);function Pr(e){e[Cr]||(e[Cr]=!0,i.forEach((function(t){Er.has(t)||Tr(t,!1,e,null),Tr(t,!0,e,null)})))}function Tr(e,t,n,r){var a=4<arguments.length&&void 0!==arguments[4]?arguments[4]:0,l=n;if("selectionchange"===e&&9!==n.nodeType&&(l=n.ownerDocument),null!==r&&!t&&Er.has(e)){if("scroll"!==e)return;a|=2,l=r}var o=ta(l),i=e+"__"+(t?"capture":"bubble");o.has(i)||(t&&(a|=4),Nr(l,e,a,t),o.add(i))}function Nr(e,t,n,r){var a=zt.get(t);switch(void 0===a?2:a){case 0:a=Yt;break;case 1:a=Xt;break;default:a=Gt}n=a.bind(null,t,n,e),a=void 0,!Ue||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(a=!0),r?void 0!==a?e.addEventListener(t,n,{capture:!0,passive:a}):e.addEventListener(t,n,!0):void 0!==a?e.addEventListener(t,n,{passive:a}):e.addEventListener(t,n,!1)}function Lr(e,t,n,r,a){var l=r;if(0==(1&t)&&0==(2&t)&&null!==r)e:for(;;){if(null===r)return;var o=r.tag;if(3===o||4===o){var i=r.stateNode.containerInfo;if(i===a||8===i.nodeType&&i.parentNode===a)break;if(4===o)for(o=r.return;null!==o;){var u=o.tag;if((3===u||4===u)&&((u=o.stateNode.containerInfo)===a||8===u.nodeType&&u.parentNode===a))return;o=o.return}for(;null!==i;){if(null===(o=Gr(i)))return;if(5===(u=o.tag)||6===u){r=l=o;continue e}i=i.parentNode}}r=r.return}!function(e,t,n){if(De)return e(t,n);De=!0;try{Re(e,t,n)}finally{De=!1,Fe()}}((function(){var r=l,a=xe(n),o=[];e:{var i=It.get(e);if(void 0!==i){var u=dn,s=e;switch(e){case"keypress":if(0===rn(n))break e;case"keydown":case"keyup":u=Pn;break;case"focusin":s="focus",u=vn;break;case"focusout":s="blur",u=vn;break;case"beforeblur":case"afterblur":u=vn;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":u=yn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":u=gn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":u=Nn;break;case Pt:case Tt:case Nt:u=bn;break;case Lt:u=Ln;break;case"scroll":u=mn;break;case"wheel":u=In;break;case"copy":case"cut":case"paste":u=wn;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":u=Tn}var c=0!=(4&t),f=!c&&"scroll"===e,d=c?null!==i?i+"Capture":null:i;c=[];for(var p,m=r;null!==m;){var h=(p=m).stateNode;if(5===p.tag&&null!==h&&(p=h,null!==d&&(null!=(h=Be(m,d))&&c.push(Ir(m,h,p)))),f)break;m=m.return}0<c.length&&(i=new u(i,s,null,n,a),o.push({event:i,listeners:c}))}}if(0==(7&t)){if(u="mouseout"===e||"pointerout"===e,(!(i="mouseover"===e||"pointerover"===e)||0!=(16&t)||!(s=n.relatedTarget||n.fromElement)||!Gr(s)&&!s[Yr])&&(u||i)&&(i=a.window===a?a:(i=a.ownerDocument)?i.defaultView||i.parentWindow:window,u?(u=r,null!==(s=(s=n.relatedTarget||n.toElement)?Gr(s):null)&&(s!==(f=Ye(s))||5!==s.tag&&6!==s.tag)&&(s=null)):(u=null,s=r),u!==s)){if(c=yn,h="onMouseLeave",d="onMouseEnter",m="mouse","pointerout"!==e&&"pointerover"!==e||(c=Tn,h="onPointerLeave",d="onPointerEnter",m="pointer"),f=null==u?i:Zr(u),p=null==s?i:Zr(s),(i=new c(h,m+"leave",u,n,a)).target=f,i.relatedTarget=p,h=null,Gr(a)===r&&((c=new c(d,m+"enter",s,n,a)).target=p,c.relatedTarget=f,h=c),f=h,u&&s)e:{for(d=s,m=0,p=c=u;p;p=Or(p))m++;for(p=0,h=d;h;h=Or(h))p++;for(;0<m-p;)c=Or(c),m--;for(;0<p-m;)d=Or(d),p--;for(;m--;){if(c===d||null!==d&&c===d.alternate)break e;c=Or(c),d=Or(d)}c=null}else c=null;null!==u&&Mr(o,i,u,c,!1),null!==s&&null!==f&&Mr(o,f,s,c,!0)}if("select"===(u=(i=r?Zr(r):window).nodeName&&i.nodeName.toLowerCase())||"input"===u&&"file"===i.type)var y=Yn;else if(Hn(i))if(Xn)y=lr;else{y=rr;var g=nr}else(u=i.nodeName)&&"input"===u.toLowerCase()&&("checkbox"===i.type||"radio"===i.type)&&(y=ar);switch(y&&(y=y(e,r))?Vn(o,y,n,a):(g&&g(e,i,r),"focusout"===e&&(g=i._wrapperState)&&g.controlled&&"number"===i.type&&ae(i,"number",i.value)),g=r?Zr(r):window,e){case"focusin":(Hn(g)||"true"===g.contentEditable)&&(mr=g,hr=r,yr=null);break;case"focusout":yr=hr=mr=null;break;case"mousedown":gr=!0;break;case"contextmenu":case"mouseup":case"dragend":gr=!1,vr(o,n,a);break;case"selectionchange":if(pr)break;case"keydown":case"keyup":vr(o,n,a)}var v;if(On)e:{switch(e){case"compositionstart":var b="onCompositionStart";break e;case"compositionend":b="onCompositionEnd";break e;case"compositionupdate":b="onCompositionUpdate";break e}b=void 0}else Qn?Bn(e,n)&&(b="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(b="onCompositionStart");b&&(jn&&"ko"!==n.locale&&(Qn||"onCompositionStart"!==b?"onCompositionEnd"===b&&Qn&&(v=nn()):(en="value"in(Zt=a)?Zt.value:Zt.textContent,Qn=!0)),0<(g=zr(r,b)).length&&(b=new kn(b,e,null,n,a),o.push({event:b,listeners:g}),v?b.data=v:null!==(v=Un(n))&&(b.data=v))),(v=Rn?function(e,t){switch(e){case"compositionend":return Un(t);case"keypress":return 32!==t.which?null:(Fn=!0,Dn);case"textInput":return(e=t.data)===Dn&&Fn?null:e;default:return null}}(e,n):function(e,t){if(Qn)return"compositionend"===e||!On&&Bn(e,t)?(e=nn(),tn=en=Zt=null,Qn=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return jn&&"ko"!==t.locale?null:t.data;default:return null}}(e,n))&&(0<(r=zr(r,"onBeforeInput")).length&&(a=new kn("onBeforeInput","beforeinput",null,n,a),o.push({event:a,listeners:r}),a.data=v))}_r(o,t)}))}function Ir(e,t,n){return{instance:e,listener:t,currentTarget:n}}function zr(e,t){for(var n=t+"Capture",r=[];null!==e;){var a=e,l=a.stateNode;5===a.tag&&null!==l&&(a=l,null!=(l=Be(e,n))&&r.unshift(Ir(e,l,a)),null!=(l=Be(e,t))&&r.push(Ir(e,l,a))),e=e.return}return r}function Or(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function Mr(e,t,n,r,a){for(var l=t._reactName,o=[];null!==n&&n!==r;){var i=n,u=i.alternate,s=i.stateNode;if(null!==u&&u===r)break;5===i.tag&&null!==s&&(i=s,a?null!=(u=Be(n,l))&&o.unshift(Ir(n,u,i)):a||null!=(u=Be(n,l))&&o.push(Ir(n,u,i))),n=n.return}0!==o.length&&e.push({event:t,listeners:o})}function Rr(){}var jr=null,Dr=null;function Fr(e,t){switch(e){case"button":case"input":case"select":case"textarea":return!!t.autoFocus}return!1}function Br(e,t){return"textarea"===e||"option"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var Ur="function"==typeof setTimeout?setTimeout:void 0,Qr="function"==typeof clearTimeout?clearTimeout:void 0;function Ar(e){1===e.nodeType?e.textContent="":9===e.nodeType&&(null!=(e=e.body)&&(e.textContent=""))}function Hr(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break}return e}function Vr(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var $r=0;var Wr=Math.random().toString(36).slice(2),qr="__reactFiber$"+Wr,Kr="__reactProps$"+Wr,Yr="__reactContainer$"+Wr,Xr="__reactEvents$"+Wr;function Gr(e){var t=e[qr];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Yr]||n[qr]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=Vr(e);null!==e;){if(n=e[qr])return n;e=Vr(e)}return t}n=(e=n).parentNode}return null}function Jr(e){return!(e=e[qr]||e[Yr])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function Zr(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(o(33))}function ea(e){return e[Kr]||null}function ta(e){var t=e[Xr];return void 0===t&&(t=e[Xr]=new Set),t}var na=[],ra=-1;function aa(e){return{current:e}}function la(e){0>ra||(e.current=na[ra],na[ra]=null,ra--)}function oa(e,t){ra++,na[ra]=e.current,e.current=t}var ia={},ua=aa(ia),sa=aa(!1),ca=ia;function fa(e,t){var n=e.type.contextTypes;if(!n)return ia;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var a,l={};for(a in n)l[a]=t[a];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=l),l}function da(e){return null!=(e=e.childContextTypes)}function pa(){la(sa),la(ua)}function ma(e,t,n){if(ua.current!==ia)throw Error(o(168));oa(ua,t),oa(sa,n)}function ha(e,t,n){var r=e.stateNode;if(e=t.childContextTypes,"function"!=typeof r.getChildContext)return n;for(var l in r=r.getChildContext())if(!(l in e))throw Error(o(108,q(t)||"Unknown",l));return a({},n,r)}function ya(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ia,ca=ua.current,oa(ua,e),oa(sa,sa.current),!0}function ga(e,t,n){var r=e.stateNode;if(!r)throw Error(o(169));n?(e=ha(e,t,ca),r.__reactInternalMemoizedMergedChildContext=e,la(sa),la(ua),oa(ua,e)):la(sa),oa(sa,n)}var va=null,ba=null,wa=l.unstable_runWithPriority,ka=l.unstable_scheduleCallback,Ea=l.unstable_cancelCallback,Sa=l.unstable_shouldYield,_a=l.unstable_requestPaint,xa=l.unstable_now,Ca=l.unstable_getCurrentPriorityLevel,Pa=l.unstable_ImmediatePriority,Ta=l.unstable_UserBlockingPriority,Na=l.unstable_NormalPriority,La=l.unstable_LowPriority,Ia=l.unstable_IdlePriority,za={},Oa=void 0!==_a?_a:function(){},Ma=null,Ra=null,ja=!1,Da=xa(),Fa=1e4>Da?xa:function(){return xa()-Da};function Ba(){switch(Ca()){case Pa:return 99;case Ta:return 98;case Na:return 97;case La:return 96;case Ia:return 95;default:throw Error(o(332))}}function Ua(e){switch(e){case 99:return Pa;case 98:return Ta;case 97:return Na;case 96:return La;case 95:return Ia;default:throw Error(o(332))}}function Qa(e,t){return e=Ua(e),wa(e,t)}function Aa(e,t,n){return e=Ua(e),ka(e,t,n)}function Ha(){if(null!==Ra){var e=Ra;Ra=null,Ea(e)}Va()}function Va(){if(!ja&&null!==Ma){ja=!0;var e=0;try{var t=Ma;Qa(99,(function(){for(;e<t.length;e++){var n=t[e];do{n=n(!0)}while(null!==n)}})),Ma=null}catch(t){throw null!==Ma&&(Ma=Ma.slice(e+1)),ka(Pa,Ha),t}finally{ja=!1}}}var $a=k.ReactCurrentBatchConfig;function Wa(e,t){if(e&&e.defaultProps){for(var n in t=a({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}var qa=aa(null),Ka=null,Ya=null,Xa=null;function Ga(){Xa=Ya=Ka=null}function Ja(e){var t=qa.current;la(qa),e.type._context._currentValue=t}function Za(e,t){for(;null!==e;){var n=e.alternate;if((e.childLanes&t)===t){if(null===n||(n.childLanes&t)===t)break;n.childLanes|=t}else e.childLanes|=t,null!==n&&(n.childLanes|=t);e=e.return}}function el(e,t){Ka=e,Xa=Ya=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!=(e.lanes&t)&&(zo=!0),e.firstContext=null)}function tl(e,t){if(Xa!==e&&!1!==t&&0!==t)if("number"==typeof t&&1073741823!==t||(Xa=e,t=1073741823),t={context:e,observedBits:t,next:null},null===Ya){if(null===Ka)throw Error(o(308));Ya=t,Ka.dependencies={lanes:0,firstContext:t,responders:null}}else Ya=Ya.next=t;return e._currentValue}var nl=!1;function rl(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null},effects:null}}function al(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function ll(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function ol(e,t){if(null!==(e=e.updateQueue)){var n=(e=e.shared).pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}}function il(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var a=null,l=null;if(null!==(n=n.firstBaseUpdate)){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===l?a=l=o:l=l.next=o,n=n.next}while(null!==n);null===l?a=l=t:l=l.next=t}else a=l=t;return n={baseState:r.baseState,firstBaseUpdate:a,lastBaseUpdate:l,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function ul(e,t,n,r){var l=e.updateQueue;nl=!1;var o=l.firstBaseUpdate,i=l.lastBaseUpdate,u=l.shared.pending;if(null!==u){l.shared.pending=null;var s=u,c=s.next;s.next=null,null===i?o=c:i.next=c,i=s;var f=e.alternate;if(null!==f){var d=(f=f.updateQueue).lastBaseUpdate;d!==i&&(null===d?f.firstBaseUpdate=c:d.next=c,f.lastBaseUpdate=s)}}if(null!==o){for(d=l.baseState,i=0,f=c=s=null;;){u=o.lane;var p=o.eventTime;if((r&u)===u){null!==f&&(f=f.next={eventTime:p,lane:0,tag:o.tag,payload:o.payload,callback:o.callback,next:null});e:{var m=e,h=o;switch(u=t,p=n,h.tag){case 1:if("function"==typeof(m=h.payload)){d=m.call(p,d,u);break e}d=m;break e;case 3:m.flags=-4097&m.flags|64;case 0:if(null==(u="function"==typeof(m=h.payload)?m.call(p,d,u):m))break e;d=a({},d,u);break e;case 2:nl=!0}}null!==o.callback&&(e.flags|=32,null===(u=l.effects)?l.effects=[o]:u.push(o))}else p={eventTime:p,lane:u,tag:o.tag,payload:o.payload,callback:o.callback,next:null},null===f?(c=f=p,s=d):f=f.next=p,i|=u;if(null===(o=o.next)){if(null===(u=l.shared.pending))break;o=u.next,u.next=null,l.lastBaseUpdate=u,l.shared.pending=null}}null===f&&(s=d),l.baseState=s,l.firstBaseUpdate=c,l.lastBaseUpdate=f,Mi|=i,e.lanes=i,e.memoizedState=d}}function sl(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],a=r.callback;if(null!==a){if(r.callback=null,r=n,"function"!=typeof a)throw Error(o(191,a));a.call(r)}}}var cl=(new r.Component).refs;function fl(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:a({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var dl={isMounted:function(e){return!!(e=e._reactInternals)&&Ye(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=lu(),a=ou(e),l=ll(r,a);l.payload=t,null!=n&&(l.callback=n),ol(e,l),iu(e,a,r)},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=lu(),a=ou(e),l=ll(r,a);l.tag=1,l.payload=t,null!=n&&(l.callback=n),ol(e,l),iu(e,a,r)},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=lu(),r=ou(e),a=ll(n,r);a.tag=2,null!=t&&(a.callback=t),ol(e,a),iu(e,r,n)}};function pl(e,t,n,r,a,l,o){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,l,o):!t.prototype||!t.prototype.isPureReactComponent||(!ur(n,r)||!ur(a,l))}function ml(e,t,n){var r=!1,a=ia,l=t.contextType;return"object"==typeof l&&null!==l?l=tl(l):(a=da(t)?ca:ua.current,l=(r=null!=(r=t.contextTypes))?fa(e,a):ia),t=new t(n,l),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=dl,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=a,e.__reactInternalMemoizedMaskedChildContext=l),t}function hl(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&dl.enqueueReplaceState(t,t.state,null)}function yl(e,t,n,r){var a=e.stateNode;a.props=n,a.state=e.memoizedState,a.refs=cl,rl(e);var l=t.contextType;"object"==typeof l&&null!==l?a.context=tl(l):(l=da(t)?ca:ua.current,a.context=fa(e,l)),ul(e,n,a,r),a.state=e.memoizedState,"function"==typeof(l=t.getDerivedStateFromProps)&&(fl(e,t,l,n),a.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof a.getSnapshotBeforeUpdate||"function"!=typeof a.UNSAFE_componentWillMount&&"function"!=typeof a.componentWillMount||(t=a.state,"function"==typeof a.componentWillMount&&a.componentWillMount(),"function"==typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount(),t!==a.state&&dl.enqueueReplaceState(a,a.state,null),ul(e,n,a,r),a.state=e.memoizedState),"function"==typeof a.componentDidMount&&(e.flags|=4)}var gl=Array.isArray;function vl(e,t,n){if(null!==(e=n.ref)&&"function"!=typeof e&&"object"!=typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(o(309));var r=n.stateNode}if(!r)throw Error(o(147,e));var a=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===a?t.ref:((t=function(e){var t=r.refs;t===cl&&(t=r.refs={}),null===e?delete t[a]:t[a]=e})._stringRef=a,t)}if("string"!=typeof e)throw Error(o(284));if(!n._owner)throw Error(o(290,e))}return e}function bl(e,t){if("textarea"!==e.type)throw Error(o(31,"[object Object]"===Object.prototype.toString.call(t)?"object with keys {"+Object.keys(t).join(", ")+"}":t))}function wl(e){function t(t,n){if(e){var r=t.lastEffect;null!==r?(r.nextEffect=n,t.lastEffect=n):t.firstEffect=t.lastEffect=n,n.nextEffect=null,n.flags=8}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function a(e,t){return(e=Bu(e,t)).index=0,e.sibling=null,e}function l(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags=2,n):r:(t.flags=2,n):n}function i(t){return e&&null===t.alternate&&(t.flags=2),t}function u(e,t,n,r){return null===t||6!==t.tag?((t=Hu(n,e.mode,r)).return=e,t):((t=a(t,n)).return=e,t)}function s(e,t,n,r){return null!==t&&t.elementType===n.type?((r=a(t,n.props)).ref=vl(e,t,n),r.return=e,r):((r=Uu(n.type,n.key,n.props,null,e.mode,r)).ref=vl(e,t,n),r.return=e,r)}function c(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Vu(n,e.mode,r)).return=e,t):((t=a(t,n.children||[])).return=e,t)}function f(e,t,n,r,l){return null===t||7!==t.tag?((t=Qu(n,e.mode,r,l)).return=e,t):((t=a(t,n)).return=e,t)}function d(e,t,n){if("string"==typeof t||"number"==typeof t)return(t=Hu(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case E:return(n=Uu(t.type,t.key,t.props,null,e.mode,n)).ref=vl(e,null,t),n.return=e,n;case S:return(t=Vu(t,e.mode,n)).return=e,t}if(gl(t)||A(t))return(t=Qu(t,e.mode,n,null)).return=e,t;bl(e,t)}return null}function p(e,t,n,r){var a=null!==t?t.key:null;if("string"==typeof n||"number"==typeof n)return null!==a?null:u(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case E:return n.key===a?n.type===_?f(e,t,n.props.children,r,a):s(e,t,n,r):null;case S:return n.key===a?c(e,t,n,r):null}if(gl(n)||A(n))return null!==a?null:f(e,t,n,r,null);bl(e,n)}return null}function m(e,t,n,r,a){if("string"==typeof r||"number"==typeof r)return u(t,e=e.get(n)||null,""+r,a);if("object"==typeof r&&null!==r){switch(r.$$typeof){case E:return e=e.get(null===r.key?n:r.key)||null,r.type===_?f(t,e,r.props.children,a,r.key):s(t,e,r,a);case S:return c(t,e=e.get(null===r.key?n:r.key)||null,r,a)}if(gl(r)||A(r))return f(t,e=e.get(n)||null,r,a,null);bl(t,r)}return null}function h(a,o,i,u){for(var s=null,c=null,f=o,h=o=0,y=null;null!==f&&h<i.length;h++){f.index>h?(y=f,f=null):y=f.sibling;var g=p(a,f,i[h],u);if(null===g){null===f&&(f=y);break}e&&f&&null===g.alternate&&t(a,f),o=l(g,o,h),null===c?s=g:c.sibling=g,c=g,f=y}if(h===i.length)return n(a,f),s;if(null===f){for(;h<i.length;h++)null!==(f=d(a,i[h],u))&&(o=l(f,o,h),null===c?s=f:c.sibling=f,c=f);return s}for(f=r(a,f);h<i.length;h++)null!==(y=m(f,a,h,i[h],u))&&(e&&null!==y.alternate&&f.delete(null===y.key?h:y.key),o=l(y,o,h),null===c?s=y:c.sibling=y,c=y);return e&&f.forEach((function(e){return t(a,e)})),s}function y(a,i,u,s){var c=A(u);if("function"!=typeof c)throw Error(o(150));if(null==(u=c.call(u)))throw Error(o(151));for(var f=c=null,h=i,y=i=0,g=null,v=u.next();null!==h&&!v.done;y++,v=u.next()){h.index>y?(g=h,h=null):g=h.sibling;var b=p(a,h,v.value,s);if(null===b){null===h&&(h=g);break}e&&h&&null===b.alternate&&t(a,h),i=l(b,i,y),null===f?c=b:f.sibling=b,f=b,h=g}if(v.done)return n(a,h),c;if(null===h){for(;!v.done;y++,v=u.next())null!==(v=d(a,v.value,s))&&(i=l(v,i,y),null===f?c=v:f.sibling=v,f=v);return c}for(h=r(a,h);!v.done;y++,v=u.next())null!==(v=m(h,a,y,v.value,s))&&(e&&null!==v.alternate&&h.delete(null===v.key?y:v.key),i=l(v,i,y),null===f?c=v:f.sibling=v,f=v);return e&&h.forEach((function(e){return t(a,e)})),c}return function(e,r,l,u){var s="object"==typeof l&&null!==l&&l.type===_&&null===l.key;s&&(l=l.props.children);var c="object"==typeof l&&null!==l;if(c)switch(l.$$typeof){case E:e:{for(c=l.key,s=r;null!==s;){if(s.key===c){switch(s.tag){case 7:if(l.type===_){n(e,s.sibling),(r=a(s,l.props.children)).return=e,e=r;break e}break;default:if(s.elementType===l.type){n(e,s.sibling),(r=a(s,l.props)).ref=vl(e,s,l),r.return=e,e=r;break e}}n(e,s);break}t(e,s),s=s.sibling}l.type===_?((r=Qu(l.props.children,e.mode,u,l.key)).return=e,e=r):((u=Uu(l.type,l.key,l.props,null,e.mode,u)).ref=vl(e,r,l),u.return=e,e=u)}return i(e);case S:e:{for(s=l.key;null!==r;){if(r.key===s){if(4===r.tag&&r.stateNode.containerInfo===l.containerInfo&&r.stateNode.implementation===l.implementation){n(e,r.sibling),(r=a(r,l.children||[])).return=e,e=r;break e}n(e,r);break}t(e,r),r=r.sibling}(r=Vu(l,e.mode,u)).return=e,e=r}return i(e)}if("string"==typeof l||"number"==typeof l)return l=""+l,null!==r&&6===r.tag?(n(e,r.sibling),(r=a(r,l)).return=e,e=r):(n(e,r),(r=Hu(l,e.mode,u)).return=e,e=r),i(e);if(gl(l))return h(e,r,l,u);if(A(l))return y(e,r,l,u);if(c&&bl(e,l),void 0===l&&!s)switch(e.tag){case 1:case 22:case 0:case 11:case 15:throw Error(o(152,q(e.type)||"Component"))}return n(e,r)}}var kl=wl(!0),El=wl(!1),Sl={},_l=aa(Sl),xl=aa(Sl),Cl=aa(Sl);function Pl(e){if(e===Sl)throw Error(o(174));return e}function Tl(e,t){switch(oa(Cl,t),oa(xl,e),oa(_l,Sl),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:me(null,"");break;default:t=me(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}la(_l),oa(_l,t)}function Nl(){la(_l),la(xl),la(Cl)}function Ll(e){Pl(Cl.current);var t=Pl(_l.current),n=me(t,e.type);t!==n&&(oa(xl,e),oa(_l,n))}function Il(e){xl.current===e&&(la(_l),la(xl))}var zl=aa(0);function Ol(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!=(64&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Ml=null,Rl=null,jl=!1;function Dl(e,t){var n=Du(5,null,null,0);n.elementType="DELETED",n.type="DELETED",n.stateNode=t,n.return=e,n.flags=8,null!==e.lastEffect?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n}function Fl(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,!0);case 13:default:return!1}}function Bl(e){if(jl){var t=Rl;if(t){var n=t;if(!Fl(e,t)){if(!(t=Hr(n.nextSibling))||!Fl(e,t))return e.flags=-1025&e.flags|2,jl=!1,void(Ml=e);Dl(Ml,n)}Ml=e,Rl=Hr(t.firstChild)}else e.flags=-1025&e.flags|2,jl=!1,Ml=e}}function Ul(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;Ml=e}function Ql(e){if(e!==Ml)return!1;if(!jl)return Ul(e),jl=!0,!1;var t=e.type;if(5!==e.tag||"head"!==t&&"body"!==t&&!Br(t,e.memoizedProps))for(t=Rl;t;)Dl(e,t),t=Hr(t.nextSibling);if(Ul(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(o(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){Rl=Hr(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}Rl=null}}else Rl=Ml?Hr(e.stateNode.nextSibling):null;return!0}function Al(){Rl=Ml=null,jl=!1}var Hl=[];function Vl(){for(var e=0;e<Hl.length;e++)Hl[e]._workInProgressVersionPrimary=null;Hl.length=0}var $l=k.ReactCurrentDispatcher,Wl=k.ReactCurrentBatchConfig,ql=0,Kl=null,Yl=null,Xl=null,Gl=!1,Jl=!1;function Zl(){throw Error(o(321))}function eo(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!or(e[n],t[n]))return!1;return!0}function to(e,t,n,r,a,l){if(ql=l,Kl=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,$l.current=null===e||null===e.memoizedState?To:No,e=n(r,a),Jl){l=0;do{if(Jl=!1,!(25>l))throw Error(o(301));l+=1,Xl=Yl=null,t.updateQueue=null,$l.current=Lo,e=n(r,a)}while(Jl)}if($l.current=Po,t=null!==Yl&&null!==Yl.next,ql=0,Xl=Yl=Kl=null,Gl=!1,t)throw Error(o(300));return e}function no(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===Xl?Kl.memoizedState=Xl=e:Xl=Xl.next=e,Xl}function ro(){if(null===Yl){var e=Kl.alternate;e=null!==e?e.memoizedState:null}else e=Yl.next;var t=null===Xl?Kl.memoizedState:Xl.next;if(null!==t)Xl=t,Yl=e;else{if(null===e)throw Error(o(310));e={memoizedState:(Yl=e).memoizedState,baseState:Yl.baseState,baseQueue:Yl.baseQueue,queue:Yl.queue,next:null},null===Xl?Kl.memoizedState=Xl=e:Xl=Xl.next=e}return Xl}function ao(e,t){return"function"==typeof t?t(e):t}function lo(e){var t=ro(),n=t.queue;if(null===n)throw Error(o(311));n.lastRenderedReducer=e;var r=Yl,a=r.baseQueue,l=n.pending;if(null!==l){if(null!==a){var i=a.next;a.next=l.next,l.next=i}r.baseQueue=a=l,n.pending=null}if(null!==a){a=a.next,r=r.baseState;var u=i=l=null,s=a;do{var c=s.lane;if((ql&c)===c)null!==u&&(u=u.next={lane:0,action:s.action,eagerReducer:s.eagerReducer,eagerState:s.eagerState,next:null}),r=s.eagerReducer===e?s.eagerState:e(r,s.action);else{var f={lane:c,action:s.action,eagerReducer:s.eagerReducer,eagerState:s.eagerState,next:null};null===u?(i=u=f,l=r):u=u.next=f,Kl.lanes|=c,Mi|=c}s=s.next}while(null!==s&&s!==a);null===u?l=r:u.next=i,or(r,t.memoizedState)||(zo=!0),t.memoizedState=r,t.baseState=l,t.baseQueue=u,n.lastRenderedState=r}return[t.memoizedState,n.dispatch]}function oo(e){var t=ro(),n=t.queue;if(null===n)throw Error(o(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,l=t.memoizedState;if(null!==a){n.pending=null;var i=a=a.next;do{l=e(l,i.action),i=i.next}while(i!==a);or(l,t.memoizedState)||(zo=!0),t.memoizedState=l,null===t.baseQueue&&(t.baseState=l),n.lastRenderedState=l}return[l,r]}function io(e,t,n){var r=t._getVersion;r=r(t._source);var a=t._workInProgressVersionPrimary;if(null!==a?e=a===r:(e=e.mutableReadLanes,(e=(ql&e)===e)&&(t._workInProgressVersionPrimary=r,Hl.push(t))),e)return n(t._source);throw Hl.push(t),Error(o(350))}function uo(e,t,n,r){var a=Ci;if(null===a)throw Error(o(349));var l=t._getVersion,i=l(t._source),u=$l.current,s=u.useState((function(){return io(a,t,n)})),c=s[1],f=s[0];s=Xl;var d=e.memoizedState,p=d.refs,m=p.getSnapshot,h=d.source;d=d.subscribe;var y=Kl;return e.memoizedState={refs:p,source:t,subscribe:r},u.useEffect((function(){p.getSnapshot=n,p.setSnapshot=c;var e=l(t._source);if(!or(i,e)){e=n(t._source),or(f,e)||(c(e),e=ou(y),a.mutableReadLanes|=e&a.pendingLanes),e=a.mutableReadLanes,a.entangledLanes|=e;for(var r=a.entanglements,o=e;0<o;){var u=31-Ht(o),s=1<<u;r[u]|=e,o&=~s}}}),[n,t,r]),u.useEffect((function(){return r(t._source,(function(){var e=p.getSnapshot,n=p.setSnapshot;try{n(e(t._source));var r=ou(y);a.mutableReadLanes|=r&a.pendingLanes}catch(e){n((function(){throw e}))}}))}),[t,r]),or(m,n)&&or(h,t)&&or(d,r)||((e={pending:null,dispatch:null,lastRenderedReducer:ao,lastRenderedState:f}).dispatch=c=Co.bind(null,Kl,e),s.queue=e,s.baseQueue=null,f=io(a,t,n),s.memoizedState=s.baseState=f),f}function so(e,t,n){return uo(ro(),e,t,n)}function co(e){var t=no();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e=(e=t.queue={pending:null,dispatch:null,lastRenderedReducer:ao,lastRenderedState:e}).dispatch=Co.bind(null,Kl,e),[t.memoizedState,e]}function fo(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=Kl.updateQueue)?(t={lastEffect:null},Kl.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function po(e){return e={current:e},no().memoizedState=e}function mo(){return ro().memoizedState}function ho(e,t,n,r){var a=no();Kl.flags|=e,a.memoizedState=fo(1|t,n,void 0,void 0===r?null:r)}function yo(e,t,n,r){var a=ro();r=void 0===r?null:r;var l=void 0;if(null!==Yl){var o=Yl.memoizedState;if(l=o.destroy,null!==r&&eo(r,o.deps))return void fo(t,n,l,r)}Kl.flags|=e,a.memoizedState=fo(1|t,n,l,r)}function go(e,t){return ho(516,4,e,t)}function vo(e,t){return yo(516,4,e,t)}function bo(e,t){return yo(4,2,e,t)}function wo(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!=t?(e=e(),t.current=e,function(){t.current=null}):void 0}function ko(e,t,n){return n=null!=n?n.concat([e]):null,yo(4,2,wo.bind(null,t,e),n)}function Eo(){}function So(e,t){var n=ro();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&eo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function _o(e,t){var n=ro();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&eo(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function xo(e,t){var n=Ba();Qa(98>n?98:n,(function(){e(!0)})),Qa(97<n?97:n,(function(){var n=Wl.transition;Wl.transition=1;try{e(!1),t()}finally{Wl.transition=n}}))}function Co(e,t,n){var r=lu(),a=ou(e),l={lane:a,action:n,eagerReducer:null,eagerState:null,next:null},o=t.pending;if(null===o?l.next=l:(l.next=o.next,o.next=l),t.pending=l,o=e.alternate,e===Kl||null!==o&&o===Kl)Jl=Gl=!0;else{if(0===e.lanes&&(null===o||0===o.lanes)&&null!==(o=t.lastRenderedReducer))try{var i=t.lastRenderedState,u=o(i,n);if(l.eagerReducer=o,l.eagerState=u,or(u,i))return}catch(e){}iu(e,a,r)}}var Po={readContext:tl,useCallback:Zl,useContext:Zl,useEffect:Zl,useImperativeHandle:Zl,useLayoutEffect:Zl,useMemo:Zl,useReducer:Zl,useRef:Zl,useState:Zl,useDebugValue:Zl,useDeferredValue:Zl,useTransition:Zl,useMutableSource:Zl,useOpaqueIdentifier:Zl,unstable_isNewReconciler:!1},To={readContext:tl,useCallback:function(e,t){return no().memoizedState=[e,void 0===t?null:t],e},useContext:tl,useEffect:go,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,ho(4,2,wo.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ho(4,2,e,t)},useMemo:function(e,t){var n=no();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=no();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e=(e=r.queue={pending:null,dispatch:null,lastRenderedReducer:e,lastRenderedState:t}).dispatch=Co.bind(null,Kl,e),[r.memoizedState,e]},useRef:po,useState:co,useDebugValue:Eo,useDeferredValue:function(e){var t=co(e),n=t[0],r=t[1];return go((function(){var t=Wl.transition;Wl.transition=1;try{r(e)}finally{Wl.transition=t}}),[e]),n},useTransition:function(){var e=co(!1),t=e[0];return po(e=xo.bind(null,e[1])),[e,t]},useMutableSource:function(e,t,n){var r=no();return r.memoizedState={refs:{getSnapshot:t,setSnapshot:null},source:e,subscribe:n},uo(r,e,t,n)},useOpaqueIdentifier:function(){if(jl){var e=!1,t=function(e){return{$$typeof:R,toString:e,valueOf:e}}((function(){throw e||(e=!0,n("r:"+($r++).toString(36))),Error(o(355))})),n=co(t)[1];return 0==(2&Kl.mode)&&(Kl.flags|=516,fo(5,(function(){n("r:"+($r++).toString(36))}),void 0,null)),t}return co(t="r:"+($r++).toString(36)),t},unstable_isNewReconciler:!1},No={readContext:tl,useCallback:So,useContext:tl,useEffect:vo,useImperativeHandle:ko,useLayoutEffect:bo,useMemo:_o,useReducer:lo,useRef:mo,useState:function(){return lo(ao)},useDebugValue:Eo,useDeferredValue:function(e){var t=lo(ao),n=t[0],r=t[1];return vo((function(){var t=Wl.transition;Wl.transition=1;try{r(e)}finally{Wl.transition=t}}),[e]),n},useTransition:function(){var e=lo(ao)[0];return[mo().current,e]},useMutableSource:so,useOpaqueIdentifier:function(){return lo(ao)[0]},unstable_isNewReconciler:!1},Lo={readContext:tl,useCallback:So,useContext:tl,useEffect:vo,useImperativeHandle:ko,useLayoutEffect:bo,useMemo:_o,useReducer:oo,useRef:mo,useState:function(){return oo(ao)},useDebugValue:Eo,useDeferredValue:function(e){var t=oo(ao),n=t[0],r=t[1];return vo((function(){var t=Wl.transition;Wl.transition=1;try{r(e)}finally{Wl.transition=t}}),[e]),n},useTransition:function(){var e=oo(ao)[0];return[mo().current,e]},useMutableSource:so,useOpaqueIdentifier:function(){return oo(ao)[0]},unstable_isNewReconciler:!1},Io=k.ReactCurrentOwner,zo=!1;function Oo(e,t,n,r){t.child=null===e?El(t,null,n,r):kl(t,e.child,n,r)}function Mo(e,t,n,r,a){n=n.render;var l=t.ref;return el(t,a),r=to(e,t,n,r,l,a),null===e||zo?(t.flags|=1,Oo(e,t,r,a),t.child):(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~a,ei(e,t,a))}function Ro(e,t,n,r,a,l){if(null===e){var o=n.type;return"function"!=typeof o||Fu(o)||void 0!==o.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Uu(n.type,null,r,t,t.mode,l)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=o,jo(e,t,o,r,a,l))}return o=e.child,0==(a&l)&&(a=o.memoizedProps,(n=null!==(n=n.compare)?n:ur)(a,r)&&e.ref===t.ref)?ei(e,t,l):(t.flags|=1,(e=Bu(o,r)).ref=t.ref,e.return=t,t.child=e)}function jo(e,t,n,r,a,l){if(null!==e&&ur(e.memoizedProps,r)&&e.ref===t.ref){if(zo=!1,0==(l&a))return t.lanes=e.lanes,ei(e,t,l);0!=(16384&e.flags)&&(zo=!0)}return Bo(e,t,n,r,l)}function Do(e,t,n){var r=t.pendingProps,a=r.children,l=null!==e?e.memoizedState:null;if("hidden"===r.mode||"unstable-defer-without-hiding"===r.mode)if(0==(4&t.mode))t.memoizedState={baseLanes:0},hu(t,n);else{if(0==(1073741824&n))return e=null!==l?l.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e},hu(t,e),null;t.memoizedState={baseLanes:0},hu(t,null!==l?l.baseLanes:n)}else null!==l?(r=l.baseLanes|n,t.memoizedState=null):r=n,hu(t,r);return Oo(e,t,a,n),t.child}function Fo(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=128)}function Bo(e,t,n,r,a){var l=da(n)?ca:ua.current;return l=fa(t,l),el(t,a),n=to(e,t,n,r,l,a),null===e||zo?(t.flags|=1,Oo(e,t,n,a),t.child):(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~a,ei(e,t,a))}function Uo(e,t,n,r,a){if(da(n)){var l=!0;ya(t)}else l=!1;if(el(t,a),null===t.stateNode)null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),ml(t,n,r),yl(t,n,r,a),r=!0;else if(null===e){var o=t.stateNode,i=t.memoizedProps;o.props=i;var u=o.context,s=n.contextType;"object"==typeof s&&null!==s?s=tl(s):s=fa(t,s=da(n)?ca:ua.current);var c=n.getDerivedStateFromProps,f="function"==typeof c||"function"==typeof o.getSnapshotBeforeUpdate;f||"function"!=typeof o.UNSAFE_componentWillReceiveProps&&"function"!=typeof o.componentWillReceiveProps||(i!==r||u!==s)&&hl(t,o,r,s),nl=!1;var d=t.memoizedState;o.state=d,ul(t,r,o,a),u=t.memoizedState,i!==r||d!==u||sa.current||nl?("function"==typeof c&&(fl(t,n,c,r),u=t.memoizedState),(i=nl||pl(t,n,i,r,d,u,s))?(f||"function"!=typeof o.UNSAFE_componentWillMount&&"function"!=typeof o.componentWillMount||("function"==typeof o.componentWillMount&&o.componentWillMount(),"function"==typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount()),"function"==typeof o.componentDidMount&&(t.flags|=4)):("function"==typeof o.componentDidMount&&(t.flags|=4),t.memoizedProps=r,t.memoizedState=u),o.props=r,o.state=u,o.context=s,r=i):("function"==typeof o.componentDidMount&&(t.flags|=4),r=!1)}else{o=t.stateNode,al(e,t),i=t.memoizedProps,s=t.type===t.elementType?i:Wa(t.type,i),o.props=s,f=t.pendingProps,d=o.context,"object"==typeof(u=n.contextType)&&null!==u?u=tl(u):u=fa(t,u=da(n)?ca:ua.current);var p=n.getDerivedStateFromProps;(c="function"==typeof p||"function"==typeof o.getSnapshotBeforeUpdate)||"function"!=typeof o.UNSAFE_componentWillReceiveProps&&"function"!=typeof o.componentWillReceiveProps||(i!==f||d!==u)&&hl(t,o,r,u),nl=!1,d=t.memoizedState,o.state=d,ul(t,r,o,a);var m=t.memoizedState;i!==f||d!==m||sa.current||nl?("function"==typeof p&&(fl(t,n,p,r),m=t.memoizedState),(s=nl||pl(t,n,s,r,d,m,u))?(c||"function"!=typeof o.UNSAFE_componentWillUpdate&&"function"!=typeof o.componentWillUpdate||("function"==typeof o.componentWillUpdate&&o.componentWillUpdate(r,m,u),"function"==typeof o.UNSAFE_componentWillUpdate&&o.UNSAFE_componentWillUpdate(r,m,u)),"function"==typeof o.componentDidUpdate&&(t.flags|=4),"function"==typeof o.getSnapshotBeforeUpdate&&(t.flags|=256)):("function"!=typeof o.componentDidUpdate||i===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),"function"!=typeof o.getSnapshotBeforeUpdate||i===e.memoizedProps&&d===e.memoizedState||(t.flags|=256),t.memoizedProps=r,t.memoizedState=m),o.props=r,o.state=m,o.context=u,r=s):("function"!=typeof o.componentDidUpdate||i===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),"function"!=typeof o.getSnapshotBeforeUpdate||i===e.memoizedProps&&d===e.memoizedState||(t.flags|=256),r=!1)}return Qo(e,t,n,r,l,a)}function Qo(e,t,n,r,a,l){Fo(e,t);var o=0!=(64&t.flags);if(!r&&!o)return a&&ga(t,n,!1),ei(e,t,l);r=t.stateNode,Io.current=t;var i=o&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&o?(t.child=kl(t,e.child,null,l),t.child=kl(t,null,i,l)):Oo(e,t,i,l),t.memoizedState=r.state,a&&ga(t,n,!0),t.child}function Ao(e){var t=e.stateNode;t.pendingContext?ma(0,t.pendingContext,t.pendingContext!==t.context):t.context&&ma(0,t.context,!1),Tl(e,t.containerInfo)}var Ho,Vo,$o,Wo={dehydrated:null,retryLane:0};function qo(e,t,n){var r,a=t.pendingProps,l=zl.current,o=!1;return(r=0!=(64&t.flags))||(r=(null===e||null!==e.memoizedState)&&0!=(2&l)),r?(o=!0,t.flags&=-65):null!==e&&null===e.memoizedState||void 0===a.fallback||!0===a.unstable_avoidThisFallback||(l|=1),oa(zl,1&l),null===e?(void 0!==a.fallback&&Bl(t),e=a.children,l=a.fallback,o?(e=Ko(t,e,l,n),t.child.memoizedState={baseLanes:n},t.memoizedState=Wo,e):"number"==typeof a.unstable_expectedLoadTime?(e=Ko(t,e,l,n),t.child.memoizedState={baseLanes:n},t.memoizedState=Wo,t.lanes=33554432,e):((n=Au({mode:"visible",children:e},t.mode,n,null)).return=t,t.child=n)):(e.memoizedState,o?(a=Xo(e,t,a.children,a.fallback,n),o=t.child,l=e.child.memoizedState,o.memoizedState=null===l?{baseLanes:n}:{baseLanes:l.baseLanes|n},o.childLanes=e.childLanes&~n,t.memoizedState=Wo,a):(n=Yo(e,t,a.children,n),t.memoizedState=null,n))}function Ko(e,t,n,r){var a=e.mode,l=e.child;return t={mode:"hidden",children:t},0==(2&a)&&null!==l?(l.childLanes=0,l.pendingProps=t):l=Au(t,a,0,null),n=Qu(n,a,r,null),l.return=e,n.return=e,l.sibling=n,e.child=l,n}function Yo(e,t,n,r){var a=e.child;return e=a.sibling,n=Bu(a,{mode:"visible",children:n}),0==(2&t.mode)&&(n.lanes=r),n.return=t,n.sibling=null,null!==e&&(e.nextEffect=null,e.flags=8,t.firstEffect=t.lastEffect=e),t.child=n}function Xo(e,t,n,r,a){var l=t.mode,o=e.child;e=o.sibling;var i={mode:"hidden",children:n};return 0==(2&l)&&t.child!==o?((n=t.child).childLanes=0,n.pendingProps=i,null!==(o=n.lastEffect)?(t.firstEffect=n.firstEffect,t.lastEffect=o,o.nextEffect=null):t.firstEffect=t.lastEffect=null):n=Bu(o,i),null!==e?r=Bu(e,r):(r=Qu(r,l,a,null)).flags|=2,r.return=t,n.return=t,n.sibling=r,t.child=n,r}function Go(e,t){e.lanes|=t;var n=e.alternate;null!==n&&(n.lanes|=t),Za(e.return,t)}function Jo(e,t,n,r,a,l){var o=e.memoizedState;null===o?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:a,lastEffect:l}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=a,o.lastEffect=l)}function Zo(e,t,n){var r=t.pendingProps,a=r.revealOrder,l=r.tail;if(Oo(e,t,r.children,n),0!=(2&(r=zl.current)))r=1&r|2,t.flags|=64;else{if(null!==e&&0!=(64&e.flags))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&Go(e,n);else if(19===e.tag)Go(e,n);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(oa(zl,r),0==(2&t.mode))t.memoizedState=null;else switch(a){case"forwards":for(n=t.child,a=null;null!==n;)null!==(e=n.alternate)&&null===Ol(e)&&(a=n),n=n.sibling;null===(n=a)?(a=t.child,t.child=null):(a=n.sibling,n.sibling=null),Jo(t,!1,a,n,l,t.lastEffect);break;case"backwards":for(n=null,a=t.child,t.child=null;null!==a;){if(null!==(e=a.alternate)&&null===Ol(e)){t.child=a;break}e=a.sibling,a.sibling=n,n=a,a=e}Jo(t,!0,n,null,l,t.lastEffect);break;case"together":Jo(t,!1,null,null,void 0,t.lastEffect);break;default:t.memoizedState=null}return t.child}function ei(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),Mi|=t.lanes,0!=(n&t.childLanes)){if(null!==e&&t.child!==e.child)throw Error(o(153));if(null!==t.child){for(n=Bu(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Bu(e,e.pendingProps)).return=t;n.sibling=null}return t.child}return null}function ti(e,t){if(!jl)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function ni(e,t,n){var r=t.pendingProps;switch(t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;case 1:return da(t.type)&&pa(),null;case 3:return Nl(),la(sa),la(ua),Vl(),(r=t.stateNode).pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(Ql(t)?t.flags|=4:r.hydrate||(t.flags|=256)),null;case 5:Il(t);var l=Pl(Cl.current);if(n=t.type,null!==e&&null!=t.stateNode)Vo(e,t,n,r),e.ref!==t.ref&&(t.flags|=128);else{if(!r){if(null===t.stateNode)throw Error(o(166));return null}if(e=Pl(_l.current),Ql(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[qr]=t,r[Kr]=i,n){case"dialog":xr("cancel",r),xr("close",r);break;case"iframe":case"object":case"embed":xr("load",r);break;case"video":case"audio":for(e=0;e<kr.length;e++)xr(kr[e],r);break;case"source":xr("error",r);break;case"img":case"image":case"link":xr("error",r),xr("load",r);break;case"details":xr("toggle",r);break;case"input":ee(r,i),xr("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},xr("invalid",r);break;case"textarea":ue(r,i),xr("invalid",r)}for(var s in Se(n,i),e=null,i)i.hasOwnProperty(s)&&(l=i[s],"children"===s?"string"==typeof l?r.textContent!==l&&(e=["children",l]):"number"==typeof l&&r.textContent!==""+l&&(e=["children",""+l]):u.hasOwnProperty(s)&&null!=l&&"onScroll"===s&&xr("scroll",r));switch(n){case"input":X(r),re(r,i,!0);break;case"textarea":X(r),ce(r);break;case"select":case"option":break;default:"function"==typeof i.onClick&&(r.onclick=Rr)}r=e,t.updateQueue=r,null!==r&&(t.flags|=4)}else{switch(s=9===l.nodeType?l:l.ownerDocument,e===fe&&(e=pe(n)),e===fe?"script"===n?((e=s.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"==typeof r.is?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),"select"===n&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[qr]=t,e[Kr]=r,Ho(e,t),t.stateNode=e,s=_e(n,r),n){case"dialog":xr("cancel",e),xr("close",e),l=r;break;case"iframe":case"object":case"embed":xr("load",e),l=r;break;case"video":case"audio":for(l=0;l<kr.length;l++)xr(kr[l],e);l=r;break;case"source":xr("error",e),l=r;break;case"img":case"image":case"link":xr("error",e),xr("load",e),l=r;break;case"details":xr("toggle",e),l=r;break;case"input":ee(e,r),l=Z(e,r),xr("invalid",e);break;case"option":l=le(e,r);break;case"select":e._wrapperState={wasMultiple:!!r.multiple},l=a({},r,{value:void 0}),xr("invalid",e);break;case"textarea":ue(e,r),l=ie(e,r),xr("invalid",e);break;default:l=r}Se(n,l);var c=l;for(i in c)if(c.hasOwnProperty(i)){var f=c[i];"style"===i?ke(e,f):"dangerouslySetInnerHTML"===i?null!=(f=f?f.__html:void 0)&&ye(e,f):"children"===i?"string"==typeof f?("textarea"!==n||""!==f)&&ge(e,f):"number"==typeof f&&ge(e,""+f):"suppressContentEditableWarning"!==i&&"suppressHydrationWarning"!==i&&"autoFocus"!==i&&(u.hasOwnProperty(i)?null!=f&&"onScroll"===i&&xr("scroll",e):null!=f&&w(e,i,f,s))}switch(n){case"input":X(e),re(e,r,!1);break;case"textarea":X(e),ce(e);break;case"option":null!=r.value&&e.setAttribute("value",""+K(r.value));break;case"select":e.multiple=!!r.multiple,null!=(i=r.value)?oe(e,!!r.multiple,i,!1):null!=r.defaultValue&&oe(e,!!r.multiple,r.defaultValue,!0);break;default:"function"==typeof l.onClick&&(e.onclick=Rr)}Fr(n,r)&&(t.flags|=4)}null!==t.ref&&(t.flags|=128)}return null;case 6:if(e&&null!=t.stateNode)$o(0,t,e.memoizedProps,r);else{if("string"!=typeof r&&null===t.stateNode)throw Error(o(166));n=Pl(Cl.current),Pl(_l.current),Ql(t)?(r=t.stateNode,n=t.memoizedProps,r[qr]=t,r.nodeValue!==n&&(t.flags|=4)):((r=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[qr]=t,t.stateNode=r)}return null;case 13:return la(zl),r=t.memoizedState,0!=(64&t.flags)?(t.lanes=n,t):(r=null!==r,n=!1,null===e?void 0!==t.memoizedProps.fallback&&Ql(t):n=null!==e.memoizedState,r&&!n&&0!=(2&t.mode)&&(null===e&&!0!==t.memoizedProps.unstable_avoidThisFallback||0!=(1&zl.current)?0===Ii&&(Ii=3):(0!==Ii&&3!==Ii||(Ii=4),null===Ci||0==(134217727&Mi)&&0==(134217727&Ri)||fu(Ci,Ti))),(r||n)&&(t.flags|=4),null);case 4:return Nl(),null===e&&Pr(t.stateNode.containerInfo),null;case 10:return Ja(t),null;case 17:return da(t.type)&&pa(),null;case 19:if(la(zl),null===(r=t.memoizedState))return null;if(i=0!=(64&t.flags),null===(s=r.rendering))if(i)ti(r,!1);else{if(0!==Ii||null!==e&&0!=(64&e.flags))for(e=t.child;null!==e;){if(null!==(s=Ol(e))){for(t.flags|=64,ti(r,!1),null!==(i=s.updateQueue)&&(t.updateQueue=i,t.flags|=4),null===r.lastEffect&&(t.firstEffect=null),t.lastEffect=r.lastEffect,r=n,n=t.child;null!==n;)e=r,(i=n).flags&=2,i.nextEffect=null,i.firstEffect=null,i.lastEffect=null,null===(s=i.alternate)?(i.childLanes=0,i.lanes=e,i.child=null,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=s.childLanes,i.lanes=s.lanes,i.child=s.child,i.memoizedProps=s.memoizedProps,i.memoizedState=s.memoizedState,i.updateQueue=s.updateQueue,i.type=s.type,e=s.dependencies,i.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return oa(zl,1&zl.current|2),t.child}e=e.sibling}null!==r.tail&&Fa()>Bi&&(t.flags|=64,i=!0,ti(r,!1),t.lanes=33554432)}else{if(!i)if(null!==(e=Ol(s))){if(t.flags|=64,i=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),ti(r,!0),null===r.tail&&"hidden"===r.tailMode&&!s.alternate&&!jl)return null!==(t=t.lastEffect=r.lastEffect)&&(t.nextEffect=null),null}else 2*Fa()-r.renderingStartTime>Bi&&1073741824!==n&&(t.flags|=64,i=!0,ti(r,!1),t.lanes=33554432);r.isBackwards?(s.sibling=t.child,t.child=s):(null!==(n=r.last)?n.sibling=s:t.child=s,r.last=s)}return null!==r.tail?(n=r.tail,r.rendering=n,r.tail=n.sibling,r.lastEffect=t.lastEffect,r.renderingStartTime=Fa(),n.sibling=null,t=zl.current,oa(zl,i?1&t|2:1&t),n):null;case 23:case 24:return yu(),null!==e&&null!==e.memoizedState!=(null!==t.memoizedState)&&"unstable-defer-without-hiding"!==r.mode&&(t.flags|=4),null}throw Error(o(156,t.tag))}function ri(e){switch(e.tag){case 1:da(e.type)&&pa();var t=e.flags;return 4096&t?(e.flags=-4097&t|64,e):null;case 3:if(Nl(),la(sa),la(ua),Vl(),0!=(64&(t=e.flags)))throw Error(o(285));return e.flags=-4097&t|64,e;case 5:return Il(e),null;case 13:return la(zl),4096&(t=e.flags)?(e.flags=-4097&t|64,e):null;case 19:return la(zl),null;case 4:return Nl(),null;case 10:return Ja(e),null;case 23:case 24:return yu(),null;default:return null}}function ai(e,t){try{var n="",r=t;do{n+=W(r),r=r.return}while(r);var a=n}catch(e){a="\nError generating stack: "+e.message+"\n"+e.stack}return{value:e,source:t,stack:a}}function li(e,t){try{console.error(t.value)}catch(e){setTimeout((function(){throw e}))}}Ho=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Vo=function(e,t,n,r){var l=e.memoizedProps;if(l!==r){e=t.stateNode,Pl(_l.current);var o,i=null;switch(n){case"input":l=Z(e,l),r=Z(e,r),i=[];break;case"option":l=le(e,l),r=le(e,r),i=[];break;case"select":l=a({},l,{value:void 0}),r=a({},r,{value:void 0}),i=[];break;case"textarea":l=ie(e,l),r=ie(e,r),i=[];break;default:"function"!=typeof l.onClick&&"function"==typeof r.onClick&&(e.onclick=Rr)}for(f in Se(n,r),n=null,l)if(!r.hasOwnProperty(f)&&l.hasOwnProperty(f)&&null!=l[f])if("style"===f){var s=l[f];for(o in s)s.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else"dangerouslySetInnerHTML"!==f&&"children"!==f&&"suppressContentEditableWarning"!==f&&"suppressHydrationWarning"!==f&&"autoFocus"!==f&&(u.hasOwnProperty(f)?i||(i=[]):(i=i||[]).push(f,null));for(f in r){var c=r[f];if(s=null!=l?l[f]:void 0,r.hasOwnProperty(f)&&c!==s&&(null!=c||null!=s))if("style"===f)if(s){for(o in s)!s.hasOwnProperty(o)||c&&c.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in c)c.hasOwnProperty(o)&&s[o]!==c[o]&&(n||(n={}),n[o]=c[o])}else n||(i||(i=[]),i.push(f,n)),n=c;else"dangerouslySetInnerHTML"===f?(c=c?c.__html:void 0,s=s?s.__html:void 0,null!=c&&s!==c&&(i=i||[]).push(f,c)):"children"===f?"string"!=typeof c&&"number"!=typeof c||(i=i||[]).push(f,""+c):"suppressContentEditableWarning"!==f&&"suppressHydrationWarning"!==f&&(u.hasOwnProperty(f)?(null!=c&&"onScroll"===f&&xr("scroll",e),i||s===c||(i=[])):"object"==typeof c&&null!==c&&c.$$typeof===R?c.toString():(i=i||[]).push(f,c))}n&&(i=i||[]).push("style",n);var f=i;(t.updateQueue=f)&&(t.flags|=4)}},$o=function(e,t,n,r){n!==r&&(t.flags|=4)};var oi="function"==typeof WeakMap?WeakMap:Map;function ii(e,t,n){(n=ll(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Hi||(Hi=!0,Vi=r),li(0,t)},n}function ui(e,t,n){(n=ll(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var a=t.value;n.payload=function(){return li(0,t),r(a)}}var l=e.stateNode;return null!==l&&"function"==typeof l.componentDidCatch&&(n.callback=function(){"function"!=typeof r&&(null===$i?$i=new Set([this]):$i.add(this),li(0,t));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}var si="function"==typeof WeakSet?WeakSet:Set;function ci(e){var t=e.ref;if(null!==t)if("function"==typeof t)try{t(null)}catch(t){Ou(e,t)}else t.current=null}function fi(e,t){switch(t.tag){case 0:case 11:case 15:case 22:return;case 1:if(256&t.flags&&null!==e){var n=e.memoizedProps,r=e.memoizedState;t=(e=t.stateNode).getSnapshotBeforeUpdate(t.elementType===t.type?n:Wa(t.type,n),r),e.__reactInternalSnapshotBeforeUpdate=t}return;case 3:return void(256&t.flags&&Ar(t.stateNode.containerInfo));case 5:case 6:case 4:case 17:return}throw Error(o(163))}function di(e,t,n){switch(n.tag){case 0:case 11:case 15:case 22:if(null!==(t=null!==(t=n.updateQueue)?t.lastEffect:null)){e=t=t.next;do{if(3==(3&e.tag)){var r=e.create;e.destroy=r()}e=e.next}while(e!==t)}if(null!==(t=null!==(t=n.updateQueue)?t.lastEffect:null)){e=t=t.next;do{var a=e;r=a.next,0!=(4&(a=a.tag))&&0!=(1&a)&&(Lu(n,e),Nu(n,e)),e=r}while(e!==t)}return;case 1:return e=n.stateNode,4&n.flags&&(null===t?e.componentDidMount():(r=n.elementType===n.type?t.memoizedProps:Wa(n.type,t.memoizedProps),e.componentDidUpdate(r,t.memoizedState,e.__reactInternalSnapshotBeforeUpdate))),void(null!==(t=n.updateQueue)&&sl(n,t,e));case 3:if(null!==(t=n.updateQueue)){if(e=null,null!==n.child)switch(n.child.tag){case 5:e=n.child.stateNode;break;case 1:e=n.child.stateNode}sl(n,t,e)}return;case 5:return e=n.stateNode,void(null===t&&4&n.flags&&Fr(n.type,n.memoizedProps)&&e.focus());case 6:case 4:case 12:return;case 13:return void(null===n.memoizedState&&(n=n.alternate,null!==n&&(n=n.memoizedState,null!==n&&(n=n.dehydrated,null!==n&&kt(n)))));case 19:case 17:case 20:case 21:case 23:case 24:return}throw Error(o(163))}function pi(e,t){for(var n=e;;){if(5===n.tag){var r=n.stateNode;if(t)"function"==typeof(r=r.style).setProperty?r.setProperty("display","none","important"):r.display="none";else{r=n.stateNode;var a=n.memoizedProps.style;a=null!=a&&a.hasOwnProperty("display")?a.display:null,r.style.display=we("display",a)}}else if(6===n.tag)n.stateNode.nodeValue=t?"":n.memoizedProps;else if((23!==n.tag&&24!==n.tag||null===n.memoizedState||n===e)&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===e)break;for(;null===n.sibling;){if(null===n.return||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}}function mi(e,t){if(ba&&"function"==typeof ba.onCommitFiberUnmount)try{ba.onCommitFiberUnmount(va,t)}catch(e){}switch(t.tag){case 0:case 11:case 14:case 15:case 22:if(null!==(e=t.updateQueue)&&null!==(e=e.lastEffect)){var n=e=e.next;do{var r=n,a=r.destroy;if(r=r.tag,void 0!==a)if(0!=(4&r))Lu(t,n);else{r=t;try{a()}catch(e){Ou(r,e)}}n=n.next}while(n!==e)}break;case 1:if(ci(t),"function"==typeof(e=t.stateNode).componentWillUnmount)try{e.props=t.memoizedProps,e.state=t.memoizedState,e.componentWillUnmount()}catch(e){Ou(t,e)}break;case 5:ci(t);break;case 4:vi(e,t)}}function hi(e){e.alternate=null,e.child=null,e.dependencies=null,e.firstEffect=null,e.lastEffect=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.return=null,e.updateQueue=null}function yi(e){return 5===e.tag||3===e.tag||4===e.tag}function gi(e){e:{for(var t=e.return;null!==t;){if(yi(t))break e;t=t.return}throw Error(o(160))}var n=t;switch(t=n.stateNode,n.tag){case 5:var r=!1;break;case 3:case 4:t=t.containerInfo,r=!0;break;default:throw Error(o(161))}16&n.flags&&(ge(t,""),n.flags&=-17);e:t:for(n=e;;){for(;null===n.sibling;){if(null===n.return||yi(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;5!==n.tag&&6!==n.tag&&18!==n.tag;){if(2&n.flags)continue t;if(null===n.child||4===n.tag)continue t;n.child.return=n,n=n.child}if(!(2&n.flags)){n=n.stateNode;break e}}r?function e(t,n,r){var a=t.tag,l=5===a||6===a;if(l)t=l?t.stateNode:t.stateNode.instance,n?8===r.nodeType?r.parentNode.insertBefore(t,n):r.insertBefore(t,n):(8===r.nodeType?(n=r.parentNode).insertBefore(t,r):(n=r).appendChild(t),null!==(r=r._reactRootContainer)&&void 0!==r||null!==n.onclick||(n.onclick=Rr));else if(4!==a&&null!==(t=t.child))for(e(t,n,r),t=t.sibling;null!==t;)e(t,n,r),t=t.sibling}(e,n,t):function e(t,n,r){var a=t.tag,l=5===a||6===a;if(l)t=l?t.stateNode:t.stateNode.instance,n?r.insertBefore(t,n):r.appendChild(t);else if(4!==a&&null!==(t=t.child))for(e(t,n,r),t=t.sibling;null!==t;)e(t,n,r),t=t.sibling}(e,n,t)}function vi(e,t){for(var n,r,a=t,l=!1;;){if(!l){l=a.return;e:for(;;){if(null===l)throw Error(o(160));switch(n=l.stateNode,l.tag){case 5:r=!1;break e;case 3:case 4:n=n.containerInfo,r=!0;break e}l=l.return}l=!0}if(5===a.tag||6===a.tag){e:for(var i=e,u=a,s=u;;)if(mi(i,s),null!==s.child&&4!==s.tag)s.child.return=s,s=s.child;else{if(s===u)break e;for(;null===s.sibling;){if(null===s.return||s.return===u)break e;s=s.return}s.sibling.return=s.return,s=s.sibling}r?(i=n,u=a.stateNode,8===i.nodeType?i.parentNode.removeChild(u):i.removeChild(u)):n.removeChild(a.stateNode)}else if(4===a.tag){if(null!==a.child){n=a.stateNode.containerInfo,r=!0,a.child.return=a,a=a.child;continue}}else if(mi(e,a),null!==a.child){a.child.return=a,a=a.child;continue}if(a===t)break;for(;null===a.sibling;){if(null===a.return||a.return===t)return;4===(a=a.return).tag&&(l=!1)}a.sibling.return=a.return,a=a.sibling}}function bi(e,t){switch(t.tag){case 0:case 11:case 14:case 15:case 22:var n=t.updateQueue;if(null!==(n=null!==n?n.lastEffect:null)){var r=n=n.next;do{3==(3&r.tag)&&(e=r.destroy,r.destroy=void 0,void 0!==e&&e()),r=r.next}while(r!==n)}return;case 1:return;case 5:if(null!=(n=t.stateNode)){r=t.memoizedProps;var a=null!==e?e.memoizedProps:r;e=t.type;var l=t.updateQueue;if(t.updateQueue=null,null!==l){for(n[Kr]=r,"input"===e&&"radio"===r.type&&null!=r.name&&te(n,r),_e(e,a),t=_e(e,r),a=0;a<l.length;a+=2){var i=l[a],u=l[a+1];"style"===i?ke(n,u):"dangerouslySetInnerHTML"===i?ye(n,u):"children"===i?ge(n,u):w(n,i,u,t)}switch(e){case"input":ne(n,r);break;case"textarea":se(n,r);break;case"select":e=n._wrapperState.wasMultiple,n._wrapperState.wasMultiple=!!r.multiple,null!=(l=r.value)?oe(n,!!r.multiple,l,!1):e!==!!r.multiple&&(null!=r.defaultValue?oe(n,!!r.multiple,r.defaultValue,!0):oe(n,!!r.multiple,r.multiple?[]:"",!1))}}}return;case 6:if(null===t.stateNode)throw Error(o(162));return void(t.stateNode.nodeValue=t.memoizedProps);case 3:return void((n=t.stateNode).hydrate&&(n.hydrate=!1,kt(n.containerInfo)));case 12:return;case 13:return null!==t.memoizedState&&(Fi=Fa(),pi(t.child,!0)),void wi(t);case 19:return void wi(t);case 17:return;case 23:case 24:return void pi(t,null!==t.memoizedState)}throw Error(o(163))}function wi(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new si),t.forEach((function(t){var r=Ru.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function ki(e,t){return null!==e&&(null===(e=e.memoizedState)||null!==e.dehydrated)&&(null!==(t=t.memoizedState)&&null===t.dehydrated)}var Ei=Math.ceil,Si=k.ReactCurrentDispatcher,_i=k.ReactCurrentOwner,xi=0,Ci=null,Pi=null,Ti=0,Ni=0,Li=aa(0),Ii=0,zi=null,Oi=0,Mi=0,Ri=0,ji=0,Di=null,Fi=0,Bi=1/0;function Ui(){Bi=Fa()+500}var Qi,Ai=null,Hi=!1,Vi=null,$i=null,Wi=!1,qi=null,Ki=90,Yi=[],Xi=[],Gi=null,Ji=0,Zi=null,eu=-1,tu=0,nu=0,ru=null,au=!1;function lu(){return 0!=(48&xi)?Fa():-1!==eu?eu:eu=Fa()}function ou(e){if(0==(2&(e=e.mode)))return 1;if(0==(4&e))return 99===Ba()?1:2;if(0===tu&&(tu=Oi),0!==$a.transition){0!==nu&&(nu=null!==Di?Di.pendingLanes:0),e=tu;var t=4186112&~nu;return 0===(t&=-t)&&(0===(t=(e=4186112&~e)&-e)&&(t=8192)),t}return e=Ba(),0!=(4&xi)&&98===e?e=Bt(12,tu):e=Bt(e=function(e){switch(e){case 99:return 15;case 98:return 10;case 97:case 96:return 8;case 95:return 2;default:return 0}}(e),tu),e}function iu(e,t,n){if(50<Ji)throw Ji=0,Zi=null,Error(o(185));if(null===(e=uu(e,t)))return null;At(e,t,n),e===Ci&&(Ri|=t,4===Ii&&fu(e,Ti));var r=Ba();1===t?0!=(8&xi)&&0==(48&xi)?du(e):(su(e,n),0===xi&&(Ui(),Ha())):(0==(4&xi)||98!==r&&99!==r||(null===Gi?Gi=new Set([e]):Gi.add(e)),su(e,n)),Di=e}function uu(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}function su(e,t){for(var n=e.callbackNode,r=e.suspendedLanes,a=e.pingedLanes,l=e.expirationTimes,i=e.pendingLanes;0<i;){var u=31-Ht(i),s=1<<u,c=l[u];if(-1===c){if(0==(s&r)||0!=(s&a)){c=t,jt(s);var f=Rt;l[u]=10<=f?c+250:6<=f?c+5e3:-1}}else c<=t&&(e.expiredLanes|=s);i&=~s}if(r=Dt(e,e===Ci?Ti:0),t=Rt,0===r)null!==n&&(n!==za&&Ea(n),e.callbackNode=null,e.callbackPriority=0);else{if(null!==n){if(e.callbackPriority===t)return;n!==za&&Ea(n)}15===t?(n=du.bind(null,e),null===Ma?(Ma=[n],Ra=ka(Pa,Va)):Ma.push(n),n=za):14===t?n=Aa(99,du.bind(null,e)):n=Aa(n=function(e){switch(e){case 15:case 14:return 99;case 13:case 12:case 11:case 10:return 98;case 9:case 8:case 7:case 6:case 4:case 5:return 97;case 3:case 2:case 1:return 95;case 0:return 90;default:throw Error(o(358,e))}}(t),cu.bind(null,e)),e.callbackPriority=t,e.callbackNode=n}}function cu(e){if(eu=-1,nu=tu=0,0!=(48&xi))throw Error(o(327));var t=e.callbackNode;if(Tu()&&e.callbackNode!==t)return null;var n=Dt(e,e===Ci?Ti:0);if(0===n)return null;var r=n,a=xi;xi|=16;var l=bu();for(Ci===e&&Ti===r||(Ui(),gu(e,r));;)try{Eu();break}catch(t){vu(e,t)}if(Ga(),Si.current=l,xi=a,null!==Pi?r=0:(Ci=null,Ti=0,r=Ii),0!=(Oi&Ri))gu(e,0);else if(0!==r){if(2===r&&(xi|=64,e.hydrate&&(e.hydrate=!1,Ar(e.containerInfo)),0!==(n=Ft(e))&&(r=wu(e,n))),1===r)throw t=zi,gu(e,0),fu(e,n),su(e,Fa()),t;switch(e.finishedWork=e.current.alternate,e.finishedLanes=n,r){case 0:case 1:throw Error(o(345));case 2:xu(e);break;case 3:if(fu(e,n),(62914560&n)===n&&10<(r=Fi+500-Fa())){if(0!==Dt(e,0))break;if(((a=e.suspendedLanes)&n)!==n){lu(),e.pingedLanes|=e.suspendedLanes&a;break}e.timeoutHandle=Ur(xu.bind(null,e),r);break}xu(e);break;case 4:if(fu(e,n),(4186112&n)===n)break;for(r=e.eventTimes,a=-1;0<n;){var i=31-Ht(n);l=1<<i,(i=r[i])>a&&(a=i),n&=~l}if(n=a,10<(n=(120>(n=Fa()-n)?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*Ei(n/1960))-n)){e.timeoutHandle=Ur(xu.bind(null,e),n);break}xu(e);break;case 5:xu(e);break;default:throw Error(o(329))}}return su(e,Fa()),e.callbackNode===t?cu.bind(null,e):null}function fu(e,t){for(t&=~ji,t&=~Ri,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Ht(t),r=1<<n;e[n]=-1,t&=~r}}function du(e){if(0!=(48&xi))throw Error(o(327));if(Tu(),e===Ci&&0!=(e.expiredLanes&Ti)){var t=Ti,n=wu(e,t);0!=(Oi&Ri)&&(n=wu(e,t=Dt(e,t)))}else n=wu(e,t=Dt(e,0));if(0!==e.tag&&2===n&&(xi|=64,e.hydrate&&(e.hydrate=!1,Ar(e.containerInfo)),0!==(t=Ft(e))&&(n=wu(e,t))),1===n)throw n=zi,gu(e,0),fu(e,t),su(e,Fa()),n;return e.finishedWork=e.current.alternate,e.finishedLanes=t,xu(e),su(e,Fa()),null}function pu(e,t){var n=xi;xi|=1;try{return e(t)}finally{0===(xi=n)&&(Ui(),Ha())}}function mu(e,t){var n=xi;xi&=-2,xi|=8;try{return e(t)}finally{0===(xi=n)&&(Ui(),Ha())}}function hu(e,t){oa(Li,Ni),Ni|=t,Oi|=t}function yu(){Ni=Li.current,la(Li)}function gu(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,Qr(n)),null!==Pi)for(n=Pi.return;null!==n;){var r=n;switch(r.tag){case 1:null!=(r=r.type.childContextTypes)&&pa();break;case 3:Nl(),la(sa),la(ua),Vl();break;case 5:Il(r);break;case 4:Nl();break;case 13:case 19:la(zl);break;case 10:Ja(r);break;case 23:case 24:yu()}n=n.return}Ci=e,Pi=Bu(e.current,null),Ti=Ni=Oi=t,Ii=0,zi=null,ji=Ri=Mi=0}function vu(e,t){for(;;){var n=Pi;try{if(Ga(),$l.current=Po,Gl){for(var r=Kl.memoizedState;null!==r;){var a=r.queue;null!==a&&(a.pending=null),r=r.next}Gl=!1}if(ql=0,Xl=Yl=Kl=null,Jl=!1,_i.current=null,null===n||null===n.return){Ii=1,zi=t,Pi=null;break}e:{var l=e,o=n.return,i=n,u=t;if(t=Ti,i.flags|=2048,i.firstEffect=i.lastEffect=null,null!==u&&"object"==typeof u&&"function"==typeof u.then){var s=u;if(0==(2&i.mode)){var c=i.alternate;c?(i.updateQueue=c.updateQueue,i.memoizedState=c.memoizedState,i.lanes=c.lanes):(i.updateQueue=null,i.memoizedState=null)}var f=0!=(1&zl.current),d=o;do{var p;if(p=13===d.tag){var m=d.memoizedState;if(null!==m)p=null!==m.dehydrated;else{var h=d.memoizedProps;p=void 0!==h.fallback&&(!0!==h.unstable_avoidThisFallback||!f)}}if(p){var y=d.updateQueue;if(null===y){var g=new Set;g.add(s),d.updateQueue=g}else y.add(s);if(0==(2&d.mode)){if(d.flags|=64,i.flags|=16384,i.flags&=-2981,1===i.tag)if(null===i.alternate)i.tag=17;else{var v=ll(-1,1);v.tag=2,ol(i,v)}i.lanes|=1;break e}u=void 0,i=t;var b=l.pingCache;if(null===b?(b=l.pingCache=new oi,u=new Set,b.set(s,u)):void 0===(u=b.get(s))&&(u=new Set,b.set(s,u)),!u.has(i)){u.add(i);var w=Mu.bind(null,l,s,i);s.then(w,w)}d.flags|=4096,d.lanes=t;break e}d=d.return}while(null!==d);u=Error((q(i.type)||"A React component")+" suspended while rendering, but no fallback UI was specified.\n\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.")}5!==Ii&&(Ii=2),u=ai(u,i),d=o;do{switch(d.tag){case 3:l=u,d.flags|=4096,t&=-t,d.lanes|=t,il(d,ii(0,l,t));break e;case 1:l=u;var k=d.type,E=d.stateNode;if(0==(64&d.flags)&&("function"==typeof k.getDerivedStateFromError||null!==E&&"function"==typeof E.componentDidCatch&&(null===$i||!$i.has(E)))){d.flags|=4096,t&=-t,d.lanes|=t,il(d,ui(d,l,t));break e}}d=d.return}while(null!==d)}_u(n)}catch(e){t=e,Pi===n&&null!==n&&(Pi=n=n.return);continue}break}}function bu(){var e=Si.current;return Si.current=Po,null===e?Po:e}function wu(e,t){var n=xi;xi|=16;var r=bu();for(Ci===e&&Ti===t||gu(e,t);;)try{ku();break}catch(t){vu(e,t)}if(Ga(),xi=n,Si.current=r,null!==Pi)throw Error(o(261));return Ci=null,Ti=0,Ii}function ku(){for(;null!==Pi;)Su(Pi)}function Eu(){for(;null!==Pi&&!Sa();)Su(Pi)}function Su(e){var t=Qi(e.alternate,e,Ni);e.memoizedProps=e.pendingProps,null===t?_u(e):Pi=t,_i.current=null}function _u(e){var t=e;do{var n=t.alternate;if(e=t.return,0==(2048&t.flags)){if(null!==(n=ni(n,t,Ni)))return void(Pi=n);if(24!==(n=t).tag&&23!==n.tag||null===n.memoizedState||0!=(1073741824&Ni)||0==(4&n.mode)){for(var r=0,a=n.child;null!==a;)r|=a.lanes|a.childLanes,a=a.sibling;n.childLanes=r}null!==e&&0==(2048&e.flags)&&(null===e.firstEffect&&(e.firstEffect=t.firstEffect),null!==t.lastEffect&&(null!==e.lastEffect&&(e.lastEffect.nextEffect=t.firstEffect),e.lastEffect=t.lastEffect),1<t.flags&&(null!==e.lastEffect?e.lastEffect.nextEffect=t:e.firstEffect=t,e.lastEffect=t))}else{if(null!==(n=ri(t)))return n.flags&=2047,void(Pi=n);null!==e&&(e.firstEffect=e.lastEffect=null,e.flags|=2048)}if(null!==(t=t.sibling))return void(Pi=t);Pi=t=e}while(null!==t);0===Ii&&(Ii=5)}function xu(e){var t=Ba();return Qa(99,Cu.bind(null,e,t)),null}function Cu(e,t){do{Tu()}while(null!==qi);if(0!=(48&xi))throw Error(o(327));var n=e.finishedWork;if(null===n)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(o(177));e.callbackNode=null;var r=n.lanes|n.childLanes,a=r,l=e.pendingLanes&~a;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=a,e.mutableReadLanes&=a,e.entangledLanes&=a,a=e.entanglements;for(var i=e.eventTimes,u=e.expirationTimes;0<l;){var s=31-Ht(l),c=1<<s;a[s]=0,i[s]=-1,u[s]=-1,l&=~c}if(null!==Gi&&0==(24&r)&&Gi.has(e)&&Gi.delete(e),e===Ci&&(Pi=Ci=null,Ti=0),1<n.flags?null!==n.lastEffect?(n.lastEffect.nextEffect=n,r=n.firstEffect):r=n:r=n.firstEffect,null!==r){if(a=xi,xi|=32,_i.current=null,jr=Kt,dr(i=fr())){if("selectionStart"in i)u={start:i.selectionStart,end:i.selectionEnd};else e:if(u=(u=i.ownerDocument)&&u.defaultView||window,(c=u.getSelection&&u.getSelection())&&0!==c.rangeCount){u=c.anchorNode,l=c.anchorOffset,s=c.focusNode,c=c.focusOffset;try{u.nodeType,s.nodeType}catch(e){u=null;break e}var f=0,d=-1,p=-1,m=0,h=0,y=i,g=null;t:for(;;){for(var v;y!==u||0!==l&&3!==y.nodeType||(d=f+l),y!==s||0!==c&&3!==y.nodeType||(p=f+c),3===y.nodeType&&(f+=y.nodeValue.length),null!==(v=y.firstChild);)g=y,y=v;for(;;){if(y===i)break t;if(g===u&&++m===l&&(d=f),g===s&&++h===c&&(p=f),null!==(v=y.nextSibling))break;g=(y=g).parentNode}y=v}u=-1===d||-1===p?null:{start:d,end:p}}else u=null;u=u||{start:0,end:0}}else u=null;Dr={focusedElem:i,selectionRange:u},Kt=!1,ru=null,au=!1,Ai=r;do{try{Pu()}catch(e){if(null===Ai)throw Error(o(330));Ou(Ai,e),Ai=Ai.nextEffect}}while(null!==Ai);ru=null,Ai=r;do{try{for(i=e;null!==Ai;){var b=Ai.flags;if(16&b&&ge(Ai.stateNode,""),128&b){var w=Ai.alternate;if(null!==w){var k=w.ref;null!==k&&("function"==typeof k?k(null):k.current=null)}}switch(1038&b){case 2:gi(Ai),Ai.flags&=-3;break;case 6:gi(Ai),Ai.flags&=-3,bi(Ai.alternate,Ai);break;case 1024:Ai.flags&=-1025;break;case 1028:Ai.flags&=-1025,bi(Ai.alternate,Ai);break;case 4:bi(Ai.alternate,Ai);break;case 8:vi(i,u=Ai);var E=u.alternate;hi(u),null!==E&&hi(E)}Ai=Ai.nextEffect}}catch(e){if(null===Ai)throw Error(o(330));Ou(Ai,e),Ai=Ai.nextEffect}}while(null!==Ai);if(k=Dr,w=fr(),b=k.focusedElem,i=k.selectionRange,w!==b&&b&&b.ownerDocument&&function e(t,n){return!(!t||!n)&&(t===n||(!t||3!==t.nodeType)&&(n&&3===n.nodeType?e(t,n.parentNode):"contains"in t?t.contains(n):!!t.compareDocumentPosition&&!!(16&t.compareDocumentPosition(n))))}(b.ownerDocument.documentElement,b)){null!==i&&dr(b)&&(w=i.start,void 0===(k=i.end)&&(k=w),"selectionStart"in b?(b.selectionStart=w,b.selectionEnd=Math.min(k,b.value.length)):(k=(w=b.ownerDocument||document)&&w.defaultView||window).getSelection&&(k=k.getSelection(),u=b.textContent.length,E=Math.min(i.start,u),i=void 0===i.end?E:Math.min(i.end,u),!k.extend&&E>i&&(u=i,i=E,E=u),u=cr(b,E),l=cr(b,i),u&&l&&(1!==k.rangeCount||k.anchorNode!==u.node||k.anchorOffset!==u.offset||k.focusNode!==l.node||k.focusOffset!==l.offset)&&((w=w.createRange()).setStart(u.node,u.offset),k.removeAllRanges(),E>i?(k.addRange(w),k.extend(l.node,l.offset)):(w.setEnd(l.node,l.offset),k.addRange(w))))),w=[];for(k=b;k=k.parentNode;)1===k.nodeType&&w.push({element:k,left:k.scrollLeft,top:k.scrollTop});for("function"==typeof b.focus&&b.focus(),b=0;b<w.length;b++)(k=w[b]).element.scrollLeft=k.left,k.element.scrollTop=k.top}Kt=!!jr,Dr=jr=null,e.current=n,Ai=r;do{try{for(b=e;null!==Ai;){var S=Ai.flags;if(36&S&&di(b,Ai.alternate,Ai),128&S){w=void 0;var _=Ai.ref;if(null!==_){var x=Ai.stateNode;switch(Ai.tag){case 5:w=x;break;default:w=x}"function"==typeof _?_(w):_.current=w}}Ai=Ai.nextEffect}}catch(e){if(null===Ai)throw Error(o(330));Ou(Ai,e),Ai=Ai.nextEffect}}while(null!==Ai);Ai=null,Oa(),xi=a}else e.current=n;if(Wi)Wi=!1,qi=e,Ki=t;else for(Ai=r;null!==Ai;)t=Ai.nextEffect,Ai.nextEffect=null,8&Ai.flags&&((S=Ai).sibling=null,S.stateNode=null),Ai=t;if(0===(r=e.pendingLanes)&&($i=null),1===r?e===Zi?Ji++:(Ji=0,Zi=e):Ji=0,n=n.stateNode,ba&&"function"==typeof ba.onCommitFiberRoot)try{ba.onCommitFiberRoot(va,n,void 0,64==(64&n.current.flags))}catch(e){}if(su(e,Fa()),Hi)throw Hi=!1,e=Vi,Vi=null,e;return 0!=(8&xi)||Ha(),null}function Pu(){for(;null!==Ai;){var e=Ai.alternate;au||null===ru||(0!=(8&Ai.flags)?Ze(Ai,ru)&&(au=!0):13===Ai.tag&&ki(e,Ai)&&Ze(Ai,ru)&&(au=!0));var t=Ai.flags;0!=(256&t)&&fi(e,Ai),0==(512&t)||Wi||(Wi=!0,Aa(97,(function(){return Tu(),null}))),Ai=Ai.nextEffect}}function Tu(){if(90!==Ki){var e=97<Ki?97:Ki;return Ki=90,Qa(e,Iu)}return!1}function Nu(e,t){Yi.push(t,e),Wi||(Wi=!0,Aa(97,(function(){return Tu(),null})))}function Lu(e,t){Xi.push(t,e),Wi||(Wi=!0,Aa(97,(function(){return Tu(),null})))}function Iu(){if(null===qi)return!1;var e=qi;if(qi=null,0!=(48&xi))throw Error(o(331));var t=xi;xi|=32;var n=Xi;Xi=[];for(var r=0;r<n.length;r+=2){var a=n[r],l=n[r+1],i=a.destroy;if(a.destroy=void 0,"function"==typeof i)try{i()}catch(e){if(null===l)throw Error(o(330));Ou(l,e)}}for(n=Yi,Yi=[],r=0;r<n.length;r+=2){a=n[r],l=n[r+1];try{var u=a.create;a.destroy=u()}catch(e){if(null===l)throw Error(o(330));Ou(l,e)}}for(u=e.current.firstEffect;null!==u;)e=u.nextEffect,u.nextEffect=null,8&u.flags&&(u.sibling=null,u.stateNode=null),u=e;return xi=t,Ha(),!0}function zu(e,t,n){ol(e,t=ii(0,t=ai(n,t),1)),t=lu(),null!==(e=uu(e,1))&&(At(e,1,t),su(e,t))}function Ou(e,t){if(3===e.tag)zu(e,e,t);else for(var n=e.return;null!==n;){if(3===n.tag){zu(n,e,t);break}if(1===n.tag){var r=n.stateNode;if("function"==typeof n.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===$i||!$i.has(r))){var a=ui(n,e=ai(t,e),1);if(ol(n,a),a=lu(),null!==(n=uu(n,1)))At(n,1,a),su(n,a);else if("function"==typeof r.componentDidCatch&&(null===$i||!$i.has(r)))try{r.componentDidCatch(t,e)}catch(e){}break}}n=n.return}}function Mu(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=lu(),e.pingedLanes|=e.suspendedLanes&n,Ci===e&&(Ti&n)===n&&(4===Ii||3===Ii&&(62914560&Ti)===Ti&&500>Fa()-Fi?gu(e,0):ji|=n),su(e,t)}function Ru(e,t){var n=e.stateNode;null!==n&&n.delete(t),0===(t=0)&&(0==(2&(t=e.mode))?t=1:0==(4&t)?t=99===Ba()?1:2:(0===tu&&(tu=Oi),0===(t=Ut(62914560&~tu))&&(t=4194304))),n=lu(),null!==(e=uu(e,t))&&(At(e,t,n),su(e,n))}function ju(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.flags=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childLanes=this.lanes=0,this.alternate=null}function Du(e,t,n,r){return new ju(e,t,n,r)}function Fu(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Bu(e,t){var n=e.alternate;return null===n?((n=Du(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.nextEffect=null,n.firstEffect=null,n.lastEffect=null),n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Uu(e,t,n,r,a,l){var i=2;if(r=e,"function"==typeof e)Fu(e)&&(i=1);else if("string"==typeof e)i=5;else e:switch(e){case _:return Qu(n.children,a,l,t);case j:i=8,a|=16;break;case x:i=8,a|=1;break;case C:return(e=Du(12,n,t,8|a)).elementType=C,e.type=C,e.lanes=l,e;case L:return(e=Du(13,n,t,a)).type=L,e.elementType=L,e.lanes=l,e;case I:return(e=Du(19,n,t,a)).elementType=I,e.lanes=l,e;case D:return Au(n,a,l,t);case F:return(e=Du(24,n,t,a)).elementType=F,e.lanes=l,e;default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case P:i=10;break e;case T:i=9;break e;case N:i=11;break e;case z:i=14;break e;case O:i=16,r=null;break e;case M:i=22;break e}throw Error(o(130,null==e?e:typeof e,""))}return(t=Du(i,n,t,a)).elementType=e,t.type=r,t.lanes=l,t}function Qu(e,t,n,r){return(e=Du(7,e,r,t)).lanes=n,e}function Au(e,t,n,r){return(e=Du(23,e,r,t)).elementType=D,e.lanes=n,e}function Hu(e,t,n){return(e=Du(6,e,null,t)).lanes=n,e}function Vu(e,t,n){return(t=Du(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function $u(e,t,n){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.pendingContext=this.context=null,this.hydrate=n,this.callbackNode=null,this.callbackPriority=0,this.eventTimes=Qt(0),this.expirationTimes=Qt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Qt(0),this.mutableSourceEagerHydrationData=null}function Wu(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:S,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}function qu(e,t,n,r){var a=t.current,l=lu(),i=ou(a);e:if(n){t:{if(Ye(n=n._reactInternals)!==n||1!==n.tag)throw Error(o(170));var u=n;do{switch(u.tag){case 3:u=u.stateNode.context;break t;case 1:if(da(u.type)){u=u.stateNode.__reactInternalMemoizedMergedChildContext;break t}}u=u.return}while(null!==u);throw Error(o(171))}if(1===n.tag){var s=n.type;if(da(s)){n=ha(n,s,u);break e}}n=u}else n=ia;return null===t.context?t.context=n:t.pendingContext=n,(t=ll(l,i)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),ol(a,t),iu(a,i,l),i}function Ku(e){if(!(e=e.current).child)return null;switch(e.child.tag){case 5:default:return e.child.stateNode}}function Yu(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function Xu(e,t){Yu(e,t),(e=e.alternate)&&Yu(e,t)}function Gu(e,t,n){var r=null!=n&&null!=n.hydrationOptions&&n.hydrationOptions.mutableSources||null;if(n=new $u(e,t,null!=n&&!0===n.hydrate),t=Du(3,null,null,2===t?7:1===t?3:0),n.current=t,t.stateNode=n,rl(t),e[Yr]=n.current,Pr(8===e.nodeType?e.parentNode:e),r)for(e=0;e<r.length;e++){var a=(t=r[e])._getVersion;a=a(t._source),null==n.mutableSourceEagerHydrationData?n.mutableSourceEagerHydrationData=[t,a]:n.mutableSourceEagerHydrationData.push(t,a)}this._internalRoot=n}function Ju(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function Zu(e,t,n,r,a){var l=n._reactRootContainer;if(l){var o=l._internalRoot;if("function"==typeof a){var i=a;a=function(){var e=Ku(o);i.call(e)}}qu(t,o,e,a)}else{if(l=n._reactRootContainer=function(e,t){if(t||(t=!(!(t=e?9===e.nodeType?e.documentElement:e.firstChild:null)||1!==t.nodeType||!t.hasAttribute("data-reactroot"))),!t)for(var n;n=e.lastChild;)e.removeChild(n);return new Gu(e,0,t?{hydrate:!0}:void 0)}(n,r),o=l._internalRoot,"function"==typeof a){var u=a;a=function(){var e=Ku(o);u.call(e)}}mu((function(){qu(t,o,e,a)}))}return Ku(o)}function es(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!Ju(t))throw Error(o(200));return Wu(e,t,null,n)}Qi=function(e,t,n){var r=t.lanes;if(null!==e)if(e.memoizedProps!==t.pendingProps||sa.current)zo=!0;else{if(0==(n&r)){switch(zo=!1,t.tag){case 3:Ao(t),Al();break;case 5:Ll(t);break;case 1:da(t.type)&&ya(t);break;case 4:Tl(t,t.stateNode.containerInfo);break;case 10:r=t.memoizedProps.value;var a=t.type._context;oa(qa,a._currentValue),a._currentValue=r;break;case 13:if(null!==t.memoizedState)return 0!=(n&t.child.childLanes)?qo(e,t,n):(oa(zl,1&zl.current),null!==(t=ei(e,t,n))?t.sibling:null);oa(zl,1&zl.current);break;case 19:if(r=0!=(n&t.childLanes),0!=(64&e.flags)){if(r)return Zo(e,t,n);t.flags|=64}if(null!==(a=t.memoizedState)&&(a.rendering=null,a.tail=null,a.lastEffect=null),oa(zl,zl.current),r)break;return null;case 23:case 24:return t.lanes=0,Do(e,t,n)}return ei(e,t,n)}zo=0!=(16384&e.flags)}else zo=!1;switch(t.lanes=0,t.tag){case 2:if(r=t.type,null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,a=fa(t,ua.current),el(t,n),a=to(null,t,r,e,a,n),t.flags|=1,"object"==typeof a&&null!==a&&"function"==typeof a.render&&void 0===a.$$typeof){if(t.tag=1,t.memoizedState=null,t.updateQueue=null,da(r)){var l=!0;ya(t)}else l=!1;t.memoizedState=null!==a.state&&void 0!==a.state?a.state:null,rl(t);var i=r.getDerivedStateFromProps;"function"==typeof i&&fl(t,r,i,e),a.updater=dl,t.stateNode=a,a._reactInternals=t,yl(t,r,e,n),t=Qo(null,t,r,!0,l,n)}else t.tag=0,Oo(null,t,a,n),t=t.child;return t;case 16:a=t.elementType;e:{switch(null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,a=(l=a._init)(a._payload),t.type=a,l=t.tag=function(e){if("function"==typeof e)return Fu(e)?1:0;if(null!=e){if((e=e.$$typeof)===N)return 11;if(e===z)return 14}return 2}(a),e=Wa(a,e),l){case 0:t=Bo(null,t,a,e,n);break e;case 1:t=Uo(null,t,a,e,n);break e;case 11:t=Mo(null,t,a,e,n);break e;case 14:t=Ro(null,t,a,Wa(a.type,e),r,n);break e}throw Error(o(306,a,""))}return t;case 0:return r=t.type,a=t.pendingProps,Bo(e,t,r,a=t.elementType===r?a:Wa(r,a),n);case 1:return r=t.type,a=t.pendingProps,Uo(e,t,r,a=t.elementType===r?a:Wa(r,a),n);case 3:if(Ao(t),r=t.updateQueue,null===e||null===r)throw Error(o(282));if(r=t.pendingProps,a=null!==(a=t.memoizedState)?a.element:null,al(e,t),ul(t,r,null,n),(r=t.memoizedState.element)===a)Al(),t=ei(e,t,n);else{if((l=(a=t.stateNode).hydrate)&&(Rl=Hr(t.stateNode.containerInfo.firstChild),Ml=t,l=jl=!0),l){if(null!=(e=a.mutableSourceEagerHydrationData))for(a=0;a<e.length;a+=2)(l=e[a])._workInProgressVersionPrimary=e[a+1],Hl.push(l);for(n=El(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|1024,n=n.sibling}else Oo(e,t,r,n),Al();t=t.child}return t;case 5:return Ll(t),null===e&&Bl(t),r=t.type,a=t.pendingProps,l=null!==e?e.memoizedProps:null,i=a.children,Br(r,a)?i=null:null!==l&&Br(r,l)&&(t.flags|=16),Fo(e,t),Oo(e,t,i,n),t.child;case 6:return null===e&&Bl(t),null;case 13:return qo(e,t,n);case 4:return Tl(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=kl(t,null,r,n):Oo(e,t,r,n),t.child;case 11:return r=t.type,a=t.pendingProps,Mo(e,t,r,a=t.elementType===r?a:Wa(r,a),n);case 7:return Oo(e,t,t.pendingProps,n),t.child;case 8:case 12:return Oo(e,t,t.pendingProps.children,n),t.child;case 10:e:{r=t.type._context,a=t.pendingProps,i=t.memoizedProps,l=a.value;var u=t.type._context;if(oa(qa,u._currentValue),u._currentValue=l,null!==i)if(u=i.value,0===(l=or(u,l)?0:0|("function"==typeof r._calculateChangedBits?r._calculateChangedBits(u,l):1073741823))){if(i.children===a.children&&!sa.current){t=ei(e,t,n);break e}}else for(null!==(u=t.child)&&(u.return=t);null!==u;){var s=u.dependencies;if(null!==s){i=u.child;for(var c=s.firstContext;null!==c;){if(c.context===r&&0!=(c.observedBits&l)){1===u.tag&&((c=ll(-1,n&-n)).tag=2,ol(u,c)),u.lanes|=n,null!==(c=u.alternate)&&(c.lanes|=n),Za(u.return,n),s.lanes|=n;break}c=c.next}}else i=10===u.tag&&u.type===t.type?null:u.child;if(null!==i)i.return=u;else for(i=u;null!==i;){if(i===t){i=null;break}if(null!==(u=i.sibling)){u.return=i.return,i=u;break}i=i.return}u=i}Oo(e,t,a.children,n),t=t.child}return t;case 9:return a=t.type,r=(l=t.pendingProps).children,el(t,n),r=r(a=tl(a,l.unstable_observedBits)),t.flags|=1,Oo(e,t,r,n),t.child;case 14:return l=Wa(a=t.type,t.pendingProps),Ro(e,t,a,l=Wa(a.type,l),r,n);case 15:return jo(e,t,t.type,t.pendingProps,r,n);case 17:return r=t.type,a=t.pendingProps,a=t.elementType===r?a:Wa(r,a),null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),t.tag=1,da(r)?(e=!0,ya(t)):e=!1,el(t,n),ml(t,r,a),yl(t,r,a,n),Qo(null,t,r,!0,e,n);case 19:return Zo(e,t,n);case 23:case 24:return Do(e,t,n)}throw Error(o(156,t.tag))},Gu.prototype.render=function(e){qu(e,this._internalRoot,null,null)},Gu.prototype.unmount=function(){var e=this._internalRoot,t=e.containerInfo;qu(null,e,null,(function(){t[Yr]=null}))},et=function(e){13===e.tag&&(iu(e,4,lu()),Xu(e,4))},tt=function(e){13===e.tag&&(iu(e,67108864,lu()),Xu(e,67108864))},nt=function(e){if(13===e.tag){var t=lu(),n=ou(e);iu(e,n,t),Xu(e,n)}},rt=function(e,t){return t()},Ce=function(e,t,n){switch(t){case"input":if(ne(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=ea(r);if(!a)throw Error(o(90));G(r),ne(r,a)}}}break;case"textarea":se(e,n);break;case"select":null!=(t=n.value)&&oe(e,!!n.multiple,t,!1)}},ze=pu,Oe=function(e,t,n,r,a){var l=xi;xi|=4;try{return Qa(98,e.bind(null,t,n,r,a))}finally{0===(xi=l)&&(Ui(),Ha())}},Me=function(){0==(49&xi)&&(function(){if(null!==Gi){var e=Gi;Gi=null,e.forEach((function(e){e.expiredLanes|=24&e.pendingLanes,su(e,Fa())}))}Ha()}(),Tu())},Re=function(e,t){var n=xi;xi|=2;try{return e(t)}finally{0===(xi=n)&&(Ui(),Ha())}};var ts={Events:[Jr,Zr,ea,Le,Ie,Tu,{current:!1}]},ns={findFiberByHostInstance:Gr,bundleType:0,version:"17.0.1",rendererPackageName:"react-dom"},rs={bundleType:ns.bundleType,version:ns.version,rendererPackageName:ns.rendererPackageName,rendererConfig:ns.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:k.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=Je(e))?null:e.stateNode},findFiberByHostInstance:ns.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null};if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var as=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!as.isDisabled&&as.supportsFiber)try{va=as.inject(rs),ba=as}catch(e){}}t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ts,t.createPortal=es,t.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"==typeof e.render)throw Error(o(188));throw Error(o(268,Object.keys(e)))}return e=null===(e=Je(t))?null:e.stateNode},t.flushSync=function(e,t){var n=xi;if(0!=(48&n))return e(t);xi|=1;try{if(e)return Qa(99,e.bind(null,t))}finally{xi=n,Ha()}},t.hydrate=function(e,t,n){if(!Ju(t))throw Error(o(200));return Zu(null,e,t,!0,n)},t.render=function(e,t,n){if(!Ju(t))throw Error(o(200));return Zu(null,e,t,!1,n)},t.unmountComponentAtNode=function(e){if(!Ju(e))throw Error(o(40));return!!e._reactRootContainer&&(mu((function(){Zu(null,null,e,!1,(function(){e._reactRootContainer=null,e[Yr]=null}))})),!0)},t.unstable_batchedUpdates=pu,t.unstable_createPortal=function(e,t){return es(e,t,2<arguments.length&&void 0!==arguments[2]?arguments[2]:null)},t.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Ju(n))throw Error(o(200));if(null==e||void 0===e._reactInternals)throw Error(o(38));return Zu(e,t,n,!1,r)},t.version="17.0.1"},function(e,t,n){"use strict";e.exports=n(8)},function(e,t,n){"use strict";
|
23 |
+
/** @license React v0.20.1
|
24 |
+
* scheduler.production.min.js
|
25 |
+
*
|
26 |
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
27 |
+
*
|
28 |
+
* This source code is licensed under the MIT license found in the
|
29 |
+
* LICENSE file in the root directory of this source tree.
|
30 |
+
*/var r,a,l,o;if("object"==typeof performance&&"function"==typeof performance.now){var i=performance;t.unstable_now=function(){return i.now()}}else{var u=Date,s=u.now();t.unstable_now=function(){return u.now()-s}}if("undefined"==typeof window||"function"!=typeof MessageChannel){var c=null,f=null,d=function(){if(null!==c)try{var e=t.unstable_now();c(!0,e),c=null}catch(e){throw setTimeout(d,0),e}};r=function(e){null!==c?setTimeout(r,0,e):(c=e,setTimeout(d,0))},a=function(e,t){f=setTimeout(e,t)},l=function(){clearTimeout(f)},t.unstable_shouldYield=function(){return!1},o=t.unstable_forceFrameRate=function(){}}else{var p=window.setTimeout,m=window.clearTimeout;if("undefined"!=typeof console){var h=window.cancelAnimationFrame;"function"!=typeof window.requestAnimationFrame&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),"function"!=typeof h&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills")}var y=!1,g=null,v=-1,b=5,w=0;t.unstable_shouldYield=function(){return t.unstable_now()>=w},o=function(){},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):b=0<e?Math.floor(1e3/e):5};var k=new MessageChannel,E=k.port2;k.port1.onmessage=function(){if(null!==g){var e=t.unstable_now();w=e+b;try{g(!0,e)?E.postMessage(null):(y=!1,g=null)}catch(e){throw E.postMessage(null),e}}else y=!1},r=function(e){g=e,y||(y=!0,E.postMessage(null))},a=function(e,n){v=p((function(){e(t.unstable_now())}),n)},l=function(){m(v),v=-1}}function S(e,t){var n=e.length;e.push(t);e:for(;;){var r=n-1>>>1,a=e[r];if(!(void 0!==a&&0<C(a,t)))break e;e[r]=t,e[n]=a,n=r}}function _(e){return void 0===(e=e[0])?null:e}function x(e){var t=e[0];if(void 0!==t){var n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,a=e.length;r<a;){var l=2*(r+1)-1,o=e[l],i=l+1,u=e[i];if(void 0!==o&&0>C(o,n))void 0!==u&&0>C(u,o)?(e[r]=u,e[i]=n,r=i):(e[r]=o,e[l]=n,r=l);else{if(!(void 0!==u&&0>C(u,n)))break e;e[r]=u,e[i]=n,r=i}}}return t}return null}function C(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}var P=[],T=[],N=1,L=null,I=3,z=!1,O=!1,M=!1;function R(e){for(var t=_(T);null!==t;){if(null===t.callback)x(T);else{if(!(t.startTime<=e))break;x(T),t.sortIndex=t.expirationTime,S(P,t)}t=_(T)}}function j(e){if(M=!1,R(e),!O)if(null!==_(P))O=!0,r(D);else{var t=_(T);null!==t&&a(j,t.startTime-e)}}function D(e,n){O=!1,M&&(M=!1,l()),z=!0;var r=I;try{for(R(n),L=_(P);null!==L&&(!(L.expirationTime>n)||e&&!t.unstable_shouldYield());){var o=L.callback;if("function"==typeof o){L.callback=null,I=L.priorityLevel;var i=o(L.expirationTime<=n);n=t.unstable_now(),"function"==typeof i?L.callback=i:L===_(P)&&x(P),R(n)}else x(P);L=_(P)}if(null!==L)var u=!0;else{var s=_(T);null!==s&&a(j,s.startTime-n),u=!1}return u}finally{L=null,I=r,z=!1}}var F=o;t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){O||z||(O=!0,r(D))},t.unstable_getCurrentPriorityLevel=function(){return I},t.unstable_getFirstCallbackNode=function(){return _(P)},t.unstable_next=function(e){switch(I){case 1:case 2:case 3:var t=3;break;default:t=I}var n=I;I=t;try{return e()}finally{I=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=F,t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=I;I=e;try{return t()}finally{I=n}},t.unstable_scheduleCallback=function(e,n,o){var i=t.unstable_now();switch("object"==typeof o&&null!==o?o="number"==typeof(o=o.delay)&&0<o?i+o:i:o=i,e){case 1:var u=-1;break;case 2:u=250;break;case 5:u=1073741823;break;case 4:u=1e4;break;default:u=5e3}return e={id:N++,callback:n,priorityLevel:e,startTime:o,expirationTime:u=o+u,sortIndex:-1},o>i?(e.sortIndex=o,S(T,e),null===_(P)&&e===_(T)&&(M?l():M=!0,a(j,o-i))):(e.sortIndex=u,S(P,e),O||z||(O=!0,r(D))),e},t.unstable_wrapCallback=function(e){var t=I;return function(){var n=I;I=t;try{return e.apply(this,arguments)}finally{I=n}}}},function(e,t,n){"use strict";n.r(t);var r,a=n(1),l=n(0),o=n.n(l),i=n(3),u=n.n(i);var s="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto),c=new Uint8Array(16);function f(){if(!s)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return s(c)}var d=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;for(var p=function(e){return"string"==typeof e&&d.test(e)},m=[],h=0;h<256;++h)m.push((h+256).toString(16).substr(1));var y=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(m[e[t+0]]+m[e[t+1]]+m[e[t+2]]+m[e[t+3]]+"-"+m[e[t+4]]+m[e[t+5]]+"-"+m[e[t+6]]+m[e[t+7]]+"-"+m[e[t+8]]+m[e[t+9]]+"-"+m[e[t+10]]+m[e[t+11]]+m[e[t+12]]+m[e[t+13]]+m[e[t+14]]+m[e[t+15]]).toLowerCase();if(!p(n))throw TypeError("Stringified UUID is invalid");return n};var g=function(e,t,n){var r=(e=e||{}).random||(e.rng||f)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var a=0;a<16;++a)t[n+a]=r[a];return t}return y(r)};function v(e){return(v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function b(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function w(e,t){return(w=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function k(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=S(e);if(t){var a=S(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return E(this,n)}}function E(e,t){return!t||"object"!==v(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function S(e){return(S=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var _=wp.i18n.__;function x(e){var t="yasr-ranking-element-"+g(),n=document.getElementById(e.tableId).dataset.rankingSize;return o.a.createElement("div",{id:t,ref:function(){return raterJs({starSize:n,step:.1,showToolTip:!1,rating:e.rating,readOnly:!0,element:document.getElementById(t)})}})}function C(e){if(void 0!==e.post.number_of_votes)return o.a.createElement("span",{className:"yasr-most-rated-text"},"[",_("Total:","yet-another-stars-rating")," ",e.post.number_of_votes," ",_("Average:","yet-another-stars-rating")," ",e.post.rating,"]");var t=e.text;return o.a.createElement("span",{className:"yasr-highest-rated-text"},t," ",e.post.rating)}function P(e){return o.a.createElement("td",{className:e.colClass},o.a.createElement("a",{href:e.post.link},function(e){if("string"!=typeof e||-1===e.indexOf("&"))return e;void 0===r&&(r=document.implementation&&document.implementation.createHTMLDocument?document.implementation.createHTMLDocument("").createElement("textarea"):document.createElement("textarea")),r.innerHTML=e;var t=r.textContent;return r.innerHTML="",t}(e.post.title)))}function T(e){var t="after",n=_("Rating:","yet-another-stars-rating"),r=new URLSearchParams(e.rankingParams);return null!==r.get("text_position")&&(t=r.get("text_position")),null!==r.get("custom_txt")&&(n=r.get("custom_txt")),"before"===t?o.a.createElement("td",{className:e.colClass},o.a.createElement(C,{post:e.post,tableId:e.tableId,text:n}),o.a.createElement(x,{rating:e.post.rating,tableId:e.tableId})):o.a.createElement("td",{className:e.colClass},o.a.createElement(x,{rating:e.post.rating,tableId:e.tableId}),o.a.createElement(C,{post:e.post,tableId:e.tableId,text:n}))}function N(e){var t="",n="";return"overall_rating"===e.source?(t="yasr-top-10-overall-left",n="yasr-top-10-overall-right"):"visitor_votes"===e.source&&(t="yasr-top-10-most-highest-left",n="yasr-top-10-most-highest-right"),o.a.createElement("tr",{className:e.trClass},o.a.createElement(P,{colClass:t,post:e.post}),o.a.createElement(T,{colClass:n,post:e.post,tableId:e.tableId,rankingParams:e.rankingParams}))}function L(e){return o.a.createElement("tbody",{id:e.tBodyId,style:{display:e.show}},e.data.map((function(t,n){var r="yasr-rankings-td-colored";return"overall_rating"===e.source&&(r="yasr-rankings-td-white"),n%2==0&&(r="yasr-rankings-td-white","overall_rating"===e.source&&(r="yasr-rankings-td-colored")),o.a.createElement(N,{key:t.post_id,source:e.source,tableId:e.tableId,rankingParams:e.rankingParams,post:t,trClass:r})})))}var I=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&w(e,t)}(l,e);var t,n,r,a=k(l);function l(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),(t=a.call(this,e)).state={error:null,isLoaded:!1,data:[],tableId:e.tableId,source:e.source,rankingParams:e.params},t}return t=l,(n=[{key:"componentDidMount",value:function(){var e=this,t=JSON.parse(document.getElementById(this.state.tableId).dataset.rankingData),n={};if("yes"!==yasrCommonData.ajaxEnabled)console.info(_("Ajax Disabled, getting data from source","yet-another-stars-rating")),this.setState({isLoaded:!0,data:t});else if(!1!==this.state.source){var r=this.returnRestUrl();Promise.all(r.map((function(e){return fetch(e).then((function(e){return!0===e.ok?e.json():(console.info(_("Ajax Call Failed. Getting data from source")),"KO")})).then((function(e){"KO"===e?n=t:("overall_rating"===e.source&&(n=e),"visitor_votes"===e.source&&(n[e.show]=e.data_vv))})).catch((function(e){n=t,console.info(_(e))}))}))).then((function(t){e.setState({isLoaded:!0,data:n})})).catch((function(t){console.info(_(t)),e.setState({isLoaded:!0,data:n})}))}else this.setState({error:_("Invalid Data Source","yet-another-stars-rating")})}},{key:"returnRestUrl",value:function(){var e=""!==this.state.rankingParams?this.state.rankingParams:"",t=this.state.source,n=!1,r="yet-another-stars-rating/v1/yasr-rankings/",a="";if(""!==e&&!1!==e){var l=new URLSearchParams(e);null!==l.get("order_by")&&(a+="order_by="+l.get("order_by")),null!==l.get("limit")&&(a+="&limit="+l.get("limit")),null!==l.get("ctg")?a+="&ctg="+l.get("ctg"):null!==l.get("cpt")&&(a+="&cpt="+l.get("cpt")),""!==a&&(a="&"+(a=a.replace(/\s+/g,"")))}else a="";if("overall_rating"===t&&(n=[yasrCommonData.restEndpoint+r+"?source="+t+a]),"visitor_votes"===t){var o="",i="";if(""!==e){var u=new URLSearchParams(e);null!==u.get("required_votes[most]")&&(o="&required_votes="+u.get("required_votes[most]")),null!==u.get("required_votes[highest]")&&(i="&required_votes="+u.get("required_votes[highest]"))}n=[yasrCommonData.restEndpoint+r+"?show=most&source="+t+a+o,yasrCommonData.restEndpoint+r+"?show=highest&source="+t+a+i]}return n}},{key:"rankingTableHead",value:function(e,t){var n=this.state.tableId,r="link-most-rated-posts-"+n,a="link-highest-rated-posts-"+n;if("visitor_votes"===e){var l=o.a.createElement("span",null,o.a.createElement("span",{id:r},_("Most Rated","yet-another-stars-rating"))," | ",o.a.createElement("a",{href:"#",id:a,onClick:this.switchTBody.bind(this)},_("Highest Rated","yet-another-stars-rating")));return"highest"===t&&(l=o.a.createElement("span",null,o.a.createElement("span",{id:a},_("Highest Rated","yet-another-stars-rating"))," | ",o.a.createElement("a",{href:"#",id:r,onClick:this.switchTBody.bind(this)},_("Most Rated","yet-another-stars-rating")))),o.a.createElement("thead",null,o.a.createElement("tr",{className:"yasr-rankings-td-colored yasr-rankings-heading"},o.a.createElement("th",null,"Post"),o.a.createElement("th",null,_("Order By","yet-another-stars-rating-pro"),": ",l)))}return o.a.createElement(o.a.Fragment,null)}},{key:"switchTBody",value:function(e){e.preventDefault();var t=e.target.id,n=this.state.tableId,r="link-most-rated-posts-"+n,a="link-highest-rated-posts-"+n,l="most-rated-posts-"+n,o="highest-rated-posts-"+n,i=document.getElementById(t),u=document.createElement("span");u.innerHTML=i.innerHTML,u.id=i.id,i.parentNode.replaceChild(u,i),t===r&&(document.getElementById(o).style.display="none",document.getElementById(l).style.display="",u=document.getElementById(a),i.innerHTML=u.innerHTML,i.id=u.id,u.parentNode.replaceChild(i,u)),t===a&&(document.getElementById(l).style.display="none",document.getElementById(o).style.display="",u=document.getElementById(r),i.innerHTML=u.innerHTML,i.id=u.id,u.parentNode.replaceChild(i,u))}},{key:"rankingTableBody",value:function(){var e=this.state,t=e.data,n=e.source,r=e.rankingParams;if("overall_rating"===n)return o.a.createElement(L,{data:t.data_overall,tableId:this.state.tableId,tBodyId:"overall_"+this.state.tableId,rankingParams:r,show:"table-row-group",source:n});if("visitor_votes"===n){var a=t.most,l=t.highest,i="most",u="table-row-group",s="none",c=new URLSearchParams(r);return null!==c.get("view")&&(i=c.get("view")),"highest"===i&&(u="none",s="table-row-group"),o.a.createElement(o.a.Fragment,null,this.rankingTableHead(n,i),o.a.createElement(L,{data:a,tableId:this.state.tableId,tBodyId:"most-rated-posts-"+this.state.tableId,rankingParams:r,show:u,source:n}),o.a.createElement(L,{data:l,tableId:this.state.tableId,tBodyId:"highest-rated-posts-"+this.state.tableId,rankingParams:r,show:s,source:n}))}}},{key:"render",value:function(){var e=this.state,t=e.error,n=e.isLoaded;return t?o.a.createElement("tbody",null,o.a.createElement("tr",null,o.a.createElement("td",null,console.log(t),"Error"))):!1===n?o.a.createElement("tbody",null,o.a.createElement("tr",null,o.a.createElement("td",null,_("Loading Charts","yet-another-stars-rating")))):o.a.createElement(o.a.Fragment,null,this.rankingTableBody())}}])&&b(t.prototype,n),r&&b(t,r),l}(o.a.Component);var z=wp.i18n.__;if("rankings"===a.activeTab){var O,M=function(e){var t=A.value,n=document.getElementById("yasr-builder-shortcode").textContent;fetch(ajaxurl+"?action=yasr_rankings_preview_shortcode&shortcode="+t+"&full_shortcode="+n).then((function(e){return!0===e.ok?e.json():(console.info(z("Ajax Call Failed. Shortcode preview can't be done","yet-another-stars-rating")),"KO")})).catch((function(e){console.info(e)})).then((function(e){if("KO"!==e){var t=document.createElement("div");t.innerHTML=e,Q.childNodes.length>0?Q.replaceChild(t,Q.childNodes[0]):Q.appendChild(t)}})).then((function(e){"yasr_ov_ranking"!==t&&"yasr_most_or_highest_rated_posts"!==t||function(){var e=document.getElementsByClassName("yasr-stars-rankings");if(e.length>0)for(var t=0;t<e.length;t++){var n=e.item(t).id,r=e.item(t).dataset.rankingSource,a=JSON.parse(e.item(t).dataset.rankingParams),l=document.getElementById(n),i=!1;"overall_rating"!==r&&"visitor_votes"!==r||(i=r),u.a.render(o.a.createElement(I,{source:i,tableId:n,params:a}),l)}}()}))},R=function(e,t,n,r,a,l,o){e.style.display="",t.style.display="",l.style.display="",n.style.display="none",r.style.display="none",a.style.display="none",null!==o&&(o.style.display="")},j=function(e,t,n,r,a,l,o){a.style.display="",e.style.display="none",n.style.display="none",r.style.display="none",t.style.display="none",l.style.display="none",null!==o&&(o.style.display="none")};jQuery(".yasr-builder-elements-parents").prop("disabled",!0),jQuery(".yasr-builder-elements-childs").prop("disabled",!0),wp.hooks.doAction("yasrBuilderBegin",".yasr-builder-elements-parents",".yasr-builder-elements-childs");var D=[],F={name:"yasr_most_or_highest_rated_posts",rows:"",size:"",view:"",minvotesmost:"",minvoteshg:"",txtPosition:"",txt:"",display:"",category:"",cpt:""};O=F.name,document.getElementById("yasr-builder-shortcode").textContent="["+O+"]",document.getElementById("yasr-builder-copy-shortcode").setAttribute("data-shortcode","["+O+"]");var B=document.getElementById("yasr-builder-button-preview"),U=document.getElementById("yasr-builder-copy-shortcode"),Q=document.getElementById("yasr-builder-preview"),A=document.getElementById("yasr-ranking-source"),H=document.getElementById("builder-vv-default-view"),V=document.getElementById("builder-vv-required-votes"),$=document.getElementById("builder-stars-size"),W=document.getElementById("builder-overall-text"),q=document.getElementById("builder-username-options"),K=document.getElementById("builder-category"),Y=document.getElementById("builder-cpt"),X=A.value,G=!1;"yasr_ov_ranking"===X?R(W,$,H,V,q,K,Y):"yasr_most_active_users"!==A.value&&"yasr_top_reviewers"!==A.value||j(W,$,H,V,q,K,Y),document.addEventListener("change",(function(e){if("yasr-ranking-source"===e.target.id)Q.innerHTML="","yasr_ov_ranking"===e.target.value?R(W,$,H,V,q,K,Y):"yasr_most_active_users"===e.target.value||"yasr_top_reviewers"===e.target.value?j(W,$,H,V,q,K,Y):function(e,t,n,r,a,l,o){n.style.display="",r.style.display="",t.style.display="",l.style.display="",e.style.display="none",a.style.display="none",null!==o&&(o.style.display="")}(W,$,H,V,q,K,Y),(F={name:"yasr_most_or_highest_rated_posts",rows:"",size:"",view:"",minvotesmost:"",minvoteshg:"",txtPosition:"",txt:"",display:"",category:"",cpt:""}).name=e.target.value,O=F.name;else{D=wp.hooks.applyFilters("yasrBuilderFilterShortcode",F);for(var t=1;F.length;t++)D.hasOwnProperty(F[t])&&(F[t]=D[t]);O=F.name+F.rows+F.view+F.minvotesmost+F.minvoteshg+F.size+F.txtPosition+F.txt+F.display+F.category+F.cpt}document.getElementById("yasr-builder-shortcode").textContent="["+O+"]",document.getElementById("yasr-builder-copy-shortcode").setAttribute("data-shortcode","["+O+"]"),!0===G&&"yasr-ranking-source"!==e.target.id&&"yasr-builder-category-radio"!==e.target.name&&M()})),U.onclick=function(e){var t=document.getElementById(e.target.id);copyToClipboard(t.getAttribute("data-shortcode"))},B.onclick=function(e){M(),G=!0}}}]);
|
admin/settings/classes/YasrSettings.php
CHANGED
@@ -327,18 +327,16 @@ class YasrSettings {
|
|
327 |
if ($custom_post_types) {
|
328 |
|
329 |
echo '<div>';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
330 |
|
331 |
-
|
332 |
-
$array_options = array (
|
333 |
-
'yes' => __('Yes', 'yet-another-stars-rating'),
|
334 |
-
'no' => __('No', 'yet-another-stars-rating'),
|
335 |
-
);
|
336 |
-
$default = $option['auto_insert_custom_post_only'];
|
337 |
-
$name = 'yasr_general_options[auto_insert_custom_post_only]';
|
338 |
-
$class = 'yasr-auto-insert-options-class';
|
339 |
-
|
340 |
-
echo YasrPhpFieldsHelper::radio( $option_title, $class, $array_options, $name, $default );
|
341 |
-
|
342 |
echo '</div>';
|
343 |
?>
|
344 |
<p>
|
327 |
if ($custom_post_types) {
|
328 |
|
329 |
echo '<div>';
|
330 |
+
$option_title = __('Use only in custom post types?', 'yet-another-stars-rating');
|
331 |
+
$array_options = array (
|
332 |
+
'yes' => __('Yes', 'yet-another-stars-rating'),
|
333 |
+
'no' => __('No', 'yet-another-stars-rating'),
|
334 |
+
);
|
335 |
+
$default = $option['auto_insert_custom_post_only'];
|
336 |
+
$name = 'yasr_general_options[auto_insert_custom_post_only]';
|
337 |
+
$class = 'yasr-auto-insert-options-class';
|
338 |
|
339 |
+
echo YasrPhpFieldsHelper::radio( $option_title, $class, $array_options, $name, $default );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
340 |
echo '</div>';
|
341 |
?>
|
342 |
<p>
|
admin/settings/classes/YasrSettingsRankings.php
ADDED
@@ -0,0 +1,371 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
|
4 |
+
Copyright 2020 Dario Curvino (email : d.curvino@tiscali.it)
|
5 |
+
|
6 |
+
This program is free software: you can redistribute it and/or modify
|
7 |
+
it under the terms of the GNU General Public License as published by
|
8 |
+
the Free Software Foundation, either version 2 of the License, or
|
9 |
+
(at your option) any later version.
|
10 |
+
|
11 |
+
This program is distributed in the hope that it will be useful,
|
12 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
14 |
+
GNU General Public License for more details.
|
15 |
+
|
16 |
+
You should have received a copy of the GNU General Public License
|
17 |
+
along with this program. If not, see <http://www.gnu.org/licenses/>
|
18 |
+
*/
|
19 |
+
|
20 |
+
if (!defined('ABSPATH')) {
|
21 |
+
exit('You\'re not allowed to see this page');
|
22 |
+
} // Exit if accessed directly
|
23 |
+
|
24 |
+
class YasrSettingsRankings {
|
25 |
+
|
26 |
+
public $custom_post_types;
|
27 |
+
|
28 |
+
public function __construct($custom_post_types) {
|
29 |
+
$this->custom_post_types = $custom_post_types;
|
30 |
+
}
|
31 |
+
|
32 |
+
public function selectRanking () {
|
33 |
+
?>
|
34 |
+
<!-- Source -->
|
35 |
+
<div class="yasr-builder-div-fluid">
|
36 |
+
<strong>
|
37 |
+
<?php _e('Select Ranking', 'yet-another-stars-rating'); ?>
|
38 |
+
</strong>
|
39 |
+
<br/>
|
40 |
+
<?php
|
41 |
+
$source_array = array(
|
42 |
+
'yasr_most_or_highest_rated_posts',
|
43 |
+
'yasr_ov_ranking',
|
44 |
+
'yasr_most_active_users',
|
45 |
+
'yasr_top_reviewers'
|
46 |
+
);
|
47 |
+
$name = 'yasr-ranking-source';
|
48 |
+
$id = 'yasr-ranking-source';
|
49 |
+
|
50 |
+
echo YasrPhpFieldsHelper::select(
|
51 |
+
'',
|
52 |
+
'',
|
53 |
+
$source_array,
|
54 |
+
$name,
|
55 |
+
$id,
|
56 |
+
'yasr_visitor_votes'
|
57 |
+
);
|
58 |
+
?>
|
59 |
+
</div>
|
60 |
+
<?php
|
61 |
+
}
|
62 |
+
|
63 |
+
public function rows () {
|
64 |
+
?>
|
65 |
+
<!-- Rows Number -->
|
66 |
+
<div class="yasr-builder-div-fluid">
|
67 |
+
<strong>
|
68 |
+
<?php
|
69 |
+
_e( 'How many rows?', 'yet-another-stars-rating');
|
70 |
+
echo YASR_LOCKED_FEATURE;
|
71 |
+
?>
|
72 |
+
</strong>
|
73 |
+
<br/>
|
74 |
+
<label for="yasr-builder-rows"></label>
|
75 |
+
<select name="yasr-builder-rows-number"
|
76 |
+
id="yasr-builder-rows"
|
77 |
+
class="yasr-builder-elements-parents"
|
78 |
+
autocomplete="off">
|
79 |
+
<?php
|
80 |
+
|
81 |
+
for ($i = 2; $i <= 99; $i ++) {
|
82 |
+
if ($i === 10) { //default value
|
83 |
+
echo "<option value='$i' selected='selected'>$i</option>\n";
|
84 |
+
} else {
|
85 |
+
echo "<option value='$i'>$i</option>\n";
|
86 |
+
}
|
87 |
+
} //End for
|
88 |
+
|
89 |
+
?>
|
90 |
+
</select>
|
91 |
+
</div>
|
92 |
+
<?php
|
93 |
+
}
|
94 |
+
|
95 |
+
public function size () {
|
96 |
+
?>
|
97 |
+
<!-- Size -->
|
98 |
+
<div class="yasr-builder-div-fluid" id="builder-stars-size">
|
99 |
+
<strong>
|
100 |
+
<?php _e('Size', 'yet-another-stars-rating'); ?>
|
101 |
+
</strong>
|
102 |
+
<?php echo YASR_LOCKED_FEATURE; ?>
|
103 |
+
<br/>
|
104 |
+
<?php
|
105 |
+
$name = 'yasr-builder-size';
|
106 |
+
$class = 'yasr-builder-size yasr-builder-elements-parents';
|
107 |
+
$id = 'yasr-builder-size-';
|
108 |
+
|
109 |
+
YasrPhpFieldsHelper::radioSelectSize($name, $class, 'medium', $id, false);
|
110 |
+
?>
|
111 |
+
</div>
|
112 |
+
<?php
|
113 |
+
}
|
114 |
+
|
115 |
+
public function vvDefaultView() {
|
116 |
+
?>
|
117 |
+
<!-- Default View -->
|
118 |
+
<div class="yasr-builder-div-fluid" id="builder-vv-default-view">
|
119 |
+
<?php
|
120 |
+
$option_title = '<strong>'.__('Default View', 'yet-another-stars-rating').'</strong>';
|
121 |
+
$array_options = array (
|
122 |
+
'most' => __('Most Rated', 'yet-another-stars-rating'),
|
123 |
+
'highest' => __('Highest Rated', 'yet-another-stars-rating')
|
124 |
+
);
|
125 |
+
$default = 'most';
|
126 |
+
$name = 'yasr-vv-default-view';
|
127 |
+
$class = 'yasr-vv-default-view yasr-builder-elements-parents';
|
128 |
+
$id = 'yasr-default-view';
|
129 |
+
|
130 |
+
echo $option_title.YASR_LOCKED_FEATURE;
|
131 |
+
echo YasrPhpFieldsHelper::radio( '', $class, $array_options, $name, $default, $id );
|
132 |
+
?>
|
133 |
+
</div>
|
134 |
+
<?php
|
135 |
+
}
|
136 |
+
|
137 |
+
public function vvRequiredVotes(){
|
138 |
+
?>
|
139 |
+
<div class="yasr-builder-div-fluid" id="builder-vv-required-votes">
|
140 |
+
<strong>
|
141 |
+
<?php
|
142 |
+
_e('At least...', 'yet-another-stars-rating');
|
143 |
+
echo YASR_LOCKED_FEATURE;
|
144 |
+
?>
|
145 |
+
</strong>
|
146 |
+
<!-- Min. number of votes for most rated -->
|
147 |
+
<div>
|
148 |
+
<label for="yasr-required-votes-most">
|
149 |
+
<select name="yasr-required-votes"
|
150 |
+
id="yasr-required-votes-most"
|
151 |
+
class="yasr-builder-elements-parents"
|
152 |
+
autocomplete="off">
|
153 |
+
<?php
|
154 |
+
for ($i = 1; $i <= 99; $i ++) {
|
155 |
+
if ($i === 1) { //default value
|
156 |
+
echo "<option value='$i' selected='selected'>$i</option>\n";
|
157 |
+
} else {
|
158 |
+
echo "<option value='$i'>$i</option>\n";
|
159 |
+
}
|
160 |
+
} //End for
|
161 |
+
?>
|
162 |
+
</select>
|
163 |
+
</label>
|
164 |
+
<br />
|
165 |
+
<?php
|
166 |
+
echo sprintf(__(" votes required %s for most rated", 'yet-another-stars-rating'), '<br />');
|
167 |
+
?>
|
168 |
+
</div>
|
169 |
+
|
170 |
+
<!-- Min. number of votes for highest rated -->
|
171 |
+
<div style="margin-top: 3px;">
|
172 |
+
<label for="yasr-required-votes-highest">
|
173 |
+
<select name="yasr-required-votes-highest"
|
174 |
+
id="yasr-required-votes-highest"
|
175 |
+
class="yasr-builder-elements-parents">
|
176 |
+
<?php
|
177 |
+
for ($i = 1; $i <= 99; $i ++) {
|
178 |
+
if ($i === 1) { //default value
|
179 |
+
echo "<option value='$i' selected='selected'>$i</option>\n";
|
180 |
+
} else {
|
181 |
+
echo "<option value='$i'>$i</option>\n";
|
182 |
+
}
|
183 |
+
} //End for
|
184 |
+
?>
|
185 |
+
</select>
|
186 |
+
</label>
|
187 |
+
<br />
|
188 |
+
<?php
|
189 |
+
echo sprintf(__(" votes required %s for highest rated", 'yet-another-stars-rating'), '<br />');
|
190 |
+
?>
|
191 |
+
</div>
|
192 |
+
</div>
|
193 |
+
<?php
|
194 |
+
}
|
195 |
+
|
196 |
+
public function ovCustomText(){
|
197 |
+
?>
|
198 |
+
<!-- Customize text -->
|
199 |
+
<div class="yasr-builder-div-fluid" id="builder-overall-text" style="display: none">
|
200 |
+
<?php
|
201 |
+
$option_title = __('Show text before or after the stars?', 'yet-another-stars-rating');
|
202 |
+
$class = 'yasr-builder-custom-text-overall yasr-builder-elements-parents';
|
203 |
+
$array_options = array (
|
204 |
+
'no' => __('No', 'yet-another-stars-rating'),
|
205 |
+
'before' => __('Yes, before the stars', 'yet-another-stars-rating'),
|
206 |
+
'after' => __('Yes, after the stars', 'yet-another-stars-rating')
|
207 |
+
);
|
208 |
+
$name = 'yasr-builder-customize-overall-text';
|
209 |
+
$default = 'no';
|
210 |
+
$id = 'yasr-builder-ov-radio-text';
|
211 |
+
|
212 |
+
echo $option_title.YASR_LOCKED_FEATURE;
|
213 |
+
echo YasrPhpFieldsHelper::radio('', $class, $array_options, $name, $default, $id);
|
214 |
+
?>
|
215 |
+
<br />
|
216 |
+
<strong>
|
217 |
+
<?php _e("Text to show", 'yet-another-stars-rating') ?>
|
218 |
+
</strong>
|
219 |
+
<br/>
|
220 |
+
<label for="yasr-builder-customize-ov-text">
|
221 |
+
<input type="text" name="yasr-builder-customize-ov-text"
|
222 |
+
value="<?php _e("Rating:", 'yet-another-stars-rating') ?>"
|
223 |
+
id="yasr-builder-customize-ov-text"
|
224 |
+
class="yasr-builder-elements-childs"
|
225 |
+
maxlength="30">
|
226 |
+
</label>
|
227 |
+
<div>
|
228 |
+
<small>
|
229 |
+
<?php
|
230 |
+
echo sprintf(
|
231 |
+
__('Use return %s to insert the text.', 'yet-another-stars-rating'),
|
232 |
+
'<strong>(↵)</strong>'
|
233 |
+
);
|
234 |
+
?>
|
235 |
+
</small>
|
236 |
+
</div>
|
237 |
+
</div>
|
238 |
+
<?php
|
239 |
+
}
|
240 |
+
|
241 |
+
public function categories(){
|
242 |
+
if ($this->custom_post_types !== false) {
|
243 |
+
$category_class = 'yasr-div-fixed-65';
|
244 |
+
} else {
|
245 |
+
$category_class = 'yasr-builder-div-fluid';
|
246 |
+
}
|
247 |
+
?>
|
248 |
+
<!-- Customize Category -->
|
249 |
+
<div class="<?php echo $category_class ?>" id="builder-category">
|
250 |
+
<?php
|
251 |
+
$option_title = __('Do you want to specify a category?', 'yet-another-stars-rating');
|
252 |
+
$array_options = array (
|
253 |
+
0 => __('No', 'yet-another-stars-rating'),
|
254 |
+
'yes' => __('Yes', 'yet-another-stars-rating'),
|
255 |
+
);
|
256 |
+
$default = 0;
|
257 |
+
$name = 'yasr-builder-category-radio';
|
258 |
+
$class = 'yasr-builder-enable-category yasr-builder-elements-parents';
|
259 |
+
$id = 'yasr-builder-rankings-category';
|
260 |
+
|
261 |
+
echo $option_title.YASR_LOCKED_FEATURE;
|
262 |
+
echo YasrPhpFieldsHelper::radio('', $class, $array_options, $name, $default, $id);
|
263 |
+
|
264 |
+
?>
|
265 |
+
|
266 |
+
<div>
|
267 |
+
<label for="yasr-filter-categories">
|
268 |
+
<?php _e("Search Categories:", 'yet-another-stars-rating') ?>
|
269 |
+
</label>
|
270 |
+
<input type="text"
|
271 |
+
name="yasr-filter-categories"
|
272 |
+
id="yasr-filter-categories"
|
273 |
+
class="yasr-builder-category yasr-builder-elements-parents">
|
274 |
+
</div>
|
275 |
+
|
276 |
+
<div id="yasr-ranking-ctg-container">
|
277 |
+
<?php
|
278 |
+
$categories = get_categories();
|
279 |
+
$i = 0;
|
280 |
+
if($this->custom_post_types !== false) {
|
281 |
+
$newline_row = 3;
|
282 |
+
} else {
|
283 |
+
$newline_row = 5;
|
284 |
+
}
|
285 |
+
foreach ($categories as $category) {
|
286 |
+
echo '<span>
|
287 |
+
<input type="checkbox"
|
288 |
+
name="yasr-builder-category-checked"
|
289 |
+
class="yasr-builder-category yasr-builder-elements-childs"
|
290 |
+
id="yasr-builder-category-checked['.$i.']"
|
291 |
+
value="'.$category->term_taxonomy_id .'"
|
292 |
+
data-category-name="'. $category->name .'"
|
293 |
+
autocomplete="off"
|
294 |
+
/><label for="yasr-builder-category-checked['.$i.']">'
|
295 |
+
. $category->name .
|
296 |
+
'</label>';
|
297 |
+
//close div
|
298 |
+
echo '</span>';
|
299 |
+
|
300 |
+
$i++;
|
301 |
+
|
302 |
+
if ($i%$newline_row === 0) {
|
303 |
+
echo '<br />';
|
304 |
+
}
|
305 |
+
|
306 |
+
} //end foreach
|
307 |
+
?>
|
308 |
+
</div>
|
309 |
+
</div>
|
310 |
+
<?php
|
311 |
+
}
|
312 |
+
|
313 |
+
public function cpt(){
|
314 |
+
?>
|
315 |
+
<div class="yasr-div-fixed-35" id="builder-cpt">
|
316 |
+
<?php
|
317 |
+
$option_title = __( 'Do you want to specify a custom post type?', 'yet-another-stars-rating' );
|
318 |
+
$array_options = array(
|
319 |
+
0 => __( 'No', 'yet-another-stars-rating' ),
|
320 |
+
'yes' => __( 'Yes', 'yet-another-stars-rating' ),
|
321 |
+
);
|
322 |
+
$default = 0;
|
323 |
+
$name = 'yasr-builder-cpt-radio';
|
324 |
+
$class = 'yasr-builder-enable-cpt yasr-builder-elements-parents';
|
325 |
+
$id = 'yasr-builder-enable-cpt-radio';
|
326 |
+
|
327 |
+
echo $option_title.YASR_LOCKED_FEATURE;
|
328 |
+
echo YasrPhpFieldsHelper::radio('', $class, $array_options, $name, $default, $id);
|
329 |
+
|
330 |
+
echo '<br />';
|
331 |
+
|
332 |
+
$i = 0;
|
333 |
+
$checked = 'checked';
|
334 |
+
foreach ($this->custom_post_types as $post_type_slug) {
|
335 |
+
if($i > 0) {
|
336 |
+
$checked = '';
|
337 |
+
}
|
338 |
+
echo '<input type="radio" name="yasr-builder-custom-post-radio"
|
339 |
+
class="yasr-builder-custom-post-radio yasr-builder-elements-childs"
|
340 |
+
id="yasr-builder-custom-post-radio['.$i.']"
|
341 |
+
value="'.$post_type_slug.'" '.$checked.' />
|
342 |
+
'.$post_type_slug.'
|
343 |
+
<br />';
|
344 |
+
$i ++;
|
345 |
+
}
|
346 |
+
?>
|
347 |
+
</div>
|
348 |
+
<?php
|
349 |
+
}
|
350 |
+
|
351 |
+
public function usernameDisplay(){
|
352 |
+
?>
|
353 |
+
<div class="yasr-builder-div-fluid" id="builder-username-options" style="display: none">
|
354 |
+
<?php
|
355 |
+
$option_title = __('Do you want to use Username or Display Name?', 'yet-another-stars-rating');
|
356 |
+
$array_options = array(
|
357 |
+
'login' => __('Username', 'yet-another-stars-rating'),
|
358 |
+
'displayname' => __('User display name', 'yet-another-stars-rating')
|
359 |
+
);
|
360 |
+
$default = 'login';
|
361 |
+
$name = 'yasr-builder-user-option';
|
362 |
+
$class = 'yasr-builder-user-option yasr-builder-elements-parents';
|
363 |
+
$id = 'yasr-builder-user-option';
|
364 |
+
|
365 |
+
echo YasrPhpFieldsHelper::radio($option_title, $class, $array_options, $name, $default, $id);
|
366 |
+
?>
|
367 |
+
|
368 |
+
</div>
|
369 |
+
<?php
|
370 |
+
}
|
371 |
+
}
|
admin/settings/classes/YasrStatsVisitorMulti.php
DELETED
@@ -1,328 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/*
|
4 |
-
|
5 |
-
Copyright 2014 Dario Curvino (email : d.curvino@tiscali.it)
|
6 |
-
|
7 |
-
This program is free software: you can redistribute it and/or modify
|
8 |
-
it under the terms of the GNU General Public License as published by
|
9 |
-
the Free Software Foundation, either version 2 of the License, or
|
10 |
-
(at your option) any later version.
|
11 |
-
|
12 |
-
This program is distributed in the hope that it will be useful,
|
13 |
-
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
14 |
-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
15 |
-
GNU General Public License for more details.
|
16 |
-
|
17 |
-
You should have received a copy of the GNU General Public License
|
18 |
-
along with this program. If not, see <http://www.gnu.org/licenses/>
|
19 |
-
*/
|
20 |
-
|
21 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
22 |
-
exit( 'You\'re not allowed to see this page' );
|
23 |
-
} // Exit if accessed directly
|
24 |
-
|
25 |
-
/**
|
26 |
-
* Create a new table class that will extend the WP_List_Table
|
27 |
-
*/
|
28 |
-
class YasrStatsVisitorMulti extends YASR_WP_List_Table {
|
29 |
-
|
30 |
-
private $active_tab;
|
31 |
-
|
32 |
-
function __construct($active_tab) {
|
33 |
-
parent::__construct();
|
34 |
-
$this->active_tab = $active_tab;
|
35 |
-
}
|
36 |
-
/**
|
37 |
-
* Prepare the items for the table to process
|
38 |
-
*
|
39 |
-
* @return Void
|
40 |
-
*/
|
41 |
-
public function prepare_items() {
|
42 |
-
$columns = $this->get_columns();
|
43 |
-
$hidden = $this->get_hidden_columns();
|
44 |
-
$sortable = $this->get_sortable_columns();
|
45 |
-
|
46 |
-
//print bulk_Actions
|
47 |
-
$this->get_bulk_actions();
|
48 |
-
$this->process_bulk_action();
|
49 |
-
|
50 |
-
$table = YASR_LOG_TABLE;
|
51 |
-
|
52 |
-
if($this->active_tab === 'logs_multi') {
|
53 |
-
$table = YASR_LOG_MULTI_SET;
|
54 |
-
}
|
55 |
-
|
56 |
-
global $wpdb;
|
57 |
-
|
58 |
-
$query = "SELECT * FROM $table ORDER BY date";
|
59 |
-
|
60 |
-
if ($table === YASR_LOG_MULTI_SET) {
|
61 |
-
$query .= ', set_type, post_id DESC';
|
62 |
-
}
|
63 |
-
|
64 |
-
$data = $wpdb->get_results($query, ARRAY_A);
|
65 |
-
|
66 |
-
usort($data, array( $this, 'sort_data' ));
|
67 |
-
|
68 |
-
$perPage = 25;
|
69 |
-
$currentPage = $this->get_pagenum();
|
70 |
-
$totalItems = count($data);
|
71 |
-
|
72 |
-
$this->set_pagination_args(
|
73 |
-
array(
|
74 |
-
'total_items' => $totalItems,
|
75 |
-
'per_page' => $perPage
|
76 |
-
)
|
77 |
-
);
|
78 |
-
|
79 |
-
$data = array_slice($data, (( $currentPage - 1 ) * $perPage ), $perPage);
|
80 |
-
|
81 |
-
$this->_column_headers = array( $columns, $hidden, $sortable );
|
82 |
-
$this->items = $data;
|
83 |
-
|
84 |
-
}
|
85 |
-
|
86 |
-
/**
|
87 |
-
* Override the parent columns method. Defines the columns to use in your listing table
|
88 |
-
*
|
89 |
-
* @return Array
|
90 |
-
*/
|
91 |
-
public function get_columns() {
|
92 |
-
|
93 |
-
$columns = array(
|
94 |
-
'cb' => '<input type="checkbox" />',
|
95 |
-
'id' => 'ID',
|
96 |
-
'post_id' => 'Title',
|
97 |
-
'vote' => 'Vote',
|
98 |
-
'user_id' => 'User ID',
|
99 |
-
'date' => 'Date'
|
100 |
-
);
|
101 |
-
|
102 |
-
if($this->active_tab === 'logs_multi') {
|
103 |
-
//insert multiset and field name
|
104 |
-
$columns = array_slice($columns, 0, 3, true) +
|
105 |
-
array('set_type' => 'MultiSet', 'field_id' => 'Field Name') +
|
106 |
-
array_slice($columns, 3, count($columns) - 1, true) ;
|
107 |
-
}
|
108 |
-
|
109 |
-
if (YASR_ENABLE_IP === 'yes') {
|
110 |
-
$columns['ip'] = 'IP';
|
111 |
-
}
|
112 |
-
return $columns;
|
113 |
-
}
|
114 |
-
|
115 |
-
/**
|
116 |
-
* Define which columns are hidden
|
117 |
-
*
|
118 |
-
* @return Array
|
119 |
-
*/
|
120 |
-
public function get_hidden_columns() {
|
121 |
-
return array('id');
|
122 |
-
}
|
123 |
-
|
124 |
-
/**
|
125 |
-
* Define the sortable columns
|
126 |
-
*
|
127 |
-
* @return Array
|
128 |
-
*/
|
129 |
-
public function get_sortable_columns() {
|
130 |
-
|
131 |
-
$sortable_columns = array(
|
132 |
-
'post_id' => array('post_id', false),
|
133 |
-
'user_id' => array('user_id', false),
|
134 |
-
'vote' => array('vote', false),
|
135 |
-
'date' => array('date', false),
|
136 |
-
'ip' => array('ip', false)
|
137 |
-
);
|
138 |
-
|
139 |
-
if($this->active_tab === 'logs_multi') {
|
140 |
-
$sortable_columns['set_type'] = array('set_type', false);
|
141 |
-
$sortable_columns['field_id'] = array('field_id', false);
|
142 |
-
}
|
143 |
-
|
144 |
-
return $sortable_columns;
|
145 |
-
}
|
146 |
-
|
147 |
-
/**
|
148 |
-
* Define what data to show on each column of the table
|
149 |
-
*
|
150 |
-
* @param Array $item Data
|
151 |
-
* @param String $column_name - Current column name
|
152 |
-
*
|
153 |
-
* @return Mixed|void
|
154 |
-
*/
|
155 |
-
protected function column_default( $item, $column_name ) {
|
156 |
-
|
157 |
-
global $wpdb;
|
158 |
-
|
159 |
-
if (isset($item['set_type'])) {
|
160 |
-
$set_id = (int)$item['set_type'];
|
161 |
-
}
|
162 |
-
|
163 |
-
switch ($column_name) {
|
164 |
-
case 'post_id':
|
165 |
-
$post_id = $item[$column_name];
|
166 |
-
|
167 |
-
$title_post = wp_strip_all_tags(get_the_title($post_id));
|
168 |
-
$link = get_permalink($post_id);
|
169 |
-
|
170 |
-
return '<a href="' . $link . '">' . $title_post . '</a>';
|
171 |
-
|
172 |
-
case 'user_id':
|
173 |
-
$user_id = $item[$column_name];
|
174 |
-
|
175 |
-
$user = get_user_by('id', $user_id);
|
176 |
-
|
177 |
-
//If !user means that the vote are anonymous
|
178 |
-
if ($user === false) {
|
179 |
-
$user = (object) array( 'user_login' );
|
180 |
-
$user->user_login = __('anonymous', 'yet-another-stars-rating');
|
181 |
-
}
|
182 |
-
|
183 |
-
return $user->user_login;
|
184 |
-
|
185 |
-
case 'set_type':
|
186 |
-
$data = $wpdb->get_results(
|
187 |
-
$wpdb->prepare(
|
188 |
-
"SELECT set_name
|
189 |
-
FROM " . YASR_MULTI_SET_NAME_TABLE . "
|
190 |
-
WHERE set_id = %d", $set_id),
|
191 |
-
ARRAY_A);
|
192 |
-
|
193 |
-
if(!empty($data)) {
|
194 |
-
return $data[0]['set_name'];
|
195 |
-
}
|
196 |
-
|
197 |
-
return __('Multi Set doesn\'t exists', 'yet-another-stars-rating');
|
198 |
-
|
199 |
-
case 'field_id':
|
200 |
-
$field_id = $item[$column_name];
|
201 |
-
$data = $wpdb->get_results(
|
202 |
-
$wpdb->prepare(
|
203 |
-
"SELECT field_name
|
204 |
-
FROM " . YASR_MULTI_SET_FIELDS_TABLE . "
|
205 |
-
WHERE parent_set_id = %d
|
206 |
-
AND field_id = %d",
|
207 |
-
$set_id, $field_id),
|
208 |
-
ARRAY_A);
|
209 |
-
|
210 |
-
if(!empty($data)) {
|
211 |
-
return $data[0]['field_name'];
|
212 |
-
}
|
213 |
-
|
214 |
-
return __('Field doesn\'t exists', 'yet-another-stars-rating');
|
215 |
-
|
216 |
-
case 'date':
|
217 |
-
$date = $item[$column_name];
|
218 |
-
if($item[$column_name] === '0000-00-00 00:00:00') {
|
219 |
-
$date = __('Imported Data', 'yet-another-stars-rating');
|
220 |
-
}
|
221 |
-
return $date;
|
222 |
-
|
223 |
-
//All other columns must return their content
|
224 |
-
case 'vote':
|
225 |
-
case 'ip':
|
226 |
-
return $item[$column_name];
|
227 |
-
}
|
228 |
-
return;
|
229 |
-
}
|
230 |
-
|
231 |
-
/**
|
232 |
-
* Allows you to sort the data by the variables set in the $_GET
|
233 |
-
*
|
234 |
-
* @return Mixed
|
235 |
-
*/
|
236 |
-
protected function sort_data( $a, $b ) {
|
237 |
-
|
238 |
-
// Set defaults (just need to avoid undefined variable at first load,
|
239 |
-
// it is already ordered with the query
|
240 |
-
$orderby = 'date';
|
241 |
-
$order = 'desc';
|
242 |
-
|
243 |
-
// If orderby is set, use this as the sort column
|
244 |
-
if (!empty($_GET['orderby'])) {
|
245 |
-
$orderby = $_GET['orderby'];
|
246 |
-
}
|
247 |
-
|
248 |
-
// If order is set use this as the order
|
249 |
-
if (!empty($_GET['order'])) {
|
250 |
-
$order = $_GET['order'];
|
251 |
-
}
|
252 |
-
|
253 |
-
$result = strcmp($a[ $orderby ], $b[ $orderby ]);
|
254 |
-
|
255 |
-
if ($order === 'asc') {
|
256 |
-
return $result;
|
257 |
-
}
|
258 |
-
|
259 |
-
return - $result;
|
260 |
-
}
|
261 |
-
|
262 |
-
|
263 |
-
protected function get_bulk_actions() {
|
264 |
-
$actions = array(
|
265 |
-
'delete' => 'Delete'
|
266 |
-
);
|
267 |
-
return $actions;
|
268 |
-
}
|
269 |
-
|
270 |
-
protected function column_cb($item) {
|
271 |
-
|
272 |
-
return sprintf(
|
273 |
-
"<input type='checkbox' name='yasr_logs_votes_to_delete[]' id='{$item['id']}' value='{$item['id']}' />"
|
274 |
-
);
|
275 |
-
}
|
276 |
-
|
277 |
-
//process bulk action
|
278 |
-
protected function process_bulk_action() {
|
279 |
-
if ($this->current_action() === 'delete') {
|
280 |
-
check_admin_referer( 'yasr-delete-stats-logs', 'yasr-nonce-delete-stats-logs' );
|
281 |
-
|
282 |
-
global $wpdb;
|
283 |
-
|
284 |
-
$table = YASR_LOG_TABLE;
|
285 |
-
|
286 |
-
if($this->active_tab === 'logs_multi') {
|
287 |
-
$table = YASR_LOG_MULTI_SET;
|
288 |
-
}
|
289 |
-
|
290 |
-
foreach ($_POST['yasr_logs_votes_to_delete'] as $log_id) {
|
291 |
-
//force to be an int
|
292 |
-
$log_id = (int)$log_id;
|
293 |
-
|
294 |
-
//Find the post_id
|
295 |
-
$post_id = $wpdb->get_var(
|
296 |
-
$wpdb->prepare(
|
297 |
-
"SELECT post_id FROM
|
298 |
-
$table
|
299 |
-
WHERE id = %d",
|
300 |
-
$log_id
|
301 |
-
)
|
302 |
-
);
|
303 |
-
|
304 |
-
//find set_id
|
305 |
-
if($this->active_tab === 'logs_multi') {
|
306 |
-
$set_id = $wpdb->get_var(
|
307 |
-
$wpdb->prepare(
|
308 |
-
"SELECT set_type FROM $table WHERE id = %d",
|
309 |
-
$log_id
|
310 |
-
)
|
311 |
-
);
|
312 |
-
}
|
313 |
-
|
314 |
-
//delete the log id
|
315 |
-
$wpdb->delete(
|
316 |
-
$table,
|
317 |
-
array(
|
318 |
-
'id' => $log_id
|
319 |
-
),
|
320 |
-
array( '%d' )
|
321 |
-
);
|
322 |
-
|
323 |
-
}
|
324 |
-
}
|
325 |
-
|
326 |
-
}
|
327 |
-
|
328 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/settings/multiset/yasr-settings-functions-multiset-page.php
CHANGED
@@ -54,72 +54,67 @@ $n_multi_set = (int)$wpdb->num_rows; //wpdb->num_rows always store the last of t
|
|
54 |
|
55 |
?>
|
56 |
|
57 |
-
<
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
<
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
whetever you're reviewing, example in the image below.",
|
70 |
-
'yet-another-stars-rating'
|
71 |
-
);
|
72 |
-
|
73 |
-
echo "<br /><br /><img src=" . YASR_IMG_DIR . "/yasr-multi-set.png> <br /> <br />";
|
74 |
-
|
75 |
-
_e(
|
76 |
-
"You can create up to 99 different Multi Set and each one can contain up to 9 different fields.
|
77 |
-
Once you've saved it, you can insert the rates while typing your article in the box below the editor,
|
78 |
-
as you can see in this image (click to see it larger)",
|
79 |
'yet-another-stars-rating'
|
80 |
-
|
81 |
|
82 |
-
|
83 |
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
|
|
89 |
|
90 |
-
|
91 |
-
<br/> <br/>
|
92 |
-
<a href="#"
|
93 |
-
id="yasr-multi-set-doc-link-hide"><?php _e("Close this message", 'yet-another-stars-rating') ?></a>
|
94 |
-
</div>
|
95 |
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
|
108 |
-
|
|
|
|
|
109 |
</div>
|
|
|
110 |
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
<form action="options.php" method="post" id="yasr_multiset_form">
|
115 |
-
<?php
|
116 |
-
settings_fields('yasr_multiset_options_group');
|
117 |
-
do_settings_sections('yasr_multiset_tab');
|
118 |
-
submit_button(__('Save'));
|
119 |
-
?>
|
120 |
-
</form>
|
121 |
</div>
|
|
|
122 |
|
123 |
-
|
124 |
</div>
|
125 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
54 |
|
55 |
?>
|
56 |
|
57 |
+
<input type="hidden" value="<?php echo $n_multi_set; ?>" id="n-multiset">
|
58 |
+
<h3> <?php _e("Manage Multi Set", 'yet-another-stars-rating'); ?></h3>
|
59 |
+
|
60 |
+
<p>
|
61 |
+
<a href="#"
|
62 |
+
id="yasr-multi-set-doc-link"><?php _e("What is a Multi Set?", 'yet-another-stars-rating') ?></a>
|
63 |
+
</p>
|
64 |
+
|
65 |
+
<div id="yasr-multi-set-doc-box" style="display:none">
|
66 |
+
<?php _e(
|
67 |
+
"Multi Set allows you to insert a rate for each aspect about the product / local business /
|
68 |
+
whetever you're reviewing, example in the image below.",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
69 |
'yet-another-stars-rating'
|
70 |
+
);
|
71 |
|
72 |
+
echo "<br /><br /><img src=" . YASR_IMG_DIR . "/yasr-multi-set.png> <br /> <br />";
|
73 |
|
74 |
+
_e(
|
75 |
+
"You can create up to 99 different Multi Set and each one can contain up to 9 different fields.
|
76 |
+
Once you've saved it, you can insert the rates while typing your article in the box below the editor,
|
77 |
+
as you can see in this image (click to see it larger)",
|
78 |
+
'yet-another-stars-rating'
|
79 |
+
);
|
80 |
|
81 |
+
echo "<br /><br /><a href=\"" . YASR_IMG_DIR . "yasr-multi-set-insert-rate.jpg\"><img src=" . YASR_IMG_DIR . "/yasr-multi-set-insert-rate-small.jpg></a> <br /> <br />";
|
|
|
|
|
|
|
|
|
82 |
|
83 |
+
_e(
|
84 |
+
'In order to insert your Multi Sets into a post or page, you can either past the short code that will
|
85 |
+
appear at the bottom of the box or just click on the star in the graphic editor and select "Insert Multi Set".',
|
86 |
+
'yet-another-stars-rating'
|
87 |
+
);
|
88 |
|
89 |
+
?>
|
90 |
+
<br/> <br/>
|
91 |
+
<a href="#"
|
92 |
+
id="yasr-multi-set-doc-link-hide"><?php _e("Close this message", 'yet-another-stars-rating') ?></a>
|
93 |
+
</div>
|
94 |
|
95 |
+
<div class="yasr-multi-set-left">
|
96 |
+
<div class="yasr-new-multi-set">
|
97 |
+
<?php yasr_display_multi_set_form(); ?>
|
98 |
</div>
|
99 |
+
</div>
|
100 |
|
101 |
+
<div class="yasr-multi-set-right">
|
102 |
+
<?php yasr_edit_multi_form(); ?>
|
103 |
+
<div id="yasr-multi-set-response" style="display:none">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
104 |
</div>
|
105 |
+
</div>
|
106 |
|
107 |
+
<div class="yasr-space-settings-div">
|
108 |
</div>
|
109 |
|
110 |
+
|
111 |
+
<div class="yasr-multi-set-choose-theme">
|
112 |
+
<!--This allow to choose if show average or no-->
|
113 |
+
<form action="options.php" method="post" id="yasr_multiset_form">
|
114 |
+
<?php
|
115 |
+
settings_fields('yasr_multiset_options_group');
|
116 |
+
do_settings_sections('yasr_multiset_tab');
|
117 |
+
submit_button(__('Save'));
|
118 |
+
?>
|
119 |
+
</form>
|
120 |
+
</div>
|
admin/settings/rankings/yasr-ranking-builder.php
ADDED
@@ -0,0 +1,90 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/*
|
4 |
+
|
5 |
+
Copyright 2014 Dario Curvino (email : d.curvino@tiscali.it)
|
6 |
+
|
7 |
+
This program is free software: you can redistribute it and/or modify
|
8 |
+
it under the terms of the GNU General Public License as published by
|
9 |
+
the Free Software Foundation, either version 2 of the License, or
|
10 |
+
(at your option) any later version.
|
11 |
+
|
12 |
+
This program is distributed in the hope that it will be useful,
|
13 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
14 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
15 |
+
GNU General Public License for more details.
|
16 |
+
|
17 |
+
You should have received a copy of the GNU General Public License
|
18 |
+
along with this program. If not, see <http://www.gnu.org/licenses/>
|
19 |
+
*/
|
20 |
+
|
21 |
+
if (!defined('ABSPATH')) {
|
22 |
+
exit('You\'re not allowed to see this page');
|
23 |
+
} // Exit if accessed directly
|
24 |
+
|
25 |
+
$custom_post_types = YasrCustomPostTypes::getCustomPostTypes();
|
26 |
+
$cr_setting = new YasrSettingsRankings($custom_post_types);
|
27 |
+
?>
|
28 |
+
|
29 |
+
<h3> <?php _e('Rankings Options', 'yasr-pro');?> </h3>
|
30 |
+
|
31 |
+
<table class="form-table" id="yasr-pro-charts-options">
|
32 |
+
<!--Builder Container-->
|
33 |
+
<tr>
|
34 |
+
<td>
|
35 |
+
<div id="yasr-builder-shortcode-container" class="yasr-builder-shortcode-container">
|
36 |
+
|
37 |
+
<div id="yasr-builder-shortcode"
|
38 |
+
class="yasr-rankings-div-shortcode">
|
39 |
+
</div>
|
40 |
+
|
41 |
+
<div id="yasr-builder-shortcode-buttons-container">
|
42 |
+
<button class='button-primary' id="yasr-builder-button-preview">
|
43 |
+
<?php _e('Ranking preview', 'yet-another-stars-rating'); ?>
|
44 |
+
</button>
|
45 |
+
|
46 |
+
<button class="button-secondary yasr-copy-shortcode" id="yasr-builder-copy-shortcode">
|
47 |
+
<span class="dashicons dashicons-admin-page" style="vertical-align: middle"></span>
|
48 |
+
<?php _e('Copy Shortcode', 'yet-another-stars-rating') ?>
|
49 |
+
</button>
|
50 |
+
</div>
|
51 |
+
|
52 |
+
<div id="yasr-builder-preview"></div>
|
53 |
+
|
54 |
+
</div>
|
55 |
+
|
56 |
+
<!-- First Row -->
|
57 |
+
<div class="yasr-builder-ranking-container">
|
58 |
+
<?php
|
59 |
+
//Data Source
|
60 |
+
$cr_setting->selectRanking();
|
61 |
+
//rows
|
62 |
+
$cr_setting->rows();
|
63 |
+
//default view or VV
|
64 |
+
$cr_setting->vvDefaultView();
|
65 |
+
//required votes
|
66 |
+
$cr_setting->vvRequiredVotes();
|
67 |
+
//star size
|
68 |
+
$cr_setting->size();
|
69 |
+
//custom text for overall rating
|
70 |
+
$cr_setting->ovCustomText();
|
71 |
+
//settings for display name
|
72 |
+
$cr_setting->usernameDisplay();
|
73 |
+
?>
|
74 |
+
</div>
|
75 |
+
|
76 |
+
<!--Second Row -->
|
77 |
+
<div class="yasr-builder-ranking-container" style="margin-top: 15px">
|
78 |
+
<?php
|
79 |
+
$cr_setting->categories();
|
80 |
+
|
81 |
+
if ($custom_post_types) {
|
82 |
+
$cr_setting->cpt();
|
83 |
+
}
|
84 |
+
?>
|
85 |
+
</div>
|
86 |
+
</td>
|
87 |
+
|
88 |
+
</tr>
|
89 |
+
|
90 |
+
</table>
|
admin/settings/yasr-settings-functions-misc.php
CHANGED
@@ -43,6 +43,18 @@ function yasr_settings_tabs( $active_tab )
|
|
43 |
?>
|
44 |
</a>
|
45 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46 |
<?php
|
47 |
do_action( 'yasr_add_settings_tab', $active_tab );
|
48 |
$rating_plugin_exists = new YasrImportRatingPlugins();
|
@@ -226,36 +238,6 @@ function yasr_ask_rating( $position = false )
|
|
226 |
echo $div_and_text ;
|
227 |
}
|
228 |
|
229 |
-
/**
|
230 |
-
* Print Sponsors
|
231 |
-
*
|
232 |
-
* @author Dario Curvino <@dudo>
|
233 |
-
* @since 2.5.9
|
234 |
-
* @param false $position
|
235 |
-
*/
|
236 |
-
function yasr_sponsors( $position = false )
|
237 |
-
{
|
238 |
-
|
239 |
-
if ( $position && $position === "bottom" ) {
|
240 |
-
$yasr_metabox_class = "yasr-donatedivbottom";
|
241 |
-
} else {
|
242 |
-
$yasr_metabox_class = "yasr-donatedivdx";
|
243 |
-
}
|
244 |
-
|
245 |
-
$div = "<div class='{$yasr_metabox_class}' id='yasr-sponsors' style='display:none;'>";
|
246 |
-
$link = '<a href="https://supporthost.net/a69">';
|
247 |
-
$title = '<div class="yasr-donate-title">' . __( 'Optimized WordPress-Hosting!', 'yet-another-stars-rating' ) . '</div>';
|
248 |
-
$logo = '<div style="font-size: 32px; color: #F1CB32; text-align:center; margin-bottom: 20px; margin-top: -5px;">
|
249 |
-
<img src="' . YASR_IMG_DIR . '/logo-supporthost.svg" alt="supporthost">
|
250 |
-
</div>';
|
251 |
-
$end_link = '</a>';
|
252 |
-
$text = __( 'Boost your WordPress performance with SupportHost, with highly optimized servers on USA and Europe,
|
253 |
-
LiteSpeed + LSCache, free transfer and expert support!', 'yet-another-stars-rating' );
|
254 |
-
$text .= '<br /> <br /><strong>' . __( 'Get 25% off by entering YASR at checkout', 'yet-another-stars-rating' ) . '</strong>';
|
255 |
-
$div_and_text = $div . $link . $title . $logo . $end_link . $text . '</div>';
|
256 |
-
echo $div_and_text ;
|
257 |
-
}
|
258 |
-
|
259 |
/****
|
260 |
Yasr Right settings panel, since version 1.9.5
|
261 |
****/
|
@@ -264,7 +246,6 @@ function yasr_right_settings_panel( $position = false )
|
|
264 |
do_action( 'yasr_right_settings_panel_box', $position );
|
265 |
yasr_upgrade_pro_box( $position );
|
266 |
yasr_resources_box( $position );
|
267 |
-
yasr_sponsors( $position );
|
268 |
yasr_ask_rating( $position );
|
269 |
}
|
270 |
|
43 |
?>
|
44 |
</a>
|
45 |
|
46 |
+
<a href="?page=yasr_settings_page&tab=rankings"
|
47 |
+
id="rankings"
|
48 |
+
class="nav-tab <?php
|
49 |
+
if ( $active_tab === 'rankings' ) {
|
50 |
+
echo 'nav-tab-active' ;
|
51 |
+
}
|
52 |
+
?>">
|
53 |
+
<?php
|
54 |
+
_e( "Rankings", 'yet-another-stars-rating' );
|
55 |
+
?>
|
56 |
+
</a>
|
57 |
+
|
58 |
<?php
|
59 |
do_action( 'yasr_add_settings_tab', $active_tab );
|
60 |
$rating_plugin_exists = new YasrImportRatingPlugins();
|
238 |
echo $div_and_text ;
|
239 |
}
|
240 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
241 |
/****
|
242 |
Yasr Right settings panel, since version 1.9.5
|
243 |
****/
|
246 |
do_action( 'yasr_right_settings_panel_box', $position );
|
247 |
yasr_upgrade_pro_box( $position );
|
248 |
yasr_resources_box( $position );
|
|
|
249 |
yasr_ask_rating( $position );
|
250 |
}
|
251 |
|
admin/settings/yasr-settings-functions.php
DELETED
@@ -1,987 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/*
|
4 |
-
|
5 |
-
Copyright 2014 Dario Curvino (email : d.curvino@tiscali.it)
|
6 |
-
|
7 |
-
This program is free software: you can redistribute it and/or modify
|
8 |
-
it under the terms of the GNU General Public License as published by
|
9 |
-
the Free Software Foundation, either version 2 of the License, or
|
10 |
-
(at your option) any later version.
|
11 |
-
|
12 |
-
This program is distributed in the hope that it will be useful,
|
13 |
-
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
14 |
-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
15 |
-
GNU General Public License for more details.
|
16 |
-
|
17 |
-
You should have received a copy of the GNU General Public License
|
18 |
-
along with this program. If not, see <http://www.gnu.org/licenses/>
|
19 |
-
*/
|
20 |
-
|
21 |
-
if (!defined('ABSPATH')) {
|
22 |
-
exit('You\'re not allowed to see this page');
|
23 |
-
} // Exit if accessed directly
|
24 |
-
|
25 |
-
/************ Add yasr general options ***********/
|
26 |
-
|
27 |
-
add_action('admin_init', 'yasr_general_options_init'); //This is for general options
|
28 |
-
|
29 |
-
function yasr_general_options_init() {
|
30 |
-
|
31 |
-
register_setting(
|
32 |
-
'yasr_general_options_group', // A settings group name. Must exist prior to the register_setting call. This must match the group name in settings_fields()
|
33 |
-
'yasr_general_options', //The name of an option to sanitize and save.
|
34 |
-
'yasr_general_options_sanitize'
|
35 |
-
);
|
36 |
-
|
37 |
-
$option = get_option('yasr_general_options');
|
38 |
-
|
39 |
-
//This is to avoid undefined offset
|
40 |
-
if ($option && $option['auto_insert_enabled'] === 0) {
|
41 |
-
$option['auto_insert_what'] = 'visitor_rating';
|
42 |
-
$option['auto_insert_where'] = 'bottom';
|
43 |
-
$option['auto_insert_align'] = 'center';
|
44 |
-
$option['auto_insert_exclude_pages'] = 'yes';
|
45 |
-
$option['auto_insert_size'] = 'large';
|
46 |
-
$option['auto_insert_custom_post_only'] = 'no';
|
47 |
-
}
|
48 |
-
|
49 |
-
if ($option && $option['stars_title'] === 'no') {
|
50 |
-
$option['stars_title_what'] = 'visitor_rating';
|
51 |
-
$option['stars_title_exclude_pages'] = 'yes';
|
52 |
-
$option['stars_title_where'] = 'archive';
|
53 |
-
}
|
54 |
-
|
55 |
-
//This is to avoid undefined offset
|
56 |
-
if ($option && $option['text_before_stars'] === 0) {
|
57 |
-
$option['text_before_overall'] = __('Our Score', 'yet-another-stars-rating');
|
58 |
-
$option['text_before_visitor_rating'] = __('Click to rate this post!', 'yet-another-stars-rating');
|
59 |
-
$option['text_after_visitor_rating'] = sprintf(
|
60 |
-
__('[Total: %s Average: %s]', 'yet-another-stars-rating'),
|
61 |
-
'%total_count%', '%average%'
|
62 |
-
);
|
63 |
-
$option['custom_text_user_voted'] = __('You have already voted for this article', 'yet-another-stars-rating');
|
64 |
-
$option['custom_text_must_sign_in'] = __('You must sign in to vote', 'yet-another-stars-rating');
|
65 |
-
}
|
66 |
-
|
67 |
-
|
68 |
-
//Avoid undefined
|
69 |
-
if (!isset($option['publisher'])) {
|
70 |
-
$option['publisher'] = 'Organization';
|
71 |
-
}
|
72 |
-
|
73 |
-
if (!isset($option['publisher_name'])) {
|
74 |
-
$option['publisher_name'] = get_bloginfo('name');
|
75 |
-
}
|
76 |
-
|
77 |
-
if (!isset($option['publisher_logo'])) {
|
78 |
-
$option['publisher_logo'] = get_site_icon_url();
|
79 |
-
}
|
80 |
-
|
81 |
-
if(!isset($option['enable_ajax'])) {
|
82 |
-
$option['enable_ajax'] = 'no';
|
83 |
-
}
|
84 |
-
|
85 |
-
$description_auto_insert = sprintf(
|
86 |
-
__('Auto Insert Options %s
|
87 |
-
Automatically adds YASR in your posts or pages. %s
|
88 |
-
Disable this if you prefer to use shortcodes.',
|
89 |
-
'yet-another-stars-rating'
|
90 |
-
),
|
91 |
-
'<p> </p>', '<br />'
|
92 |
-
);
|
93 |
-
|
94 |
-
add_settings_section(
|
95 |
-
'yasr_general_options_section_id',
|
96 |
-
__('General settings', 'yet-another-stars-rating'),
|
97 |
-
'yasr_section_callback',
|
98 |
-
'yasr_general_settings_tab'
|
99 |
-
);
|
100 |
-
|
101 |
-
add_settings_field(
|
102 |
-
'yasr_use_auto_insert_id',
|
103 |
-
$description_auto_insert,
|
104 |
-
'yasr_auto_insert_callback',
|
105 |
-
'yasr_general_settings_tab',
|
106 |
-
'yasr_general_options_section_id',
|
107 |
-
$option
|
108 |
-
);
|
109 |
-
|
110 |
-
add_settings_field(
|
111 |
-
'yasr_stars_title',
|
112 |
-
__('Enable stars next to the title?', 'yet-another-stars-rating'),
|
113 |
-
'yasr_stars_title_callback',
|
114 |
-
'yasr_general_settings_tab',
|
115 |
-
'yasr_general_options_section_id',
|
116 |
-
$option
|
117 |
-
);
|
118 |
-
|
119 |
-
add_settings_field(
|
120 |
-
'yasr_custom_text',
|
121 |
-
__('Insert custom text to show before / after stars', 'yet-another-stars-rating'),
|
122 |
-
'yasr_custom_text_callback',
|
123 |
-
'yasr_general_settings_tab',
|
124 |
-
'yasr_general_options_section_id',
|
125 |
-
$option
|
126 |
-
);
|
127 |
-
|
128 |
-
add_settings_field(
|
129 |
-
'yasr_visitors_stats',
|
130 |
-
__('Do you want show stats for visitors votes?', 'yet-another-stars-rating'),
|
131 |
-
'yasr_visitors_stats_callback',
|
132 |
-
'yasr_general_settings_tab',
|
133 |
-
'yasr_general_options_section_id',
|
134 |
-
$option
|
135 |
-
);
|
136 |
-
|
137 |
-
add_settings_field(
|
138 |
-
'yasr_allow_only_logged_in_id',
|
139 |
-
__('Allow only logged in user to vote?', 'yet-another-stars-rating'),
|
140 |
-
'yasr_allow_only_logged_in_callback',
|
141 |
-
'yasr_general_settings_tab',
|
142 |
-
'yasr_general_options_section_id',
|
143 |
-
$option
|
144 |
-
);
|
145 |
-
|
146 |
-
add_settings_field(
|
147 |
-
'yasr_show_overall_in_loop',
|
148 |
-
__('Show "Overall Rating" in Archive Page?', 'yet-another-stars-rating'),
|
149 |
-
'yasr_show_overall_in_loop_callback',
|
150 |
-
'yasr_general_settings_tab',
|
151 |
-
'yasr_general_options_section_id',
|
152 |
-
$option
|
153 |
-
);
|
154 |
-
|
155 |
-
add_settings_field(
|
156 |
-
'yasr_show_visitor_votes_in_loop',
|
157 |
-
__('Show "Visitor Votes" in Archive Page?', 'yet-another-stars-rating'),
|
158 |
-
'yasr_show_visitor_votes_in_loop_callback',
|
159 |
-
'yasr_general_settings_tab',
|
160 |
-
'yasr_general_options_section_id',
|
161 |
-
$option
|
162 |
-
);
|
163 |
-
|
164 |
-
add_settings_field(
|
165 |
-
'yasr_enable_ip',
|
166 |
-
__('Do you want to save ip address?', 'yet-another-stars-rating'),
|
167 |
-
'yasr_enable_ip_callback',
|
168 |
-
'yasr_general_settings_tab',
|
169 |
-
'yasr_general_options_section_id',
|
170 |
-
$option
|
171 |
-
);
|
172 |
-
|
173 |
-
add_settings_field(
|
174 |
-
'yasr_choose_snippet_id',
|
175 |
-
__('Rich snippet options', 'yet-another-stars-rating'),
|
176 |
-
'yasr_choose_snippet_callback',
|
177 |
-
'yasr_general_settings_tab',
|
178 |
-
'yasr_general_options_section_id',
|
179 |
-
$option
|
180 |
-
);
|
181 |
-
|
182 |
-
add_settings_field(
|
183 |
-
'yasr_load_with_ajax',
|
184 |
-
__('Load results with AJAX', 'yet-another-stars-rating'),
|
185 |
-
'yasr_load_with_ajax_callback',
|
186 |
-
'yasr_general_settings_tab',
|
187 |
-
'yasr_general_options_section_id',
|
188 |
-
$option
|
189 |
-
);
|
190 |
-
}
|
191 |
-
|
192 |
-
function yasr_section_callback() {
|
193 |
-
//_e('Manage auto insert', 'yet-another-stars-rating');
|
194 |
-
}
|
195 |
-
|
196 |
-
function yasr_auto_insert_callback($option) {
|
197 |
-
?>
|
198 |
-
<div>
|
199 |
-
<strong><?php _e('Use Auto Insert?', 'yet-another-stars-rating'); ?></strong>
|
200 |
-
<div class="yasr-onoffswitch-big">
|
201 |
-
<input type="checkbox" name="yasr_general_options[auto_insert_enabled]" class="yasr-onoffswitch-checkbox"
|
202 |
-
value="1" id="yasr_auto_insert_switch" <?php if ($option['auto_insert_enabled'] == 1) {
|
203 |
-
echo " checked='checked' ";
|
204 |
-
} ?> >
|
205 |
-
<label class="yasr-onoffswitch-label" for="yasr_auto_insert_switch">
|
206 |
-
<span class="yasr-onoffswitch-inner"></span>
|
207 |
-
<span class="yasr-onoffswitch-switch"></span>
|
208 |
-
</label>
|
209 |
-
</div>
|
210 |
-
|
211 |
-
<p> </p>
|
212 |
-
|
213 |
-
<div>
|
214 |
-
<?php
|
215 |
-
$option_title = __('What?', 'yet-another-stars-rating');
|
216 |
-
$array_options = array (
|
217 |
-
'visitor_rating' => __('Visitor Votes', 'yet-another-stars-rating'),
|
218 |
-
'overall_rating' => __('Overall Rating / Author Rating', 'yet-another-stars-rating'),
|
219 |
-
'both' => __('Both', 'yet-another-stars-rating')
|
220 |
-
);
|
221 |
-
$default = $option['auto_insert_what'];
|
222 |
-
$name = 'yasr_general_options[auto_insert_what]';
|
223 |
-
$class = 'yasr-auto-insert-options-class';
|
224 |
-
|
225 |
-
echo YasrPhpFieldsHelper::radio( $option_title, $class, $array_options, $name, $default );
|
226 |
-
?>
|
227 |
-
</div>
|
228 |
-
|
229 |
-
<p> </p>
|
230 |
-
|
231 |
-
<div>
|
232 |
-
<?php
|
233 |
-
$option_title = __('Where?', 'yet-another-stars-rating');
|
234 |
-
$array_options = array (
|
235 |
-
'top' => __('Before the content', 'yet-another-stars-rating'),
|
236 |
-
'bottom' => __('After the content', 'yet-another-stars-rating'),
|
237 |
-
);
|
238 |
-
$default = $option['auto_insert_where'];
|
239 |
-
$name = 'yasr_general_options[auto_insert_where]';
|
240 |
-
$class = 'yasr-auto-insert-options-class';
|
241 |
-
|
242 |
-
echo YasrPhpFieldsHelper::radio( $option_title, $class, $array_options, $name, $default );
|
243 |
-
?>
|
244 |
-
</div>
|
245 |
-
|
246 |
-
<p> </p>
|
247 |
-
|
248 |
-
<div>
|
249 |
-
<?php
|
250 |
-
$option_title = __('Align', 'yet-another-stars-rating');
|
251 |
-
$array_options = array (
|
252 |
-
'left' => __('Left', 'yet-another-stars-rating'),
|
253 |
-
'center' => __('Center', 'yet-another-stars-rating'),
|
254 |
-
'right' => __('Right', 'yet-another-stars-rating')
|
255 |
-
);
|
256 |
-
$default = $option['auto_insert_align'];
|
257 |
-
$name = 'yasr_general_options[auto_insert_align]';
|
258 |
-
$class = 'yasr-auto-insert-options-class';
|
259 |
-
|
260 |
-
echo YasrPhpFieldsHelper::radio( $option_title, $class, $array_options, $name, $default );
|
261 |
-
?>
|
262 |
-
</div>
|
263 |
-
|
264 |
-
<p> </p>
|
265 |
-
|
266 |
-
<div class="yasr-indented-answer">
|
267 |
-
<strong><?php _e('Size', 'yet-another-stars-rating'); ?></strong>
|
268 |
-
<?php
|
269 |
-
$name = 'yasr_general_options[auto_insert_size]';
|
270 |
-
$class = 'yasr-auto-insert-options-class';
|
271 |
-
$id = 'yasr-auto-insert-options-stars-size-';
|
272 |
-
|
273 |
-
YasrSettings::radioSelectSize($name, $class, $option['auto_insert_size'], $id);
|
274 |
-
?>
|
275 |
-
</div>
|
276 |
-
|
277 |
-
<p> </p>
|
278 |
-
<div>
|
279 |
-
<?php
|
280 |
-
$option_title = __('Exclude Pages?', 'yet-another-stars-rating');
|
281 |
-
$array_options = array (
|
282 |
-
'yes' => __('Yes', 'yet-another-stars-rating'),
|
283 |
-
'no' => __('No', 'yet-another-stars-rating'),
|
284 |
-
);
|
285 |
-
$default = $option['auto_insert_exclude_pages'];
|
286 |
-
$name = 'yasr_general_options[auto_insert_exclude_pages]';
|
287 |
-
$class = 'yasr-auto-insert-options-class';
|
288 |
-
|
289 |
-
echo YasrPhpFieldsHelper::radio( $option_title, $class, $array_options, $name, $default );
|
290 |
-
?>
|
291 |
-
<p> </p>
|
292 |
-
</div>
|
293 |
-
|
294 |
-
<?php
|
295 |
-
|
296 |
-
$custom_post_types = YasrCustomPostTypes::getCustomPostTypes();
|
297 |
-
|
298 |
-
if ($custom_post_types) {
|
299 |
-
|
300 |
-
echo '<div>';
|
301 |
-
|
302 |
-
$option_title = __('Use only in custom post types?', 'yet-another-stars-rating');
|
303 |
-
$array_options = array (
|
304 |
-
'yes' => __('Yes', 'yet-another-stars-rating'),
|
305 |
-
'no' => __('No', 'yet-another-stars-rating'),
|
306 |
-
);
|
307 |
-
$default = $option['auto_insert_custom_post_only'];
|
308 |
-
$name = 'yasr_general_options[auto_insert_custom_post_only]';
|
309 |
-
$class = 'yasr-auto-insert-options-class';
|
310 |
-
|
311 |
-
echo YasrPhpFieldsHelper::radio( $option_title, $class, $array_options, $name, $default );
|
312 |
-
|
313 |
-
echo '</div>';
|
314 |
-
?>
|
315 |
-
<p>
|
316 |
-
|
317 |
-
<div class="yasr-indented-answer">
|
318 |
-
<?php _e("You see this because you use custom post types.", 'yet-another-stars-rating'); ?>
|
319 |
-
<br/>
|
320 |
-
<?php _e("If you want to use auto insert only in custom post types, choose Yes", 'yet-another-stars-rating'); ?>
|
321 |
-
</div>
|
322 |
-
<p> </p>
|
323 |
-
|
324 |
-
<?php
|
325 |
-
}
|
326 |
-
|
327 |
-
else {
|
328 |
-
?>
|
329 |
-
<input type="hidden" name="yasr_general_options[auto_insert_custom_post_only]" value="no">
|
330 |
-
<?php
|
331 |
-
}
|
332 |
-
|
333 |
-
submit_button(YASR_SAVE_All_SETTINGS_TEXT);
|
334 |
-
?>
|
335 |
-
|
336 |
-
</div>
|
337 |
-
|
338 |
-
<hr />
|
339 |
-
|
340 |
-
<?php
|
341 |
-
|
342 |
-
} //End yasr_auto_insert_callback
|
343 |
-
|
344 |
-
function yasr_stars_title_callback($option) {
|
345 |
-
?>
|
346 |
-
<div class="yasr-onoffswitch-big">
|
347 |
-
<input type="checkbox" name="yasr_general_options[stars_title]" class="yasr-onoffswitch-checkbox"
|
348 |
-
id="yasr-general-options-stars-title-switch" <?php if ($option['stars_title'] === 'yes') {
|
349 |
-
echo " checked='checked' ";
|
350 |
-
} ?> >
|
351 |
-
<label class="yasr-onoffswitch-label" for="yasr-general-options-stars-title-switch">
|
352 |
-
<span class="yasr-onoffswitch-inner"></span>
|
353 |
-
<span class="yasr-onoffswitch-switch"></span>
|
354 |
-
</label>
|
355 |
-
</div>
|
356 |
-
|
357 |
-
<br/>
|
358 |
-
|
359 |
-
<div>
|
360 |
-
<?php
|
361 |
-
$option_title = __('What?', 'yet-another-stars-rating');
|
362 |
-
$array_options = array (
|
363 |
-
'visitor_rating' => __('Visitor Votes', 'yet-another-stars-rating'),
|
364 |
-
'overall_rating' => __('Overall Rating / Author Rating', 'yet-another-stars-rating'),
|
365 |
-
);
|
366 |
-
$default = $option['stars_title_what'];
|
367 |
-
$name = 'yasr_general_options[stars_title_what]';
|
368 |
-
$class = 'yasr-stars-title-options-class';
|
369 |
-
|
370 |
-
echo YasrPhpFieldsHelper::radio( $option_title, $class, $array_options, $name, $default );
|
371 |
-
?>
|
372 |
-
</div>
|
373 |
-
|
374 |
-
<br />
|
375 |
-
|
376 |
-
<div>
|
377 |
-
<?php
|
378 |
-
$option_title = __('Exclude Pages?', 'yet-another-stars-rating');
|
379 |
-
$array_options = array (
|
380 |
-
'yes' => __('Yes', 'yet-another-stars-rating'),
|
381 |
-
'no' => __('No', 'yet-another-stars-rating'),
|
382 |
-
);
|
383 |
-
$default = $option['stars_title_exclude_pages'];
|
384 |
-
$name = 'yasr_general_options[stars_title_exclude_pages]';
|
385 |
-
$class = 'yasr-stars-title-options-class';
|
386 |
-
|
387 |
-
echo YasrPhpFieldsHelper::radio( $option_title, $class, $array_options, $name, $default );
|
388 |
-
?>
|
389 |
-
</div>
|
390 |
-
|
391 |
-
<p> </p>
|
392 |
-
|
393 |
-
<div>
|
394 |
-
<?php
|
395 |
-
$option_title = __('Where do you want show ratings?', 'yet-another-stars-rating');
|
396 |
-
$array_options = array (
|
397 |
-
'archive' => __('Only on archive pages (categories, tags, etc.)', 'yet-another-stars-rating'),
|
398 |
-
'single' => __('Only on single posts or pages', 'yet-another-stars-rating'),
|
399 |
-
'both' => __('Both', 'yet-another-stars-rating'),
|
400 |
-
);
|
401 |
-
$default = $option['stars_title_where'];
|
402 |
-
$name = 'yasr_general_options[stars_title_where]';
|
403 |
-
$class = 'yasr-stars-title-options-class';
|
404 |
-
|
405 |
-
echo YasrPhpFieldsHelper::radio( $option_title, $class, $array_options, $name, $default );
|
406 |
-
?>
|
407 |
-
</div>
|
408 |
-
|
409 |
-
<p> </p>
|
410 |
-
<hr />
|
411 |
-
|
412 |
-
<?php
|
413 |
-
|
414 |
-
}
|
415 |
-
|
416 |
-
function yasr_custom_text_callback($option) {
|
417 |
-
|
418 |
-
$text_before_overall = $option['text_before_overall'];
|
419 |
-
$text_before_visitor_rating = $option['text_before_visitor_rating'];
|
420 |
-
$text_after_visitor_rating = $option['text_after_visitor_rating'];
|
421 |
-
$custom_text_user_votes = $option['custom_text_user_voted'];
|
422 |
-
$custom_text_must_sign_in = $option['custom_text_must_sign_in'];
|
423 |
-
|
424 |
-
?>
|
425 |
-
|
426 |
-
<div class="yasr-onoffswitch-big">
|
427 |
-
<input type="checkbox" name="yasr_general_options[text_before_stars]" class="yasr-onoffswitch-checkbox"
|
428 |
-
id="yasr-general-options-text-before-stars-switch" <?php if ($option['text_before_stars'] == 1) {
|
429 |
-
echo " checked='checked' ";
|
430 |
-
} ?> >
|
431 |
-
<label class="yasr-onoffswitch-label" for="yasr-general-options-text-before-stars-switch">
|
432 |
-
<span class="yasr-onoffswitch-inner"></span>
|
433 |
-
<span class="yasr-onoffswitch-switch"></span>
|
434 |
-
</label>
|
435 |
-
</div>
|
436 |
-
|
437 |
-
<br/> <br/>
|
438 |
-
|
439 |
-
<label for="yasr-general-options-custom-text-before-overall">
|
440 |
-
<input type='text' name='yasr_general_options[text_before_overall]'
|
441 |
-
id="yasr-general-options-custom-text-before-overall"
|
442 |
-
class='yasr-general-options-text-before' <?php printf('value="%s"', $text_before_overall); ?>
|
443 |
-
maxlength="40"/>
|
444 |
-
<?php _e('Custom text to display before Overall Rating', 'yet-another-stars-rating') ?>
|
445 |
-
</label>
|
446 |
-
|
447 |
-
<br/> <br/> <br/>
|
448 |
-
|
449 |
-
<label for="yasr-general-options-custom-text-before-visitor">
|
450 |
-
<input type='text' name='yasr_general_options[text_before_visitor_rating]'
|
451 |
-
id="yasr-general-options-custom-text-before-visitor"
|
452 |
-
class='yasr-general-options-text-before' <?php printf('value="%s"', $text_before_visitor_rating); ?>
|
453 |
-
maxlength="80"/>
|
454 |
-
<?php _e('Custom text to display BEFORE Visitor Rating', 'yet-another-stars-rating') ?>
|
455 |
-
</label>
|
456 |
-
|
457 |
-
<br/> <br/>
|
458 |
-
|
459 |
-
<label for="yasr-general-options-custom-text-after-visitor">
|
460 |
-
<input type='text' name='yasr_general_options[text_after_visitor_rating]'
|
461 |
-
id="yasr-general-options-custom-text-after-visitor"
|
462 |
-
class='yasr-general-options-text-before' <?php printf('value="%s"', $text_after_visitor_rating); ?>
|
463 |
-
maxlength="80"/>
|
464 |
-
<?php _e('Custom text to display AFTER Visitor Rating', 'yet-another-stars-rating') ?>
|
465 |
-
</label>
|
466 |
-
|
467 |
-
<br/> <br/> <br/>
|
468 |
-
|
469 |
-
<label for="yasr-general-options-custom-text-must-sign-in">
|
470 |
-
<input type='text' name='yasr_general_options[custom_text_must_sign_in]'
|
471 |
-
id="yasr-general-options-custom-text-must-sign-in"
|
472 |
-
class='yasr-general-options-text-before' <?php printf('value="%s"', $custom_text_must_sign_in); ?>
|
473 |
-
maxlength="60"/>
|
474 |
-
<?php _e('Custom text to display when login is required to vote', 'yet-another-stars-rating') ?>
|
475 |
-
</label>
|
476 |
-
<br/> <br/>
|
477 |
-
|
478 |
-
<label for="yasr-general-options-custom-text-already-rated">
|
479 |
-
<input type='text' name='yasr_general_options[custom_text_user_voted]'
|
480 |
-
id="yasr-general-options-custom-text-already-rated"
|
481 |
-
class='yasr-general-options-text-before' <?php printf('value="%s"', $custom_text_user_votes); ?>
|
482 |
-
maxlength="60"/>
|
483 |
-
<?php _e('Custom text to display when an user has already rated', 'yet-another-stars-rating') ?>
|
484 |
-
</label>
|
485 |
-
|
486 |
-
<br/> <br/>
|
487 |
-
|
488 |
-
<a href="#" id="yasr-doc-custom-text-link"><?php _e('Help', 'yet-another-stars-rating'); ?></a>
|
489 |
-
|
490 |
-
<div id="yasr-doc-custom-text-div" class="yasr-help-box-settings">
|
491 |
-
<?php
|
492 |
-
$string_custom_overall = sprintf(__('In the first field you can use %s pattern to show the overall rating (as text).',
|
493 |
-
'yet-another-stars-rating'), '<strong>%overall_rating%</strong>');
|
494 |
-
|
495 |
-
$string_custom_visitor = sprintf(__('In the second and third fields you can use %s pattern to show the
|
496 |
-
total count, and %s pattern to show the average', 'yet-another-stars-rating'),
|
497 |
-
'<strong>%total_count%</strong>', '<strong>%average%</strong>');
|
498 |
-
|
499 |
-
echo $string_custom_overall;
|
500 |
-
echo '<br /><br/>';
|
501 |
-
echo $string_custom_visitor;
|
502 |
-
echo '<br /><br/>';
|
503 |
-
|
504 |
-
_e('You can use these html tags:', 'yet-another-stars-rating');
|
505 |
-
echo ' <strong>' . esc_html('<strong>, <p>') . '.</strong>';
|
506 |
-
?>
|
507 |
-
</div>
|
508 |
-
|
509 |
-
<p> </p>
|
510 |
-
|
511 |
-
<?php
|
512 |
-
submit_button(YASR_SAVE_All_SETTINGS_TEXT);
|
513 |
-
echo '<hr />';
|
514 |
-
|
515 |
-
}
|
516 |
-
|
517 |
-
function yasr_visitors_stats_callback($option) {
|
518 |
-
?>
|
519 |
-
<div class="yasr-onoffswitch-big">
|
520 |
-
<input type="checkbox" name="yasr_general_options[visitors_stats]" class="yasr-onoffswitch-checkbox"
|
521 |
-
id="yasr-general-options-visitors-stats-switch" <?php if ($option['visitors_stats'] === 'yes') {
|
522 |
-
echo " checked='checked' ";
|
523 |
-
} ?> >
|
524 |
-
<label class="yasr-onoffswitch-label" for="yasr-general-options-visitors-stats-switch">
|
525 |
-
<span class="yasr-onoffswitch-inner"></span>
|
526 |
-
<span class="yasr-onoffswitch-switch"></span>
|
527 |
-
</label>
|
528 |
-
</div>
|
529 |
-
|
530 |
-
<br/>
|
531 |
-
|
532 |
-
<?php
|
533 |
-
_e('Enable or disable the chart bar icon (and tooltip hover it) near the yasr_visitor_votes shortcode.');
|
534 |
-
?>
|
535 |
-
|
536 |
-
<p> </p>
|
537 |
-
|
538 |
-
<a href="#" id="yasr-stats-explained-link"><?php _e("Example", 'yet-another-stars-rating') ?></a>
|
539 |
-
|
540 |
-
<div id="yasr-stats-explained" class="yasr-help-box-settings">
|
541 |
-
<?php
|
542 |
-
echo '<strong>';
|
543 |
-
_e('ENABLED:', 'yet-another-stars-rating');
|
544 |
-
echo "</strong>
|
545 |
-
<hr />
|
546 |
-
<img src=" . YASR_IMG_DIR . "yasr_settings_stats_enabled.png>";
|
547 |
-
|
548 |
-
echo '<br /><br /><strong>';
|
549 |
-
_e('DISABLED:', 'yet-another-stars-rating');
|
550 |
-
echo "</strong>
|
551 |
-
<hr />
|
552 |
-
<img src=" . YASR_IMG_DIR . "yasr_settings_stats_disabled.png>";
|
553 |
-
?>
|
554 |
-
</div>
|
555 |
-
|
556 |
-
<p> </p>
|
557 |
-
|
558 |
-
<hr>
|
559 |
-
|
560 |
-
<?php
|
561 |
-
|
562 |
-
}
|
563 |
-
|
564 |
-
function yasr_allow_only_logged_in_callback($option) {
|
565 |
-
|
566 |
-
$array_options = array(
|
567 |
-
'logged_only' => __('Allow only logged-in users', 'yet-another-stars-rating' ),
|
568 |
-
'allow_anonymous' => __('Allow everybody (logged in and anonymous)', 'yet-another-stars-rating' ),
|
569 |
-
);
|
570 |
-
$default = $option['allowed_user'];
|
571 |
-
$name = 'yasr_general_options[allowed_user]';
|
572 |
-
$class = 'yasr_auto_insert_loggedonly';
|
573 |
-
|
574 |
-
echo YasrPhpFieldsHelper::radio( false, $class, $array_options, $name, $default );
|
575 |
-
?>
|
576 |
-
|
577 |
-
<br />
|
578 |
-
<div class="yasr-indented-answer">
|
579 |
-
<?php
|
580 |
-
_e(
|
581 |
-
'Select who can rate your posts for yasr_visitor_votes and yasr_visitor_multiset shortcodes.',
|
582 |
-
'yet-another-stars-rating')
|
583 |
-
?>
|
584 |
-
</div>
|
585 |
-
|
586 |
-
<?php
|
587 |
-
submit_button(YASR_SAVE_All_SETTINGS_TEXT);
|
588 |
-
?>
|
589 |
-
|
590 |
-
<hr>
|
591 |
-
|
592 |
-
<?php
|
593 |
-
|
594 |
-
} //End function
|
595 |
-
|
596 |
-
function yasr_show_overall_in_loop_callback($option) {
|
597 |
-
|
598 |
-
?>
|
599 |
-
|
600 |
-
<div class="yasr-onoffswitch-big">
|
601 |
-
<input type="checkbox" name="yasr_general_options[show_overall_in_loop]" class="yasr-onoffswitch-checkbox"
|
602 |
-
id="yasr-show-overall-in-loop-switch" <?php if ($option['show_overall_in_loop'] === 'enabled') {
|
603 |
-
echo " checked='checked' ";
|
604 |
-
} ?> >
|
605 |
-
<label class="yasr-onoffswitch-label" for="yasr-show-overall-in-loop-switch">
|
606 |
-
<span class="yasr-onoffswitch-inner"></span>
|
607 |
-
<span class="yasr-onoffswitch-switch"></span>
|
608 |
-
</label>
|
609 |
-
</div>
|
610 |
-
|
611 |
-
<br/>
|
612 |
-
|
613 |
-
<?php _e('"Overall Rating" will be also shown in archive page (categories, tags, etc.)',
|
614 |
-
'yet-another-stars-rating') ?>
|
615 |
-
|
616 |
-
<p> </p>
|
617 |
-
|
618 |
-
<?php
|
619 |
-
|
620 |
-
}
|
621 |
-
|
622 |
-
function yasr_show_visitor_votes_in_loop_callback($option) {
|
623 |
-
|
624 |
-
?>
|
625 |
-
|
626 |
-
<div class="yasr-onoffswitch-big">
|
627 |
-
<input type="checkbox" name="yasr_general_options[show_visitor_votes_in_loop]" class="yasr-onoffswitch-checkbox"
|
628 |
-
id="yasr-show-visitor-votes-in-loop-switch" <?php if ($option['show_visitor_votes_in_loop'] === 'enabled') {
|
629 |
-
echo " checked='checked' ";
|
630 |
-
} ?> >
|
631 |
-
<label class="yasr-onoffswitch-label" for="yasr-show-visitor-votes-in-loop-switch">
|
632 |
-
<span class="yasr-onoffswitch-inner"></span>
|
633 |
-
<span class="yasr-onoffswitch-switch"></span>
|
634 |
-
</label>
|
635 |
-
</div>
|
636 |
-
|
637 |
-
<br/>
|
638 |
-
|
639 |
-
<?php _e('If you enable this, "Visitor Votes" will be showed not only in the single article or page, but also
|
640 |
-
in pages like Home Page, category pages or archives.',
|
641 |
-
'yet-another-stars-rating') ?>
|
642 |
-
|
643 |
-
<br/>
|
644 |
-
|
645 |
-
<hr>
|
646 |
-
|
647 |
-
<?php
|
648 |
-
|
649 |
-
}
|
650 |
-
|
651 |
-
function yasr_enable_ip_callback($option) {
|
652 |
-
|
653 |
-
?>
|
654 |
-
|
655 |
-
|
656 |
-
<div class="yasr-onoffswitch-big">
|
657 |
-
<input type="checkbox" name="yasr_general_options[enable_ip]" class="yasr-onoffswitch-checkbox"
|
658 |
-
id="yasr-general-options-enable-ip-switch" <?php if ($option['enable_ip'] === 'yes') {
|
659 |
-
echo " checked='checked' ";
|
660 |
-
} ?> >
|
661 |
-
<label class="yasr-onoffswitch-label" for="yasr-general-options-enable-ip-switch">
|
662 |
-
<span class="yasr-onoffswitch-inner"></span>
|
663 |
-
<span class="yasr-onoffswitch-switch"></span>
|
664 |
-
</label>
|
665 |
-
</div>
|
666 |
-
|
667 |
-
<br/>
|
668 |
-
|
669 |
-
<?php
|
670 |
-
$string = sprintf(
|
671 |
-
__('Please note that to comply with the %s EU law, you %s MUST %s warn your users that you\'re storing their ip. %s
|
672 |
-
If in doubt, leave no.',
|
673 |
-
'yet-another-stars-rating'
|
674 |
-
),
|
675 |
-
'<a href="https://en.wikipedia.org/wiki/General_Data_Protection_Regulation">GDPR</a>',
|
676 |
-
'<strong>', '</strong>', '<br />'
|
677 |
-
);
|
678 |
-
echo $string;
|
679 |
-
?>
|
680 |
-
|
681 |
-
<br/><p> </p>
|
682 |
-
|
683 |
-
<?php
|
684 |
-
submit_button(YASR_SAVE_All_SETTINGS_TEXT);
|
685 |
-
?>
|
686 |
-
|
687 |
-
<hr>
|
688 |
-
|
689 |
-
<?php
|
690 |
-
|
691 |
-
} //End function
|
692 |
-
|
693 |
-
function yasr_choose_snippet_callback($option) {
|
694 |
-
|
695 |
-
$publisher_name = $option['publisher_name'];
|
696 |
-
$publisher_logo = $option['publisher_logo'];
|
697 |
-
|
698 |
-
?>
|
699 |
-
|
700 |
-
<strong>
|
701 |
-
<?php _e('Select default itemType for all post or pages', 'yet-another-stars-rating'); ?>
|
702 |
-
</strong>
|
703 |
-
|
704 |
-
<div class="yasr-indented-answer" id="yasr-choose-snippet-type">
|
705 |
-
<?php
|
706 |
-
$review_types = json_decode(YASR_SUPPORTED_SCHEMA_TYPES);
|
707 |
-
sort($review_types);
|
708 |
-
?>
|
709 |
-
<label for="yasr-choose-reviews-types-list">
|
710 |
-
<select name="yasr_general_options[snippet_itemtype]" id="yasr-choose-reviews-types-list">
|
711 |
-
<?php
|
712 |
-
foreach ($review_types as $type) {
|
713 |
-
$type = trim($type);
|
714 |
-
$type_option = $type;
|
715 |
-
//to keep compatibility with version <2.2.3
|
716 |
-
if($type === 'Place') {
|
717 |
-
$type_option='LocalBusiness';
|
718 |
-
}
|
719 |
-
//to keep compatibility with version <2.2.3
|
720 |
-
if($type === 'Other') {
|
721 |
-
$type_option='BlogPosting';
|
722 |
-
}
|
723 |
-
|
724 |
-
if ($option['snippet_itemtype'] === $type) {
|
725 |
-
echo "<option value=\"$type\" selected>$type_option</option>";
|
726 |
-
} else {
|
727 |
-
echo "<option value=\"$type\">$type_option</option>";
|
728 |
-
}
|
729 |
-
}
|
730 |
-
?>
|
731 |
-
</select>
|
732 |
-
</label>
|
733 |
-
|
734 |
-
<br/> <br/>
|
735 |
-
|
736 |
-
<?php
|
737 |
-
$option_title = __(' Choose whether the site represents an organization or a person.', 'yet-another-stars-rating');
|
738 |
-
$array_options = array (
|
739 |
-
'Organization' => 'Organization',
|
740 |
-
'Person' => 'Person'
|
741 |
-
);
|
742 |
-
$default = $option['publisher'];
|
743 |
-
$name = 'yasr_general_options[publisher]';
|
744 |
-
$id = 'yasr-general-options-publisher';
|
745 |
-
|
746 |
-
echo YasrPhpFieldsHelper::radio( $option_title, '', $array_options, $name, $default, $id );
|
747 |
-
?>
|
748 |
-
|
749 |
-
<br/>
|
750 |
-
|
751 |
-
<label for="yasr-general-options-publisher-name">
|
752 |
-
<input type='text' name='yasr_general_options[publisher_name]'
|
753 |
-
id="yasr-general-options-publisher-name"
|
754 |
-
class="yasr-additional-info-inputs" <?php printf('value="%s"', $publisher_name); ?>
|
755 |
-
maxlength="180"/>
|
756 |
-
<?php _e('Publisher name (e.g. Google)', 'yet-another-stars-rating') ?>
|
757 |
-
</label>
|
758 |
-
|
759 |
-
<br/> <br/>
|
760 |
-
|
761 |
-
<label for="yasr-general-options-publisher-logo"></label>
|
762 |
-
<input type='text' name='yasr_general_options[publisher_logo]'
|
763 |
-
id="yasr-general-options-publisher-logo"
|
764 |
-
class="yasr-blogPosting-additional-info-inputs"
|
765 |
-
<?php printf('value="%s"', $publisher_logo); ?>
|
766 |
-
maxlength="300"/>
|
767 |
-
<?php _e('Image Url (if empty siteicon will be used instead)', 'yet-another-stars-rating') ?>
|
768 |
-
|
769 |
-
<div class="yasr-help-box-settings" id="yasr-blogPosting-additional-info" style="display:block">
|
770 |
-
<?php _e('You can always change itemType in the single post or page.', 'yet-another-stars-rating');
|
771 |
-
|
772 |
-
echo "<br />";
|
773 |
-
|
774 |
-
echo(sprintf(
|
775 |
-
__('Please keep in mind that since September, 16, 2019 blogPosting itemType will
|
776 |
-
no show stars in SERP anymore. %sHere%s the announcement by Google.',
|
777 |
-
'yet-another-stars-rating'),
|
778 |
-
'<a href="https://webmasters.googleblog.com/2019/09/making-review-rich-results-more-helpful.html">',
|
779 |
-
'</a>')
|
780 |
-
);
|
781 |
-
|
782 |
-
echo "<br />";
|
783 |
-
echo (sprintf(
|
784 |
-
__('Also, %sread Google guidelines%s', 'yet-another-stars-rating'),
|
785 |
-
'<a href="https://developers.google.com/search/docs/data-types/review-snippet#guidelines">',
|
786 |
-
'</a>')
|
787 |
-
);
|
788 |
-
|
789 |
-
?>
|
790 |
-
|
791 |
-
</div>
|
792 |
-
|
793 |
-
<p> </p>
|
794 |
-
|
795 |
-
</div>
|
796 |
-
|
797 |
-
<hr />
|
798 |
-
|
799 |
-
<p> </p>
|
800 |
-
|
801 |
-
<?php
|
802 |
-
|
803 |
-
} //End function yasr_choose_snippet_callback
|
804 |
-
|
805 |
-
function yasr_load_with_ajax_callback($option) {
|
806 |
-
?>
|
807 |
-
|
808 |
-
<div class="yasr-onoffswitch-big">
|
809 |
-
<input type="checkbox" name="yasr_general_options[enable_ajax]" class="yasr-onoffswitch-checkbox"
|
810 |
-
id="yasr-general-options-enable-ajax-switch" <?php if ($option['enable_ajax'] === 'yes') {
|
811 |
-
echo " checked='checked' ";
|
812 |
-
} ?> >
|
813 |
-
<label class="yasr-onoffswitch-label" for="yasr-general-options-enable-ajax-switch">
|
814 |
-
<span class="yasr-onoffswitch-inner"></span>
|
815 |
-
<span class="yasr-onoffswitch-switch"></span>
|
816 |
-
</label>
|
817 |
-
</div>
|
818 |
-
|
819 |
-
<br/>
|
820 |
-
|
821 |
-
<?php
|
822 |
-
_e('This should be enabled if you\'re using caching plugins.
|
823 |
-
Not required for yasr_overall_rating and yasr_multiset.',
|
824 |
-
'yet-another-stars-rating'
|
825 |
-
);
|
826 |
-
?>
|
827 |
-
|
828 |
-
<p> </p>
|
829 |
-
|
830 |
-
<?php
|
831 |
-
|
832 |
-
} //End function
|
833 |
-
|
834 |
-
function yasr_general_options_sanitize($option) {
|
835 |
-
|
836 |
-
//Array to return
|
837 |
-
$output = array();
|
838 |
-
|
839 |
-
$tidy_installed = false;
|
840 |
-
|
841 |
-
if (extension_loaded('tidy')) {
|
842 |
-
$tidy_release_date = strtotime(tidy_get_release());
|
843 |
-
$tidy_working_release_date = strtotime('2017/11/25');
|
844 |
-
|
845 |
-
if ($tidy_release_date >= $tidy_working_release_date) {
|
846 |
-
$tidy_installed = true;
|
847 |
-
}
|
848 |
-
}
|
849 |
-
|
850 |
-
// Loop through each of the incoming options
|
851 |
-
foreach ($option as $key => $value) {
|
852 |
-
// Check to see if the current option has a value. If so, process it.
|
853 |
-
if (isset($option[$key])) {
|
854 |
-
|
855 |
-
//Tags are not allowed for any fields
|
856 |
-
$allowed_tags = '';
|
857 |
-
|
858 |
-
//except these ones
|
859 |
-
if ($key === 'text_before_overall' || $key === 'text_before_visitor_rating' ||
|
860 |
-
$key === 'text_after_visitor_rating' || $key === 'custom_text_must_sign_in' ||
|
861 |
-
$key === 'custom_text_user_voted') {
|
862 |
-
|
863 |
-
$allowed_tags = '<strong><p>';
|
864 |
-
|
865 |
-
// handle quoted strings and allow some tags
|
866 |
-
$output[$key] = strip_tags(stripslashes($option[$key]), $allowed_tags);
|
867 |
-
|
868 |
-
//if tidy extension is enabled, fix errors in html
|
869 |
-
if ($tidy_installed === true) {
|
870 |
-
$tidy = new Tidy();
|
871 |
-
$output[$key] = $tidy->repairString($output[$key], array('show-body-only' => true));
|
872 |
-
}
|
873 |
-
|
874 |
-
}
|
875 |
-
else {
|
876 |
-
// handle quoted strings and allow no tags
|
877 |
-
$output[$key] = strip_tags(stripslashes($option[$key]), $allowed_tags);
|
878 |
-
}
|
879 |
-
|
880 |
-
//Always use esc_html
|
881 |
-
$output[$key] = esc_html($output[$key]);
|
882 |
-
|
883 |
-
if ($key === 'publisher_logo') {
|
884 |
-
//if is not a valid url get_site_icon_url instead
|
885 |
-
if (filter_var($value, FILTER_VALIDATE_URL) === false) {
|
886 |
-
$output[$key] = get_site_icon_url();
|
887 |
-
}
|
888 |
-
}
|
889 |
-
|
890 |
-
} // end if
|
891 |
-
|
892 |
-
} // end foreach
|
893 |
-
|
894 |
-
|
895 |
-
/** The following steps are needed to avoid undefined index if a setting is saved to "no" **/
|
896 |
-
|
897 |
-
//if in array doesn't exists [auto_insert_enabled] key, create it and set to 0
|
898 |
-
if (!array_key_exists('auto_insert_enabled', $output)) {
|
899 |
-
$output['auto_insert_enabled'] = 0;
|
900 |
-
}
|
901 |
-
//if exists value must be 1
|
902 |
-
else {
|
903 |
-
$output['auto_insert_enabled'] = 1;
|
904 |
-
}
|
905 |
-
|
906 |
-
//if in array doesn't exists [stars title] key, create it and set to 'no'
|
907 |
-
if (!array_key_exists('stars_title', $output)) {
|
908 |
-
$output['stars_title'] = 'no';
|
909 |
-
}
|
910 |
-
//if exists value must be 1
|
911 |
-
else {
|
912 |
-
$output['stars_title'] = 'yes';
|
913 |
-
}
|
914 |
-
|
915 |
-
//Same as above but for [show_overall_in_loop] key
|
916 |
-
if (!array_key_exists('show_overall_in_loop', $output)) {
|
917 |
-
$output['show_overall_in_loop'] = 'disabled';
|
918 |
-
}
|
919 |
-
//if exists must be string 'enabled'
|
920 |
-
else {
|
921 |
-
$output['show_overall_in_loop'] = 'enabled';
|
922 |
-
}
|
923 |
-
|
924 |
-
//Same as above but for [show_visitor_votes_in_loop] key
|
925 |
-
if (!array_key_exists('show_visitor_votes_in_loop', $output)) {
|
926 |
-
$output['show_visitor_votes_in_loop'] = 'disabled';
|
927 |
-
}
|
928 |
-
//if exists must be string 'enabled'
|
929 |
-
else {
|
930 |
-
$output['show_visitor_votes_in_loop'] = 'enabled';
|
931 |
-
}
|
932 |
-
|
933 |
-
//Same as above but for text_before_stars key
|
934 |
-
if (!array_key_exists('text_before_stars', $output)) {
|
935 |
-
$output['text_before_stars'] = 0;
|
936 |
-
}
|
937 |
-
//if exists must be 1
|
938 |
-
else {
|
939 |
-
$output['text_before_stars'] = 1;
|
940 |
-
}
|
941 |
-
|
942 |
-
//Same as above but for visitors_stats key
|
943 |
-
if (!array_key_exists('visitors_stats', $output)) {
|
944 |
-
$output['visitors_stats'] = 'no';
|
945 |
-
}
|
946 |
-
//if exists must be string 'yes'
|
947 |
-
else {
|
948 |
-
$output['visitors_stats'] = 'yes';
|
949 |
-
}
|
950 |
-
|
951 |
-
//Same as above but for enable_ip key
|
952 |
-
if (!array_key_exists('enable_ip', $output)) {
|
953 |
-
$output['enable_ip'] = 'no';
|
954 |
-
}
|
955 |
-
//if exists must be string 'yes'
|
956 |
-
else {
|
957 |
-
$output['enable_ip'] = 'yes';
|
958 |
-
}
|
959 |
-
|
960 |
-
//Same as above but for enable_ip key
|
961 |
-
if (!array_key_exists('enable_ajax', $output)) {
|
962 |
-
$output['enable_ajax'] = 'no';
|
963 |
-
}
|
964 |
-
//if exists must be string 'yes'
|
965 |
-
else {
|
966 |
-
$output['enable_ajax'] = 'yes';
|
967 |
-
}
|
968 |
-
|
969 |
-
return $output;
|
970 |
-
|
971 |
-
}
|
972 |
-
|
973 |
-
|
974 |
-
/************ End Yasr General Settings ************/
|
975 |
-
|
976 |
-
|
977 |
-
//include multiset functions
|
978 |
-
require(YASR_ABSOLUTE_PATH_ADMIN . '/settings/multiset/yasr-settings-functions-multiset.php');
|
979 |
-
|
980 |
-
//include style functions
|
981 |
-
require(YASR_ABSOLUTE_PATH_ADMIN . '/settings/aspect_style/yasr-settings-functions-style.php');
|
982 |
-
|
983 |
-
//load functions migration
|
984 |
-
require(YASR_ABSOLUTE_PATH_ADMIN . '/settings/migrations/yasr-settings-migration-functions.php');
|
985 |
-
|
986 |
-
|
987 |
-
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/settings/yasr-settings-page.php
CHANGED
@@ -39,11 +39,12 @@ if (!current_user_can('manage_options')) {
|
|
39 |
|
40 |
//Do the settings tab
|
41 |
yasr_settings_tabs($active_tab);
|
|
|
|
|
|
|
42 |
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
<div class="yasr-settingsdiv">
|
47 |
<form action="options.php" method="post" id="yasr_settings_form">
|
48 |
<?php
|
49 |
settings_fields('yasr_general_options_group');
|
@@ -51,28 +52,16 @@ if (!current_user_can('manage_options')) {
|
|
51 |
submit_button(YASR_SAVE_All_SETTINGS_TEXT);
|
52 |
?>
|
53 |
</form>
|
54 |
-
|
55 |
-
|
56 |
-
<?php
|
57 |
-
yasr_right_settings_panel();
|
58 |
-
?>
|
59 |
-
|
60 |
-
<div class="yasr-space-settings-div">
|
61 |
-
</div>
|
62 |
-
|
63 |
-
<?php
|
64 |
|
65 |
-
|
66 |
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
} //End if ($active_tab=='manage_multi')
|
71 |
|
72 |
-
|
73 |
-
|
74 |
-
<?php do_action('yasr_add_content_top_style_options_tab', $active_tab); ?>
|
75 |
-
<div class="yasr-settingsdiv">
|
76 |
<form action="options.php" method="post" enctype='multipart/form-data' id="yasr_settings_form">
|
77 |
<?php
|
78 |
settings_fields('yasr_style_options_group');
|
@@ -80,43 +69,41 @@ if (!current_user_can('manage_options')) {
|
|
80 |
submit_button(YASR_SAVE_All_SETTINGS_TEXT);
|
81 |
?>
|
82 |
</form>
|
83 |
-
|
84 |
-
|
85 |
-
<?php
|
86 |
-
yasr_right_settings_panel();
|
87 |
-
?>
|
88 |
-
|
89 |
-
<div class="yasr-space-settings-div">
|
90 |
-
</div>
|
91 |
|
92 |
-
|
93 |
|
94 |
-
|
|
|
|
|
95 |
|
96 |
-
|
97 |
-
|
98 |
-
<div class="yasr-settingsdiv">
|
99 |
<?php
|
100 |
//include migration functions
|
101 |
include(YASR_ABSOLUTE_PATH_ADMIN . '/settings/migrations/yasr-settings-migration-page.php');
|
102 |
?>
|
103 |
<div class="yasr-space-settings-div">
|
104 |
</div>
|
105 |
-
|
|
|
106 |
|
107 |
-
|
108 |
-
|
109 |
-
?>
|
110 |
|
111 |
-
|
112 |
-
</div>
|
113 |
|
114 |
-
|
115 |
|
116 |
-
|
|
|
|
|
|
|
117 |
|
118 |
-
|
|
|
119 |
|
|
|
120 |
yasr_right_settings_panel('bottom');
|
121 |
?>
|
122 |
<!--End div wrap-->
|
39 |
|
40 |
//Do the settings tab
|
41 |
yasr_settings_tabs($active_tab);
|
42 |
+
?>
|
43 |
+
<div class="yasr-settingsdiv">
|
44 |
+
<?php
|
45 |
|
46 |
+
if ($active_tab === 'general_settings') {
|
47 |
+
?>
|
|
|
|
|
48 |
<form action="options.php" method="post" id="yasr_settings_form">
|
49 |
<?php
|
50 |
settings_fields('yasr_general_options_group');
|
52 |
submit_button(YASR_SAVE_All_SETTINGS_TEXT);
|
53 |
?>
|
54 |
</form>
|
55 |
+
<?php
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
56 |
|
57 |
+
} //End if tab 'general_settings'
|
58 |
|
59 |
+
if ($active_tab === 'manage_multi') {
|
60 |
+
include(YASR_ABSOLUTE_PATH_ADMIN . '/settings/multiset/yasr-settings-functions-multiset-page.php');
|
61 |
+
} //End if ($active_tab=='manage_multi')
|
|
|
62 |
|
63 |
+
if ($active_tab === 'style_options') {
|
64 |
+
?>
|
|
|
|
|
65 |
<form action="options.php" method="post" enctype='multipart/form-data' id="yasr_settings_form">
|
66 |
<?php
|
67 |
settings_fields('yasr_style_options_group');
|
69 |
submit_button(YASR_SAVE_All_SETTINGS_TEXT);
|
70 |
?>
|
71 |
</form>
|
72 |
+
<?php
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
73 |
|
74 |
+
} //End tab style
|
75 |
|
76 |
+
if ($active_tab === 'rankings') {
|
77 |
+
include(YASR_ABSOLUTE_PATH_ADMIN . '/settings/rankings/yasr-ranking-builder.php');
|
78 |
+
} //End tab ur options
|
79 |
|
80 |
+
if ($active_tab === 'migration_tools') {
|
81 |
+
?>
|
|
|
82 |
<?php
|
83 |
//include migration functions
|
84 |
include(YASR_ABSOLUTE_PATH_ADMIN . '/settings/migrations/yasr-settings-migration-page.php');
|
85 |
?>
|
86 |
<div class="yasr-space-settings-div">
|
87 |
</div>
|
88 |
+
<?php
|
89 |
+
} //End tab migration
|
90 |
|
91 |
+
//Adds new tab content here
|
92 |
+
do_action('yasr_settings_tab_content', $active_tab);
|
|
|
93 |
|
94 |
+
?>
|
|
|
95 |
|
96 |
+
</div> <!--End yasr-settingsdiv-->
|
97 |
|
98 |
+
<?php
|
99 |
+
//Print panel to the right
|
100 |
+
yasr_right_settings_panel();
|
101 |
+
?>
|
102 |
|
103 |
+
<div class="">
|
104 |
+
</div>
|
105 |
|
106 |
+
<?php
|
107 |
yasr_right_settings_panel('bottom');
|
108 |
?>
|
109 |
<!--End div wrap-->
|
admin/settings/yasr-stats-functions.php
DELETED
@@ -1,359 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/*
|
4 |
-
|
5 |
-
Copyright 2014 Dario Curvino (email : d.curvino@tiscali.it)
|
6 |
-
|
7 |
-
This program is free software: you can redistribute it and/or modify
|
8 |
-
it under the terms of the GNU General Public License as published by
|
9 |
-
the Free Software Foundation, either version 2 of the License, or
|
10 |
-
(at your option) any later version.
|
11 |
-
|
12 |
-
This program is distributed in the hope that it will be useful,
|
13 |
-
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
14 |
-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
15 |
-
GNU General Public License for more details.
|
16 |
-
|
17 |
-
You should have received a copy of the GNU General Public License
|
18 |
-
along with this program. If not, see <http://www.gnu.org/licenses/>
|
19 |
-
*/
|
20 |
-
|
21 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
22 |
-
exit( 'You\'re not allowed to see this page' );
|
23 |
-
} // Exit if accessed directly
|
24 |
-
|
25 |
-
function yasr_stats_tabs( $active_tab ) {
|
26 |
-
|
27 |
-
?>
|
28 |
-
|
29 |
-
<h2 class="nav-tab-wrapper yasr-no-underline">
|
30 |
-
|
31 |
-
<a href="?page=yasr_stats_page&tab=logs" class="nav-tab
|
32 |
-
<?php if ($active_tab === 'logs') {
|
33 |
-
echo 'nav-tab-active';
|
34 |
-
} ?>"
|
35 |
-
>
|
36 |
-
<?php _e("Visitor Votes", 'yet-another-stars-rating'); ?>
|
37 |
-
</a>
|
38 |
-
<a href="?page=yasr_stats_page&tab=logs_multi" class="nav-tab
|
39 |
-
<?php if ($active_tab === 'logs_multi') {
|
40 |
-
echo 'nav-tab-active';
|
41 |
-
} ?>"
|
42 |
-
>
|
43 |
-
<?php _e("MultiSet", 'yet-another-stars-rating'); ?>
|
44 |
-
</a>
|
45 |
-
<?php do_action('yasr_add_stats_tab', $active_tab); ?>
|
46 |
-
<a href="?page=yasr_settings_page-pricing" class="nav-tab">
|
47 |
-
<?php _e("Upgrade", 'yet-another-stars-rating'); ?>
|
48 |
-
</a>
|
49 |
-
|
50 |
-
</h2>
|
51 |
-
|
52 |
-
<?php
|
53 |
-
|
54 |
-
}
|
55 |
-
|
56 |
-
/**
|
57 |
-
* Create a new table class that will extend the WP_List_Table
|
58 |
-
*/
|
59 |
-
class YASR_Stats_Log_List_Table extends YASR_WP_List_Table {
|
60 |
-
|
61 |
-
private $active_tab;
|
62 |
-
|
63 |
-
function __construct($active_tab) {
|
64 |
-
parent::__construct();
|
65 |
-
$this->active_tab = $active_tab;
|
66 |
-
}
|
67 |
-
/**
|
68 |
-
* Prepare the items for the table to process
|
69 |
-
*
|
70 |
-
* @return Void
|
71 |
-
*/
|
72 |
-
public function prepare_items() {
|
73 |
-
$columns = $this->get_columns();
|
74 |
-
$hidden = $this->get_hidden_columns();
|
75 |
-
$sortable = $this->get_sortable_columns();
|
76 |
-
|
77 |
-
//print bulk_Actions
|
78 |
-
$this->get_bulk_actions();
|
79 |
-
$this->process_bulk_action();
|
80 |
-
|
81 |
-
$table = YASR_LOG_TABLE;
|
82 |
-
|
83 |
-
if($this->active_tab === 'logs_multi') {
|
84 |
-
$table = YASR_LOG_MULTI_SET;
|
85 |
-
}
|
86 |
-
|
87 |
-
global $wpdb;
|
88 |
-
|
89 |
-
$query = "SELECT * FROM $table ORDER BY date";
|
90 |
-
|
91 |
-
if ($table === YASR_LOG_MULTI_SET) {
|
92 |
-
$query .= ', set_type, post_id DESC';
|
93 |
-
}
|
94 |
-
|
95 |
-
$data = $wpdb->get_results($query, ARRAY_A);
|
96 |
-
|
97 |
-
usort($data, array( $this, 'sort_data' ));
|
98 |
-
|
99 |
-
$perPage = 25;
|
100 |
-
$currentPage = $this->get_pagenum();
|
101 |
-
$totalItems = count($data);
|
102 |
-
|
103 |
-
$this->set_pagination_args(
|
104 |
-
array(
|
105 |
-
'total_items' => $totalItems,
|
106 |
-
'per_page' => $perPage
|
107 |
-
)
|
108 |
-
);
|
109 |
-
|
110 |
-
$data = array_slice($data, (( $currentPage - 1 ) * $perPage ), $perPage);
|
111 |
-
|
112 |
-
$this->_column_headers = array( $columns, $hidden, $sortable );
|
113 |
-
$this->items = $data;
|
114 |
-
|
115 |
-
}
|
116 |
-
|
117 |
-
/**
|
118 |
-
* Override the parent columns method. Defines the columns to use in your listing table
|
119 |
-
*
|
120 |
-
* @return Array
|
121 |
-
*/
|
122 |
-
public function get_columns() {
|
123 |
-
|
124 |
-
$columns = array(
|
125 |
-
'cb' => '<input type="checkbox" />',
|
126 |
-
'id' => 'ID',
|
127 |
-
'post_id' => 'Title',
|
128 |
-
'vote' => 'Vote',
|
129 |
-
'user_id' => 'User ID',
|
130 |
-
'date' => 'Date'
|
131 |
-
);
|
132 |
-
|
133 |
-
if($this->active_tab === 'logs_multi') {
|
134 |
-
//insert multiset and field name
|
135 |
-
$columns = array_slice($columns, 0, 3, true) +
|
136 |
-
array('set_type' => 'MultiSet', 'field_id' => 'Field Name') +
|
137 |
-
array_slice($columns, 3, count($columns) - 1, true) ;
|
138 |
-
}
|
139 |
-
|
140 |
-
if (YASR_ENABLE_IP === 'yes') {
|
141 |
-
$columns['ip'] = 'IP';
|
142 |
-
}
|
143 |
-
return $columns;
|
144 |
-
}
|
145 |
-
|
146 |
-
/**
|
147 |
-
* Define which columns are hidden
|
148 |
-
*
|
149 |
-
* @return Array
|
150 |
-
*/
|
151 |
-
public function get_hidden_columns() {
|
152 |
-
return array( 'id' );
|
153 |
-
}
|
154 |
-
|
155 |
-
/**
|
156 |
-
* Define the sortable columns
|
157 |
-
*
|
158 |
-
* @return Array
|
159 |
-
*/
|
160 |
-
public function get_sortable_columns() {
|
161 |
-
|
162 |
-
$sortable_columns = array(
|
163 |
-
'post_id' => array('post_id', false),
|
164 |
-
'user_id' => array('user_id', false),
|
165 |
-
'vote' => array('vote', false),
|
166 |
-
'date' => array('date', false),
|
167 |
-
'ip' => array('ip', false)
|
168 |
-
);
|
169 |
-
|
170 |
-
if($this->active_tab === 'logs_multi') {
|
171 |
-
$sortable_columns['set_type'] = array('set_type', false);
|
172 |
-
$sortable_columns['field_id'] = array('field_id', false);
|
173 |
-
}
|
174 |
-
|
175 |
-
return $sortable_columns;
|
176 |
-
}
|
177 |
-
|
178 |
-
/**
|
179 |
-
* Define what data to show on each column of the table
|
180 |
-
*
|
181 |
-
* @param Array $item Data
|
182 |
-
* @param String $column_name - Current column name
|
183 |
-
*
|
184 |
-
* @return Mixed|void
|
185 |
-
*/
|
186 |
-
protected function column_default( $item, $column_name ) {
|
187 |
-
|
188 |
-
global $wpdb;
|
189 |
-
|
190 |
-
if (isset($item['set_type'])) {
|
191 |
-
$set_id = (int)$item['set_type'];
|
192 |
-
}
|
193 |
-
|
194 |
-
switch ($column_name) {
|
195 |
-
case 'post_id':
|
196 |
-
$post_id = $item[$column_name];
|
197 |
-
|
198 |
-
$title_post = wp_strip_all_tags(get_the_title($post_id));
|
199 |
-
$link = get_permalink($post_id);
|
200 |
-
|
201 |
-
return '<a href="' . $link . '">' . $title_post . '</a>';
|
202 |
-
|
203 |
-
case 'user_id':
|
204 |
-
$user_id = $item[$column_name];
|
205 |
-
|
206 |
-
$user = get_user_by('id', $user_id);
|
207 |
-
|
208 |
-
//If !user means that the vote are anonymous
|
209 |
-
if ($user === false) {
|
210 |
-
$user = (object) array( 'user_login' );
|
211 |
-
$user->user_login = __('anonymous', 'yet-another-stars-rating');
|
212 |
-
}
|
213 |
-
|
214 |
-
return $user->user_login;
|
215 |
-
|
216 |
-
case 'set_type':
|
217 |
-
$data = $wpdb->get_results(
|
218 |
-
$wpdb->prepare(
|
219 |
-
"SELECT set_name
|
220 |
-
FROM " . YASR_MULTI_SET_NAME_TABLE . "
|
221 |
-
WHERE set_id = %d", $set_id),
|
222 |
-
ARRAY_A);
|
223 |
-
|
224 |
-
if(!empty($data)) {
|
225 |
-
return $data[0]['set_name'];
|
226 |
-
}
|
227 |
-
|
228 |
-
return __('Multi Set doesn\'t exists', 'yet-another-stars-rating');
|
229 |
-
|
230 |
-
case 'field_id':
|
231 |
-
$field_id = $item[$column_name];
|
232 |
-
$data = $wpdb->get_results(
|
233 |
-
$wpdb->prepare(
|
234 |
-
"SELECT field_name
|
235 |
-
FROM " . YASR_MULTI_SET_FIELDS_TABLE . "
|
236 |
-
WHERE parent_set_id = %d
|
237 |
-
AND field_id = %d",
|
238 |
-
$set_id, $field_id),
|
239 |
-
ARRAY_A);
|
240 |
-
|
241 |
-
if(!empty($data)) {
|
242 |
-
return $data[0]['field_name'];
|
243 |
-
}
|
244 |
-
|
245 |
-
return __('Field doesn\'t exists', 'yet-another-stars-rating');
|
246 |
-
|
247 |
-
case 'date':
|
248 |
-
$date = $item[$column_name];
|
249 |
-
if($item[$column_name] === '0000-00-00 00:00:00') {
|
250 |
-
$date = __('Imported Data', 'yet-another-stars-rating');
|
251 |
-
}
|
252 |
-
return $date;
|
253 |
-
|
254 |
-
//All other columns must return their content
|
255 |
-
case 'vote':
|
256 |
-
case 'ip':
|
257 |
-
return $item[$column_name];
|
258 |
-
}
|
259 |
-
return;
|
260 |
-
}
|
261 |
-
|
262 |
-
/**
|
263 |
-
* Allows you to sort the data by the variables set in the $_GET
|
264 |
-
*
|
265 |
-
* @return Mixed
|
266 |
-
*/
|
267 |
-
protected function sort_data( $a, $b ) {
|
268 |
-
|
269 |
-
// Set defaults (just need to avoid undefined variable at first load,
|
270 |
-
// it is already ordered with the query
|
271 |
-
$orderby = 'date';
|
272 |
-
$order = 'desc';
|
273 |
-
|
274 |
-
// If orderby is set, use this as the sort column
|
275 |
-
if (!empty($_GET['orderby'])) {
|
276 |
-
$orderby = $_GET['orderby'];
|
277 |
-
}
|
278 |
-
|
279 |
-
// If order is set use this as the order
|
280 |
-
if (!empty($_GET['order'])) {
|
281 |
-
$order = $_GET['order'];
|
282 |
-
}
|
283 |
-
|
284 |
-
$result = strcmp($a[ $orderby ], $b[ $orderby ]);
|
285 |
-
|
286 |
-
if ($order === 'asc') {
|
287 |
-
return $result;
|
288 |
-
}
|
289 |
-
|
290 |
-
return - $result;
|
291 |
-
}
|
292 |
-
|
293 |
-
|
294 |
-
protected function get_bulk_actions() {
|
295 |
-
$actions = array(
|
296 |
-
'delete' => 'Delete'
|
297 |
-
);
|
298 |
-
return $actions;
|
299 |
-
}
|
300 |
-
|
301 |
-
protected function column_cb($item) {
|
302 |
-
|
303 |
-
return sprintf(
|
304 |
-
"<input type='checkbox' name='yasr_logs_votes_to_delete[]' id='{$item['id']}' value='{$item['id']}' />"
|
305 |
-
);
|
306 |
-
}
|
307 |
-
|
308 |
-
//process bulk action
|
309 |
-
protected function process_bulk_action() {
|
310 |
-
if ($this->current_action() === 'delete') {
|
311 |
-
check_admin_referer( 'yasr-delete-stats-logs', 'yasr-nonce-delete-stats-logs' );
|
312 |
-
|
313 |
-
global $wpdb;
|
314 |
-
|
315 |
-
$table = YASR_LOG_TABLE;
|
316 |
-
|
317 |
-
if($this->active_tab === 'logs_multi') {
|
318 |
-
$table = YASR_LOG_MULTI_SET;
|
319 |
-
}
|
320 |
-
|
321 |
-
foreach ($_POST['yasr_logs_votes_to_delete'] as $log_id) {
|
322 |
-
//force to be an int
|
323 |
-
$log_id = (int)$log_id;
|
324 |
-
|
325 |
-
//Find the post_id
|
326 |
-
$post_id = $wpdb->get_var(
|
327 |
-
$wpdb->prepare(
|
328 |
-
"SELECT post_id FROM
|
329 |
-
$table
|
330 |
-
WHERE id = %d",
|
331 |
-
$log_id
|
332 |
-
)
|
333 |
-
);
|
334 |
-
|
335 |
-
//find set_id
|
336 |
-
if($this->active_tab === 'logs_multi') {
|
337 |
-
$set_id = $wpdb->get_var(
|
338 |
-
$wpdb->prepare(
|
339 |
-
"SELECT set_type FROM $table WHERE id = %d",
|
340 |
-
$log_id
|
341 |
-
)
|
342 |
-
);
|
343 |
-
}
|
344 |
-
|
345 |
-
//delete the log id
|
346 |
-
$wpdb->delete(
|
347 |
-
$table,
|
348 |
-
array(
|
349 |
-
'id' => $log_id
|
350 |
-
),
|
351 |
-
array( '%d' )
|
352 |
-
);
|
353 |
-
|
354 |
-
}
|
355 |
-
}
|
356 |
-
|
357 |
-
}
|
358 |
-
|
359 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/yasr-admin-actions-ajax.php
CHANGED
@@ -34,4 +34,24 @@ add_action('wp_ajax_yasr_change_user_log_page', 'yasr_users_dashboard_widget_cal
|
|
34 |
function yasr_users_dashboard_widget_callback() {
|
35 |
$log_widget = new YasrLogDashboardWidget('user');
|
36 |
$log_widget->userWidget();
|
37 |
-
} //End callback function
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
function yasr_users_dashboard_widget_callback() {
|
35 |
$log_widget = new YasrLogDashboardWidget('user');
|
36 |
$log_widget->userWidget();
|
37 |
+
} //End callback function
|
38 |
+
|
39 |
+
add_action('wp_ajax_yasr_rankings_preview_shortcode', 'yasr_rankings_preview_shortcode');
|
40 |
+
function yasr_rankings_preview_shortcode() {
|
41 |
+
|
42 |
+
if(!isset($_GET['shortcode']) || !isset($_GET['full_shortcode'])) {
|
43 |
+
die();
|
44 |
+
}
|
45 |
+
|
46 |
+
$shortcode = $_GET['shortcode'];
|
47 |
+
|
48 |
+
if(!shortcode_exists($shortcode)) {
|
49 |
+
die(json_encode(__('This shortcode was not found.', 'yet-another-stars-rating')));
|
50 |
+
}
|
51 |
+
|
52 |
+
$full_shortcode = stripslashes($_GET['full_shortcode']);
|
53 |
+
|
54 |
+
echo json_encode(do_shortcode($full_shortcode));
|
55 |
+
|
56 |
+
die();
|
57 |
+
}
|
admin/yasr-admin-filters.php
CHANGED
@@ -29,4 +29,4 @@ function yasr_filter_style_options_callback($style_options) {
|
|
29 |
}
|
30 |
|
31 |
return $style_options;
|
32 |
-
}
|
29 |
}
|
30 |
|
31 |
return $style_options;
|
32 |
+
}
|
admin/yasr-admin-functions.php
CHANGED
@@ -67,18 +67,12 @@ function yasr_add_admin_scripts($hook) {
|
|
67 |
);
|
68 |
}
|
69 |
|
70 |
-
//add this only in yasr setting page (admin.php?page=yasr_settings_page)
|
71 |
-
if ($hook === $yasr_settings_page) {
|
72 |
-
$cm_settings['codeEditor'] = wp_enqueue_code_editor(array('type' => 'text/css'));
|
73 |
-
wp_localize_script('jquery', 'yasr_cm_settings', $cm_settings);
|
74 |
-
}
|
75 |
-
|
76 |
if ($hook === 'index.php' || $hook === 'edit.php' || $hook === 'post.php' || $hook === 'post-new.php' ||
|
77 |
$hook === 'edit-comments.php' || $hook === 'term.php' || $hook === $yasr_settings_page ||
|
78 |
$hook === 'yet-another-stars-rating_page_yasr_stats_page'
|
79 |
) {
|
80 |
|
81 |
-
do_action('yasr_add_admin_scripts_begin');
|
82 |
|
83 |
wp_enqueue_style(
|
84 |
'yasrcss',
|
@@ -91,22 +85,27 @@ function yasr_add_admin_scripts($hook) {
|
|
91 |
wp_enqueue_script(
|
92 |
'yasradmin',
|
93 |
YASR_JS_DIR_ADMIN . 'yasr-admin.js',
|
94 |
-
array('jquery'),
|
95 |
YASR_VERSION_NUM,
|
96 |
true
|
97 |
);
|
98 |
|
99 |
do_action('yasr_add_admin_scripts_end', $hook);
|
100 |
|
101 |
-
|
102 |
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
)
|
108 |
-
);
|
109 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
110 |
}
|
111 |
|
112 |
}
|
67 |
);
|
68 |
}
|
69 |
|
|
|
|
|
|
|
|
|
|
|
|
|
70 |
if ($hook === 'index.php' || $hook === 'edit.php' || $hook === 'post.php' || $hook === 'post-new.php' ||
|
71 |
$hook === 'edit-comments.php' || $hook === 'term.php' || $hook === $yasr_settings_page ||
|
72 |
$hook === 'yet-another-stars-rating_page_yasr_stats_page'
|
73 |
) {
|
74 |
|
75 |
+
do_action('yasr_add_admin_scripts_begin', $hook);
|
76 |
|
77 |
wp_enqueue_style(
|
78 |
'yasrcss',
|
85 |
wp_enqueue_script(
|
86 |
'yasradmin',
|
87 |
YASR_JS_DIR_ADMIN . 'yasr-admin.js',
|
88 |
+
array('jquery', 'tippy'),
|
89 |
YASR_VERSION_NUM,
|
90 |
true
|
91 |
);
|
92 |
|
93 |
do_action('yasr_add_admin_scripts_end', $hook);
|
94 |
|
95 |
+
}
|
96 |
|
97 |
+
//add this only in yasr setting page (admin.php?page=yasr_settings_page)
|
98 |
+
if ($hook === $yasr_settings_page) {
|
99 |
+
$cm_settings['codeEditor'] = wp_enqueue_code_editor(array('type' => 'text/css'));
|
100 |
+
wp_localize_script('jquery', 'yasr_cm_settings', $cm_settings);
|
|
|
|
|
101 |
|
102 |
+
wp_enqueue_script(
|
103 |
+
'yasradmin-settings',
|
104 |
+
YASR_JS_DIR_ADMIN . 'yasr-settings.js',
|
105 |
+
array('jquery', 'yasradmin'),
|
106 |
+
YASR_VERSION_NUM,
|
107 |
+
true
|
108 |
+
);
|
109 |
}
|
110 |
|
111 |
}
|
admin/yasr-admin-init.php
CHANGED
@@ -31,6 +31,18 @@ define('YASR_JS_DIR_ADMIN', plugins_url() . '/' . YASR_RELATIVE_PATH_ADMIN . '/j
|
|
31 |
//CSS directory absolute URL
|
32 |
define('YASR_CSS_DIR_ADMIN', plugins_url() . '/' . YASR_RELATIVE_PATH_ADMIN . '/css/');
|
33 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
require YASR_ABSOLUTE_PATH_ADMIN . '/yasr-update-functions.php';
|
35 |
require YASR_ABSOLUTE_PATH_ADMIN . '/yasr-admin-functions.php';
|
36 |
require YASR_ABSOLUTE_PATH_ADMIN . '/yasr-admin-actions.php';
|
31 |
//CSS directory absolute URL
|
32 |
define('YASR_CSS_DIR_ADMIN', plugins_url() . '/' . YASR_RELATIVE_PATH_ADMIN . '/css/');
|
33 |
|
34 |
+
//this define must triggered after the active theme's functions.php file is loaded
|
35 |
+
add_action('init', function (){
|
36 |
+
$text = __('This feature is available only in the pro version', 'yet-another-stars-rating');
|
37 |
+
$lockImage =
|
38 |
+
apply_filters('yasr_feature_locked',
|
39 |
+
'<span class="dashicons dashicons-lock" title="'.$text.'"></span>',
|
40 |
+
10,
|
41 |
+
1);
|
42 |
+
define ('YASR_LOCKED_FEATURE', $lockImage);
|
43 |
+
});
|
44 |
+
|
45 |
+
|
46 |
require YASR_ABSOLUTE_PATH_ADMIN . '/yasr-update-functions.php';
|
47 |
require YASR_ABSOLUTE_PATH_ADMIN . '/yasr-admin-functions.php';
|
48 |
require YASR_ABSOLUTE_PATH_ADMIN . '/yasr-admin-actions.php';
|
admin/yasr-stats-page.php
DELETED
@@ -1,103 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/*
|
4 |
-
|
5 |
-
Copyright 2014 Dario Curvino (email : d.curvino@tiscali.it)
|
6 |
-
|
7 |
-
This program is free software: you can redistribute it and/or modify
|
8 |
-
it under the terms of the GNU General Public License as published by
|
9 |
-
the Free Software Foundation, either version 2 of the License, or
|
10 |
-
(at your option) any later version.
|
11 |
-
|
12 |
-
This program is distributed in the hope that it will be useful,
|
13 |
-
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
14 |
-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
15 |
-
GNU General Public License for more details.
|
16 |
-
|
17 |
-
You should have received a copy of the GNU General Public License
|
18 |
-
along with this program. If not, see <http://www.gnu.org/licenses/>
|
19 |
-
*/
|
20 |
-
|
21 |
-
if (!defined('ABSPATH')) {
|
22 |
-
exit('You\'re not allowed to see this page');
|
23 |
-
} // Exit if accessed directly
|
24 |
-
|
25 |
-
if (!current_user_can('manage_options')) {
|
26 |
-
wp_die(__('You do not have sufficient permissions to access this page.', 'yet-another-stars-rating'));
|
27 |
-
}
|
28 |
-
|
29 |
-
require(YASR_ABSOLUTE_PATH_ADMIN . '/settings/yasr-stats-functions.php');
|
30 |
-
|
31 |
-
?>
|
32 |
-
|
33 |
-
<div class="wrap">
|
34 |
-
|
35 |
-
<h2>Yet Another Stars Rating: <?php _e("Ratings Stats", 'yet-another-stars-rating'); ?></h2>
|
36 |
-
|
37 |
-
<?php
|
38 |
-
|
39 |
-
if (isset($_GET['tab'])) {
|
40 |
-
$active_tab = $_GET['tab'];
|
41 |
-
} else {
|
42 |
-
$active_tab = 'logs';
|
43 |
-
}
|
44 |
-
|
45 |
-
//Do the settings tab
|
46 |
-
yasr_stats_tabs($active_tab);
|
47 |
-
|
48 |
-
if ($active_tab === 'logs' || $active_tab === '') {
|
49 |
-
?>
|
50 |
-
|
51 |
-
<div class="yasr-settingsdiv">
|
52 |
-
<form action="#" id="" method="POST">
|
53 |
-
<?php
|
54 |
-
wp_nonce_field('yasr-delete-stats-logs', 'yasr-nonce-delete-stats-logs');
|
55 |
-
$yasr_stats_log_table = new YASR_Stats_Log_List_Table($active_tab);
|
56 |
-
$yasr_stats_log_table->prepare_items();
|
57 |
-
$yasr_stats_log_table->display();
|
58 |
-
?>
|
59 |
-
</form>
|
60 |
-
</div>
|
61 |
-
|
62 |
-
<?php
|
63 |
-
yasr_right_settings_panel();
|
64 |
-
?>
|
65 |
-
|
66 |
-
<div class="yasr-space-settings-div">
|
67 |
-
</div>
|
68 |
-
|
69 |
-
<?php
|
70 |
-
|
71 |
-
} //End if tab 'logs'
|
72 |
-
|
73 |
-
if ($active_tab === 'logs_multi') {
|
74 |
-
?>
|
75 |
-
|
76 |
-
<div class="yasr-settingsdiv">
|
77 |
-
<form action="#" id="" method="POST">
|
78 |
-
<?php
|
79 |
-
wp_nonce_field('yasr-delete-stats-logs', 'yasr-nonce-delete-stats-logs');
|
80 |
-
$yasr_stats_log_table = new YASR_Stats_Log_List_Table($active_tab);
|
81 |
-
$yasr_stats_log_table->prepare_items();
|
82 |
-
$yasr_stats_log_table->display();
|
83 |
-
?>
|
84 |
-
</form>
|
85 |
-
</div>
|
86 |
-
|
87 |
-
<?php
|
88 |
-
yasr_right_settings_panel();
|
89 |
-
?>
|
90 |
-
|
91 |
-
<div class="yasr-space-settings-div">
|
92 |
-
</div>
|
93 |
-
|
94 |
-
<?php
|
95 |
-
|
96 |
-
} //End if tab 'general_settings'
|
97 |
-
|
98 |
-
do_action('yasr_settings_check_active_tab', $active_tab);
|
99 |
-
yasr_right_settings_panel('bottom');
|
100 |
-
?>
|
101 |
-
|
102 |
-
<!--End div wrap-->
|
103 |
-
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/classes/YasrPhpFieldsHelper.php
CHANGED
@@ -37,15 +37,17 @@ if (!class_exists('YasrPhpFieldsHelper') ) {
|
|
37 |
* @param bool|string $name
|
38 |
* @param bool|string|int $default_value
|
39 |
* @param bool|string $id
|
|
|
40 |
*
|
41 |
* @return string
|
42 |
*/
|
43 |
|
44 |
public static function radio(
|
45 |
-
$title = false, $class = false, $options = [], $name = false, $default_value = false, $id = false
|
|
|
46 |
) {
|
47 |
|
48 |
-
$attribute = self::escape_attributes($class, $title, $name, $id, $default_value
|
49 |
$radio_options = self::escape_array($options);
|
50 |
|
51 |
$container = '';
|
@@ -58,7 +60,13 @@ if (!class_exists('YasrPhpFieldsHelper') ) {
|
|
58 |
|
59 |
if (is_array($radio_options)) {
|
60 |
|
61 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
62 |
|
63 |
$radio_fields = '';
|
64 |
foreach ($radio_options as $value => $label) {
|
@@ -86,12 +94,13 @@ if (!class_exists('YasrPhpFieldsHelper') ) {
|
|
86 |
value="%s"
|
87 |
class="%s"
|
88 |
id="%s"
|
|
|
89 |
%s
|
90 |
>
|
91 |
%s
|
92 |
</label>
|
93 |
-
</div>', $id_string, $attribute['name'], $value, $attribute['class'], $id_string, $
|
94 |
-
__(ucfirst($label), 'yet-another-stars-rating')
|
95 |
);
|
96 |
|
97 |
} //end foreach
|
@@ -110,18 +119,20 @@ if (!class_exists('YasrPhpFieldsHelper') ) {
|
|
110 |
* @param bool|string|int $id
|
111 |
* @param bool|string|int $placeholder
|
112 |
* @param bool|string|int $default_value
|
|
|
113 |
*
|
114 |
* @return string
|
115 |
*/
|
116 |
public static function text(
|
117 |
-
$class = false, $label = false, $name = false, $id = false, $placeholder = false, $default_value = false
|
|
|
118 |
) {
|
119 |
$attribute = self::escape_attributes($class, $label, $name, $id, $default_value, $placeholder);
|
120 |
|
121 |
$container = "<div class='$attribute[class]'>";
|
122 |
$label_string = "<label for='$attribute[id]'>$attribute[label]</label>";
|
123 |
$input_text = "<input type='text' name='$attribute[name]' id='$attribute[id]' value='$attribute[value]'
|
124 |
-
placeholder='$attribute[placeholder]'>";
|
125 |
$end_container = "</div>";
|
126 |
|
127 |
return ($container . $label_string . $input_text . $end_container);
|
@@ -134,18 +145,20 @@ if (!class_exists('YasrPhpFieldsHelper') ) {
|
|
134 |
* @param bool|string|int $name
|
135 |
* @param bool|string|int $id
|
136 |
* @param bool|string|int $default_value
|
|
|
137 |
*
|
138 |
* @return string
|
139 |
*/
|
140 |
public static function select(
|
141 |
-
$class = false, $label = false, $options = [], $name = false, $id = false, $default_value = false
|
|
|
142 |
) {
|
143 |
$attribute = self::escape_attributes($class, $label, $name, $id, $default_value);
|
144 |
$select_options = self::escape_array($options);
|
145 |
|
146 |
$container = "<div class='$attribute[class]'>";
|
147 |
$label_string = "<label for='$attribute[id]'>$attribute[label]</label>";
|
148 |
-
$select = "<select name='$attribute[name]' id='$attribute[id]'>";
|
149 |
$end_select = "</select>";
|
150 |
$end_container = "</div>";
|
151 |
|
@@ -168,18 +181,22 @@ if (!class_exists('YasrPhpFieldsHelper') ) {
|
|
168 |
* @param bool|string|int $id
|
169 |
* @param bool|string|int $placeholder
|
170 |
* @param bool|string|int $default_value
|
|
|
171 |
*
|
172 |
* @return string
|
173 |
*/
|
174 |
public static function textArea(
|
175 |
-
$class = false, $label = false, $name = false, $id = false, $placeholder = false, $default_value = false
|
|
|
176 |
) {
|
177 |
$attribute = self::escape_attributes($class, $label, $name, $id, $default_value, $placeholder);
|
178 |
|
179 |
$container = "<div class='$attribute[class]'>";
|
180 |
$label_string = "<label for='$attribute[id]'>$attribute[label]</label>";
|
181 |
-
$textarea
|
182 |
-
|
|
|
|
|
183 |
$end_textarea = "</textarea>";
|
184 |
$end_container = "</div>";
|
185 |
|
@@ -192,13 +209,15 @@ if (!class_exists('YasrPhpFieldsHelper') ) {
|
|
192 |
* @param bool|string|int $label
|
193 |
* @param bool|string|int $name
|
194 |
* @param bool|string|int $id
|
195 |
-
* @param bool|string|int $placeholder
|
196 |
* @param bool|string|int $default_value
|
|
|
|
|
197 |
*
|
198 |
* @return array
|
199 |
*/
|
200 |
private static function escape_attributes(
|
201 |
-
$class = false, $label = false, $name = false, $id = false, $default_value = false, $placeholder = false
|
|
|
202 |
) {
|
203 |
|
204 |
$dbt = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 2);
|
@@ -233,6 +252,10 @@ if (!class_exists('YasrPhpFieldsHelper') ) {
|
|
233 |
$id = str_shuffle(uniqid('', true));
|
234 |
}
|
235 |
|
|
|
|
|
|
|
|
|
236 |
return array(
|
237 |
'class' => htmlspecialchars($class, ENT_QUOTES),
|
238 |
'id' => htmlspecialchars($id, ENT_QUOTES),
|
@@ -240,6 +263,7 @@ if (!class_exists('YasrPhpFieldsHelper') ) {
|
|
240 |
'name' => htmlspecialchars($name, ENT_QUOTES),
|
241 |
'placeholder' => htmlspecialchars($placeholder, ENT_QUOTES),
|
242 |
'value' => htmlspecialchars($default_value, ENT_QUOTES),
|
|
|
243 |
);
|
244 |
}
|
245 |
|
@@ -258,16 +282,18 @@ if (!class_exists('YasrPhpFieldsHelper') ) {
|
|
258 |
}
|
259 |
|
260 |
/**
|
261 |
-
* @param
|
262 |
-
* @param
|
263 |
-
* @param $db_value
|
264 |
-
* @param $id
|
265 |
* return void
|
|
|
266 |
*
|
267 |
* @since 2.3.3
|
268 |
*/
|
269 |
-
public static function radioSelectSize($name, $class, $db_value
|
270 |
$array_size = array('small', 'medium', 'large');
|
|
|
271 |
|
272 |
foreach ($array_size as $size) {
|
273 |
$id_string = $id . $size;
|
@@ -287,24 +313,30 @@ if (!class_exists('YasrPhpFieldsHelper') ) {
|
|
287 |
$checked = 'checked';
|
288 |
}
|
289 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
290 |
echo sprintf(
|
291 |
'<div class="yasr-option-div">
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
__(ucwords($size), 'yet-another-stars-rating')
|
308 |
);
|
309 |
|
310 |
} //end foreach
|
37 |
* @param bool|string $name
|
38 |
* @param bool|string|int $default_value
|
39 |
* @param bool|string $id
|
40 |
+
* @param string $autocomplete
|
41 |
*
|
42 |
* @return string
|
43 |
*/
|
44 |
|
45 |
public static function radio(
|
46 |
+
$title = false, $class = false, $options = [], $name = false, $default_value = false, $id = false,
|
47 |
+
$autocomplete = 'off'
|
48 |
) {
|
49 |
|
50 |
+
$attribute = self::escape_attributes($class, $title, $name, $id, $default_value);
|
51 |
$radio_options = self::escape_array($options);
|
52 |
|
53 |
$container = '';
|
60 |
|
61 |
if (is_array($radio_options)) {
|
62 |
|
63 |
+
if($attribute['class']) {
|
64 |
+
$container_class = $attribute['class'];
|
65 |
+
} else {
|
66 |
+
$container_class = 'yasr-indented-answer';
|
67 |
+
}
|
68 |
+
|
69 |
+
$container .= '<div class="'.$container_class.'">';
|
70 |
|
71 |
$radio_fields = '';
|
72 |
foreach ($radio_options as $value => $label) {
|
94 |
value="%s"
|
95 |
class="%s"
|
96 |
id="%s"
|
97 |
+
autocomplete="%s"
|
98 |
%s
|
99 |
>
|
100 |
%s
|
101 |
</label>
|
102 |
+
</div>', $id_string, $attribute['name'], $value, $attribute['class'], $id_string, $autocomplete,
|
103 |
+
$checked, __(ucfirst($label), 'yet-another-stars-rating')
|
104 |
);
|
105 |
|
106 |
} //end foreach
|
119 |
* @param bool|string|int $id
|
120 |
* @param bool|string|int $placeholder
|
121 |
* @param bool|string|int $default_value
|
122 |
+
* @param string $autocomplete
|
123 |
*
|
124 |
* @return string
|
125 |
*/
|
126 |
public static function text(
|
127 |
+
$class = false, $label = false, $name = false, $id = false, $placeholder = false, $default_value = false,
|
128 |
+
$autocomplete='off'
|
129 |
) {
|
130 |
$attribute = self::escape_attributes($class, $label, $name, $id, $default_value, $placeholder);
|
131 |
|
132 |
$container = "<div class='$attribute[class]'>";
|
133 |
$label_string = "<label for='$attribute[id]'>$attribute[label]</label>";
|
134 |
$input_text = "<input type='text' name='$attribute[name]' id='$attribute[id]' value='$attribute[value]'
|
135 |
+
placeholder='$attribute[placeholder]' autocomplete='$autocomplete'>";
|
136 |
$end_container = "</div>";
|
137 |
|
138 |
return ($container . $label_string . $input_text . $end_container);
|
145 |
* @param bool|string|int $name
|
146 |
* @param bool|string|int $id
|
147 |
* @param bool|string|int $default_value
|
148 |
+
* @param string $autocomplete
|
149 |
*
|
150 |
* @return string
|
151 |
*/
|
152 |
public static function select(
|
153 |
+
$class = false, $label = false, $options = [], $name = false, $id = false, $default_value = false,
|
154 |
+
$autocomplete = 'off'
|
155 |
) {
|
156 |
$attribute = self::escape_attributes($class, $label, $name, $id, $default_value);
|
157 |
$select_options = self::escape_array($options);
|
158 |
|
159 |
$container = "<div class='$attribute[class]'>";
|
160 |
$label_string = "<label for='$attribute[id]'>$attribute[label]</label>";
|
161 |
+
$select = "<select name='$attribute[name]' id='$attribute[id]' autocomplete=$autocomplete>";
|
162 |
$end_select = "</select>";
|
163 |
$end_container = "</div>";
|
164 |
|
181 |
* @param bool|string|int $id
|
182 |
* @param bool|string|int $placeholder
|
183 |
* @param bool|string|int $default_value
|
184 |
+
* @param string $autocomplete
|
185 |
*
|
186 |
* @return string
|
187 |
*/
|
188 |
public static function textArea(
|
189 |
+
$class = false, $label = false, $name = false, $id = false, $placeholder = false, $default_value = false,
|
190 |
+
$autocomplete = 'off'
|
191 |
) {
|
192 |
$attribute = self::escape_attributes($class, $label, $name, $id, $default_value, $placeholder);
|
193 |
|
194 |
$container = "<div class='$attribute[class]'>";
|
195 |
$label_string = "<label for='$attribute[id]'>$attribute[label]</label>";
|
196 |
+
$textarea = "<textarea name='$attribute[name]'
|
197 |
+
id='$attribute[id]'
|
198 |
+
placeholder='$attribute[placeholder]'
|
199 |
+
autocomplete=$autocomplete>";
|
200 |
$end_textarea = "</textarea>";
|
201 |
$end_container = "</div>";
|
202 |
|
209 |
* @param bool|string|int $label
|
210 |
* @param bool|string|int $name
|
211 |
* @param bool|string|int $id
|
|
|
212 |
* @param bool|string|int $default_value
|
213 |
+
* @param bool|string|int $placeholder
|
214 |
+
* @param string $autocomplete
|
215 |
*
|
216 |
* @return array
|
217 |
*/
|
218 |
private static function escape_attributes(
|
219 |
+
$class = false, $label = false, $name = false, $id = false, $default_value = false, $placeholder = false,
|
220 |
+
$autocomplete = 'off'
|
221 |
) {
|
222 |
|
223 |
$dbt = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 2);
|
252 |
$id = str_shuffle(uniqid('', true));
|
253 |
}
|
254 |
|
255 |
+
if($autocomplete !== 'on') {
|
256 |
+
$autocomplete = 'off';
|
257 |
+
}
|
258 |
+
|
259 |
return array(
|
260 |
'class' => htmlspecialchars($class, ENT_QUOTES),
|
261 |
'id' => htmlspecialchars($id, ENT_QUOTES),
|
263 |
'name' => htmlspecialchars($name, ENT_QUOTES),
|
264 |
'placeholder' => htmlspecialchars($placeholder, ENT_QUOTES),
|
265 |
'value' => htmlspecialchars($default_value, ENT_QUOTES),
|
266 |
+
'autocomplete' => $autocomplete,
|
267 |
);
|
268 |
}
|
269 |
|
282 |
}
|
283 |
|
284 |
/**
|
285 |
+
* @param $name
|
286 |
+
* @param $class
|
287 |
+
* @param bool $db_value
|
288 |
+
* @param bool $id
|
289 |
* return void
|
290 |
+
* @param bool $txt_label
|
291 |
*
|
292 |
* @since 2.3.3
|
293 |
*/
|
294 |
+
public static function radioSelectSize($name, $class, $db_value=false, $id=false, $txt_label=true) {
|
295 |
$array_size = array('small', 'medium', 'large');
|
296 |
+
$span_label = '';
|
297 |
|
298 |
foreach ($array_size as $size) {
|
299 |
$id_string = $id . $size;
|
313 |
$checked = 'checked';
|
314 |
}
|
315 |
|
316 |
+
if($txt_label !== false) {
|
317 |
+
$span_label =
|
318 |
+
'<span class="yasr-text-options-size">'.
|
319 |
+
__(ucwords($size), 'yet-another-stars-rating').
|
320 |
+
'</span>';
|
321 |
+
}
|
322 |
+
|
323 |
echo sprintf(
|
324 |
'<div class="yasr-option-div">
|
325 |
+
<label for="%s">
|
326 |
+
<input type="radio"
|
327 |
+
name="%s"
|
328 |
+
value="%s"
|
329 |
+
class="%s"
|
330 |
+
id="%s"
|
331 |
+
%s
|
332 |
+
>
|
333 |
+
<img src="%syasr-stars-%s.png"
|
334 |
+
class="yasr-img-option-size" alt=%s>
|
335 |
+
%s
|
336 |
+
</label>
|
337 |
+
</div>',
|
338 |
+
$id_string, $name, $size, $class, $id_string, $checked, YASR_IMG_DIR, $size, $size,
|
339 |
+
$span_label
|
|
|
340 |
);
|
341 |
|
342 |
} //end foreach
|
includes/classes/YasrRankingData.php
CHANGED
@@ -30,22 +30,19 @@ class YasrRankingData {
|
|
30 |
* @author Dario Curvino <@dudo>
|
31 |
* @since 2.5.2
|
32 |
*
|
33 |
-
* @param bool|array $
|
34 |
*
|
35 |
* @return array|false|object|void
|
36 |
*/
|
37 |
-
public static function rankingOverallGetResults($
|
38 |
global $wpdb;
|
39 |
|
40 |
-
//
|
41 |
-
$sql_params = apply_filters('yasr_rankings_query_ov_set_attributes', $attributes);
|
42 |
-
|
43 |
-
//do a custom query here
|
44 |
//must returns rating and post_id
|
45 |
-
$query = apply_filters('yasr_rankings_query_ov', $
|
46 |
|
47 |
//if query === $sql_params (both are falses) means that filters doesn't exists
|
48 |
-
if($query === $
|
49 |
//default query
|
50 |
$query = "SELECT pm.meta_value AS rating,
|
51 |
pm.post_id AS post_id
|
@@ -74,27 +71,25 @@ class YasrRankingData {
|
|
74 |
* @author Dario Curvino <@dudo>
|
75 |
* @since 2.5.2
|
76 |
*
|
77 |
-
* @param bool|array $
|
78 |
* @param $ranking
|
79 |
* @param bool $required_votes
|
80 |
*
|
81 |
* @return array|false|object|void
|
82 |
*/
|
83 |
|
84 |
-
public static function rankingVVGetResults($
|
85 |
global $wpdb;
|
86 |
|
87 |
if($required_votes !== false) {
|
88 |
-
$
|
89 |
}
|
90 |
|
91 |
-
|
92 |
-
|
93 |
-
//This filter is used to filter the query
|
94 |
-
$query = apply_filters('yasr_rankings_query_vv', $sql_params, $ranking);
|
95 |
|
96 |
//if no custom query is hooked
|
97 |
-
if($query === $
|
98 |
|
99 |
$common_query = "SELECT post_id,
|
100 |
COUNT(post_id) AS number_of_votes,
|
@@ -121,4 +116,70 @@ class YasrRankingData {
|
|
121 |
|
122 |
return $wpdb->get_results($query);
|
123 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
124 |
}
|
30 |
* @author Dario Curvino <@dudo>
|
31 |
* @since 2.5.2
|
32 |
*
|
33 |
+
* @param bool|array $atts
|
34 |
*
|
35 |
* @return array|false|object|void
|
36 |
*/
|
37 |
+
public static function rankingOverallGetResults($atts) {
|
38 |
global $wpdb;
|
39 |
|
40 |
+
//return custom query here
|
|
|
|
|
|
|
41 |
//must returns rating and post_id
|
42 |
+
$query = apply_filters('yasr_rankings_query_ov', $atts);
|
43 |
|
44 |
//if query === $sql_params (both are falses) means that filters doesn't exists
|
45 |
+
if($query === $atts) {
|
46 |
//default query
|
47 |
$query = "SELECT pm.meta_value AS rating,
|
48 |
pm.post_id AS post_id
|
71 |
* @author Dario Curvino <@dudo>
|
72 |
* @since 2.5.2
|
73 |
*
|
74 |
+
* @param bool|array $atts
|
75 |
* @param $ranking
|
76 |
* @param bool $required_votes
|
77 |
*
|
78 |
* @return array|false|object|void
|
79 |
*/
|
80 |
|
81 |
+
public static function rankingVVGetResults($atts, $ranking, $required_votes=false) {
|
82 |
global $wpdb;
|
83 |
|
84 |
if($required_votes !== false) {
|
85 |
+
$atts['required_votes'] = $required_votes;
|
86 |
}
|
87 |
|
88 |
+
//hooks here to return a query
|
89 |
+
$query = apply_filters('yasr_rankings_query_vv', $atts, $ranking);
|
|
|
|
|
90 |
|
91 |
//if no custom query is hooked
|
92 |
+
if($query === $atts) {
|
93 |
|
94 |
$common_query = "SELECT post_id,
|
95 |
COUNT(post_id) AS number_of_votes,
|
116 |
|
117 |
return $wpdb->get_results($query);
|
118 |
}
|
119 |
+
|
120 |
+
/***
|
121 |
+
* @author Dario Curvino <@dudo>
|
122 |
+
* @since 2.6.3
|
123 |
+
* @param $atts
|
124 |
+
*
|
125 |
+
* @return array|false|object|void
|
126 |
+
*/
|
127 |
+
public static function rankingTopReviewers($atts) {
|
128 |
+
global $wpdb;
|
129 |
+
|
130 |
+
//return custom query here
|
131 |
+
//must returns rating and post_id
|
132 |
+
$query = apply_filters('yasr_rankings_query_tr', $atts);
|
133 |
+
|
134 |
+
//if query === $sql_params (both are falses) means that filters doesn't exists
|
135 |
+
if($query === $atts) {
|
136 |
+
$query = "SELECT COUNT( pm.post_id ) AS total_count,
|
137 |
+
p.post_author AS user,
|
138 |
+
u.user_login AS name
|
139 |
+
FROM $wpdb->posts AS p,
|
140 |
+
$wpdb->postmeta AS pm,
|
141 |
+
$wpdb->users AS u
|
142 |
+
WHERE pm.post_id = p.ID
|
143 |
+
AND pm.meta_key = 'yasr_overall_rating'
|
144 |
+
AND p.post_status = 'publish'
|
145 |
+
AND p.post_author = u.ID
|
146 |
+
GROUP BY user
|
147 |
+
ORDER BY total_count DESC
|
148 |
+
LIMIT 5";
|
149 |
+
|
150 |
+
}
|
151 |
+
|
152 |
+
return $wpdb->get_results($query);
|
153 |
+
}
|
154 |
+
|
155 |
+
/***
|
156 |
+
* @author Dario Curvino <@dudo>
|
157 |
+
* @since 2.6.3
|
158 |
+
* @param $atts
|
159 |
+
*
|
160 |
+
* @return array|false|object|void
|
161 |
+
*/
|
162 |
+
public static function rankingTopUsers($atts) {
|
163 |
+
global $wpdb;
|
164 |
+
|
165 |
+
//return custom query here
|
166 |
+
//must returns rating and post_id
|
167 |
+
$query = apply_filters('yasr_rankings_query_tu', $atts);
|
168 |
+
|
169 |
+
//if query === $sql_params (both are falses) means that filters doesn't exists
|
170 |
+
if($query === $atts) {
|
171 |
+
$query = 'SELECT COUNT(user_id) as total_count,
|
172 |
+
user_id as user
|
173 |
+
FROM ' . YASR_LOG_TABLE . ",
|
174 |
+
$wpdb->posts AS p
|
175 |
+
WHERE post_id = p.ID
|
176 |
+
AND p.post_status = 'publish'
|
177 |
+
GROUP BY user_id
|
178 |
+
ORDER BY ( total_count ) DESC
|
179 |
+
LIMIT 10";
|
180 |
+
|
181 |
+
}
|
182 |
+
|
183 |
+
return $wpdb->get_results($query);
|
184 |
+
}
|
185 |
}
|
includes/css/yasr.css
CHANGED
@@ -221,4 +221,4 @@ yasr_pro_comment_reviews_stats shortcode too***/
|
|
221 |
.yasr-w3-border-left{border-left:1px solid #ccc!important}.yasr-w3-border-right{border-right:1px solid #ccc!important}
|
222 |
.yasr-w3-amber,.yasr-w3-hover-amber:hover{color:#000!important;background: linear-gradient(to bottom,#ffda44,#f1cb32);
|
223 |
background-color: #ffce00;
|
224 |
-
}
|
221 |
.yasr-w3-border-left{border-left:1px solid #ccc!important}.yasr-w3-border-right{border-right:1px solid #ccc!important}
|
222 |
.yasr-w3-amber,.yasr-w3-hover-amber:hover{color:#000!important;background: linear-gradient(to bottom,#ffda44,#f1cb32);
|
223 |
background-color: #ffce00;
|
224 |
+
}
|
includes/img/logo-supporthost.svg
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 2015.82 310.43"><defs><style>.cls-1,.cls-2{fill:#7b4efc;}.cls-2{fill-rule:evenodd;}</style></defs><title>logo-supporthost</title><g id="Layer_2" data-name="Layer 2"><g id="Layer_1-2" data-name="Layer 1"><g id="g5401-5"><g id="g5403-4"><g id="g5405-30"><path id="path5407-6" class="cls-1" d="M65.06,248a75.23,75.23,0,0,1-38-10.07A57.68,57.68,0,0,1,0,203.27l24.27-6.94a33.9,33.9,0,0,0,16.52,20.48q10.56,5.77,24.43,5.94c1.1,0,2.31-.06,3.64-.17s2.91-.27,4.45-.49A41.2,41.2,0,0,0,83.72,219q13-6.27,14.36-21.13a17.23,17.23,0,0,0-4.46-13q-8.25-9.74-27.24-10.9-38-2.48-54.33-19a37.78,37.78,0,0,1-9.24-14.69A43.08,43.08,0,0,1,.66,126.48q0-24.11,18.82-38.8,17-13.22,41.28-13.21,28.58,0,47.73,20.31a72,72,0,0,1,10.56,14.37l3.47,7.26-23.61,8.92-2.31-4.46a51.85,51.85,0,0,0-6.44-8.75Q78.1,99.73,60.27,99.73q-3.3.17-5.61.5a49.53,49.53,0,0,0-11.4,3Q25.92,110,25.92,126.48q0,10.9,13.87,16.68,10.58,4.29,28.24,5.45,16.52,1.15,28.9,7.43a51.89,51.89,0,0,1,15.85,12.22,41.18,41.18,0,0,1,10.4,31.54q-1.82,23.44-19.81,36.49Q87.51,248,65.22,248Z"/><path id="path5409" class="cls-1" d="M171,178.33q0,28.74,20.47,49.21T240.71,248a67.64,67.64,0,0,0,44.42-16v13.7h25.26V76.62H285.13V178.33a44.36,44.36,0,0,1-75.79,31.37,42.75,42.75,0,0,1-13.05-31.37V76.62H171V178.33Z"/><path id="path5411-9" class="cls-1" d="M444.77,222.75a61.46,61.46,0,0,1-61.43-61.43q0-25.42,18-43.59a59.17,59.17,0,0,1,43.43-18q25.43,0,43.59,18,18,18.17,18,43.59a59.17,59.17,0,0,1-18,43.43Q470.2,222.75,444.77,222.75Zm0-148.28q-36,0-61.43,25.59V76.62H358.08V310.43h25.26v-88Q408.77,248,444.77,248t61.42-25.43q25.43-25.43,25.43-61.26T506.19,99.9Q480.77,74.47,444.77,74.47Z"/><path id="path5413" class="cls-1" d="M666,222.75a61.44,61.44,0,0,1-61.42-61.43q0-25.42,18-43.59a59.19,59.19,0,0,1,43.43-18q25.43,0,43.59,18,18,18.17,18,43.59a59.17,59.17,0,0,1-18,43.43q-18.17,18-43.59,18Zm0-148.28q-36,0-61.42,25.59V76.62H579.3V310.43h25.27v-88Q630,248,666,248t61.43-25.43q25.43-25.43,25.42-61.26T727.42,99.9Q702,74.47,666,74.47Z"/><path id="path5415" class="cls-1" d="M887.38,99.73a59.19,59.19,0,0,0-43.43,18q-18.15,18-18.16,43.43T844,204.75a61.39,61.39,0,0,0,86.86,0q18-18.17,18-43.59a61.46,61.46,0,0,0-61.43-61.43Zm0,148.28q-36,0-61.42-25.43t-25.43-61.42q0-35.83,25.43-61.26t61.42-25.43q35.83,0,61.26,25.43t25.43,61.26q0,36-25.43,61.42T887.38,248Z"/><path id="path5417" class="cls-1" d="M1091.27,74.47a67.36,67.36,0,0,0-44.25,16V76.62h-25.27V245.7H1047V144.15a42.78,42.78,0,0,1,13-31.37,42.23,42.23,0,0,1,31.21-13h3.14V74.47Z"/><path id="path5419" class="cls-1" d="M1142.09,46.23h25.26V76.29h29.73v25.26h-29.73v89a29.11,29.11,0,0,0,8.59,21.14,28.81,28.81,0,0,0,21.14,8.75V245.7a55,55,0,0,1-55-55.15V46.23Z"/><path id="path5421" class="cls-1" d="M1383.79,144q0-28.74-20.31-49.21-20.48-20.31-49.2-20.31a67.37,67.37,0,0,0-44.26,16V0h-25.26V245.7H1270V144a44.26,44.26,0,0,1,88.51,0V245.7h25.26V144Z"/><path id="path5423" class="cls-1" d="M1854.86,248a75.23,75.23,0,0,1-38-10.07,57.72,57.72,0,0,1-27.08-34.67l24.27-6.94a33.94,33.94,0,0,0,16.52,20.48q10.56,5.77,24.44,5.94c1.1,0,2.31-.06,3.63-.17s2.91-.27,4.46-.49a41.12,41.12,0,0,0,10.4-3.14q13.05-6.27,14.36-21.13a17.27,17.27,0,0,0-4.45-13q-8.27-9.74-27.25-10.9-38-2.48-54.32-19a37.69,37.69,0,0,1-9.25-14.69,43.08,43.08,0,0,1-2.15-13.71q0-24.11,18.83-38.8,17-13.22,41.28-13.21,28.56,0,47.72,20.31a72,72,0,0,1,10.56,14.37l3.47,7.26-23.61,8.92-2.31-4.46a51.31,51.31,0,0,0-6.44-8.75q-12.06-12.39-29.89-12.39-3.3.17-5.61.5a49.66,49.66,0,0,0-11.4,3q-17.32,6.78-17.33,23.28,0,10.9,13.87,16.68,10.56,4.29,28.23,5.45,16.51,1.15,28.9,7.43a51.77,51.77,0,0,1,15.85,12.22A41.14,41.14,0,0,1,1913,199.8q-1.82,23.44-19.81,36.49Q1877.31,248,1855,248Z"/><path id="path5425" class="cls-1" d="M1960.83,46.23h25.27V76.29h29.72v25.26H1986.1v89a29.59,29.59,0,0,0,29.72,29.89V245.7a55,55,0,0,1-55-55.15V46.23Z"/></g></g><g id="g5427"><path id="path5429" class="cls-1" d="M1586.9,22.88q-54.83,0-93.68,38.64-38.87,39.07-38.86,93.69t38.86,93.69q38.85,38.66,93.68,38.65,54.63,0,93.48-38.65,38.85-39.06,38.86-93.69t-38.86-93.69Q1641.52,22.88,1586.9,22.88Zm0,287.55a155.38,155.38,0,0,1-155.43-155.22,155,155,0,0,1,45.77-109.66,154.66,154.66,0,0,1,219.11,0A148.07,148.07,0,0,1,1729.81,95a151.17,151.17,0,0,1,12.31,60.22,152.77,152.77,0,0,1-12.31,60.45,148.59,148.59,0,0,1-33.46,49.22,152.59,152.59,0,0,1-109.45,45.55Z"/><g id="g5431-2"><path id="path5433" class="cls-2" d="M1654.54,227a45.62,45.62,0,1,0,0-91.24c-1.33,0-2.64.05-3.94.16a62.61,62.61,0,0,0-123.65.52,45.62,45.62,0,1,0-7.9,90.56Z"/></g></g></g></g></g></svg>
|
|
includes/js/rater-js-rtl.js
CHANGED
@@ -22,7 +22,7 @@
|
|
22 |
}
|
23 |
}
|
24 |
|
25 |
-
var stars =
|
26 |
var starSize = options.starSize || 16;
|
27 |
var step = options.step || 1;
|
28 |
var onHover = options.onHover;
|
@@ -52,6 +52,11 @@
|
|
52 |
disableText = "{rating}/{maxRating}";
|
53 |
}
|
54 |
|
|
|
|
|
|
|
|
|
|
|
55 |
if (typeof options.ratingText !== "undefined") {
|
56 |
ratingText = options.ratingText;
|
57 |
} else {
|
@@ -124,7 +129,6 @@
|
|
124 |
}
|
125 |
}
|
126 |
|
127 |
-
|
128 |
function onStarOut(e) {
|
129 |
if (typeof rating !== "undefined") {
|
130 |
elem.querySelector(".yasr-star-value").style.width = rating / stars * 100 + "%";
|
22 |
}
|
23 |
}
|
24 |
|
25 |
+
var stars = 5;
|
26 |
var starSize = options.starSize || 16;
|
27 |
var step = options.step || 1;
|
28 |
var onHover = options.onHover;
|
52 |
disableText = "{rating}/{maxRating}";
|
53 |
}
|
54 |
|
55 |
+
//if stars are not read only, add css cursors property to "pointer"
|
56 |
+
if(!disabled) {
|
57 |
+
elem.style.cursor = 'pointer';
|
58 |
+
}
|
59 |
+
|
60 |
if (typeof options.ratingText !== "undefined") {
|
61 |
ratingText = options.ratingText;
|
62 |
} else {
|
129 |
}
|
130 |
}
|
131 |
|
|
|
132 |
function onStarOut(e) {
|
133 |
if (typeof rating !== "undefined") {
|
134 |
elem.querySelector(".yasr-star-value").style.width = rating / stars * 100 + "%";
|
includes/js/rater-js.js
CHANGED
@@ -105,6 +105,10 @@
|
|
105 |
}
|
106 |
}
|
107 |
|
|
|
|
|
|
|
|
|
108 |
elem.querySelector(".yasr-star-value").style.width = currentRating / stars * 100 + "%";
|
109 |
|
110 |
if (showToolTip) {
|
105 |
}
|
106 |
}
|
107 |
|
108 |
+
if (currentRating > 5) {
|
109 |
+
currentRating = 5;
|
110 |
+
}
|
111 |
+
|
112 |
elem.querySelector(".yasr-star-value").style.width = currentRating / stars * 100 + "%";
|
113 |
|
114 |
if (showToolTip) {
|
includes/js/src/ranking.js
CHANGED
@@ -12,7 +12,7 @@ const { __ } = wp.i18n; // Import __() from wp.i18n
|
|
12 |
|
13 |
function YasrCallRaterJs (props) {
|
14 |
const id = 'yasr-ranking-element-' + uuidv4();
|
15 |
-
const size =
|
16 |
|
17 |
return (
|
18 |
<div id={id} ref={() =>
|
@@ -54,8 +54,7 @@ function YasrTextAfterStars (props) {
|
|
54 |
</span>
|
55 |
)
|
56 |
}
|
57 |
-
|
58 |
-
const text = window[props.tableId].custom_text;
|
59 |
|
60 |
return (
|
61 |
<span className='yasr-highest-rated-text'>
|
@@ -98,12 +97,21 @@ function YasrRankingTableLeftColumn (props) {
|
|
98 |
*/
|
99 |
function YasrRankingTableRightColumn (props) {
|
100 |
|
101 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
102 |
|
103 |
if (txtPosition === 'before') {
|
104 |
return (
|
105 |
<td className={props.colClass}>
|
106 |
-
<YasrTextAfterStars post={props.post} tableId={props.tableId}/>
|
107 |
<YasrCallRaterJs rating={props.post.rating} tableId={props.tableId}/>
|
108 |
</td>
|
109 |
)
|
@@ -112,7 +120,7 @@ function YasrRankingTableRightColumn (props) {
|
|
112 |
return (
|
113 |
<td className={props.colClass}>
|
114 |
<YasrCallRaterJs rating={props.post.rating} tableId={props.tableId}/>
|
115 |
-
<YasrTextAfterStars post={props.post} tableId={props.tableId}/>
|
116 |
</td>
|
117 |
)
|
118 |
}
|
@@ -145,7 +153,7 @@ function YasrRankingTableRow(props) {
|
|
145 |
return (
|
146 |
<tr className={props.trClass}>
|
147 |
<YasrRankingTableLeftColumn colClass={leftClass} post={props.post} />
|
148 |
-
<YasrRankingTableRightColumn colClass={rightClass} post={props.post} tableId={props.tableId}/>
|
149 |
</tr>
|
150 |
)
|
151 |
}
|
@@ -182,6 +190,7 @@ function YasrRankingTableRowMap(props) {
|
|
182 |
key={post.post_id}
|
183 |
source={props.source}
|
184 |
tableId={props.tableId}
|
|
|
185 |
post={post}
|
186 |
trClass={trClass}
|
187 |
/>
|
@@ -204,10 +213,11 @@ class YasrRanking extends React.Component {
|
|
204 |
error: null,
|
205 |
isLoaded: false,
|
206 |
data: [],
|
207 |
-
tableId:
|
208 |
-
source:
|
209 |
-
|
210 |
};
|
|
|
211 |
}
|
212 |
|
213 |
/**
|
@@ -218,6 +228,7 @@ class YasrRanking extends React.Component {
|
|
218 |
* if ajax is disabled or error with rest response are found
|
219 |
*/
|
220 |
componentDidMount() {
|
|
|
221 |
let data = {};
|
222 |
|
223 |
//If ajax is disabled, use global value
|
@@ -225,7 +236,7 @@ class YasrRanking extends React.Component {
|
|
225 |
console.info(__('Ajax Disabled, getting data from source', 'yet-another-stars-rating'));
|
226 |
this.setState({
|
227 |
isLoaded: true,
|
228 |
-
data:
|
229 |
});
|
230 |
}
|
231 |
else {
|
@@ -246,7 +257,7 @@ class YasrRanking extends React.Component {
|
|
246 |
*/
|
247 |
.then(response => {
|
248 |
if (response === 'KO') {
|
249 |
-
data =
|
250 |
} else {
|
251 |
if(response.source === 'overall_rating') {
|
252 |
data = response;
|
@@ -260,7 +271,7 @@ class YasrRanking extends React.Component {
|
|
260 |
}
|
261 |
})
|
262 |
.catch((error) => {
|
263 |
-
data =
|
264 |
console.info(__(error));
|
265 |
})
|
266 |
))
|
@@ -296,28 +307,61 @@ class YasrRanking extends React.Component {
|
|
296 |
* @return array of urls
|
297 |
*/
|
298 |
returnRestUrl(){
|
299 |
-
let queryParams = ((this.state.
|
300 |
let dataSource = this.state.source;
|
301 |
let urlYasrRankingApi = false;
|
302 |
const yasrRankingsApiPath = 'yet-another-stars-rating/v1/yasr-rankings/';
|
303 |
|
304 |
-
|
305 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
306 |
}
|
307 |
|
308 |
if(dataSource === 'overall_rating') {
|
309 |
-
urlYasrRankingApi = [yasrCommonData.restEndpoint + yasrRankingsApiPath + '?source=' + dataSource +
|
310 |
}
|
|
|
311 |
if(dataSource === 'visitor_votes') {
|
312 |
let requiredMost = '';
|
313 |
let requiredHighest = '';
|
314 |
-
|
315 |
-
|
316 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
317 |
}
|
|
|
318 |
urlYasrRankingApi = [
|
319 |
-
yasrCommonData.restEndpoint + yasrRankingsApiPath + '?show=most&source=' + dataSource +
|
320 |
-
yasrCommonData.restEndpoint + yasrRankingsApiPath + '?show=highest&source=' + dataSource +
|
321 |
];
|
322 |
|
323 |
}
|
@@ -333,13 +377,12 @@ class YasrRanking extends React.Component {
|
|
333 |
*
|
334 |
* @return {JSX.Element} - html <thead> element
|
335 |
*/
|
336 |
-
rankingTableHead(source) {
|
337 |
const tableId = this.state.tableId;
|
338 |
const idLinkMost = 'link-most-rated-posts-'+tableId;
|
339 |
const idLinkHighest = 'link-highest-rated-posts-'+tableId;
|
340 |
|
341 |
if(source === 'visitor_votes') {
|
342 |
-
const defaultView = window[this.state.tableId].view;
|
343 |
let containerLink = <span>
|
344 |
<span id={idLinkMost}>
|
345 |
{__('Most Rated', 'yet-another-stars-rating')}
|
@@ -438,14 +481,14 @@ class YasrRanking extends React.Component {
|
|
438 |
* @return {JSX.Element} - html <tbody> element
|
439 |
*/
|
440 |
rankingTableBody() {
|
441 |
-
const {data, source} = this.state;
|
442 |
-
|
443 |
if(source === 'overall_rating') {
|
444 |
return (
|
445 |
<YasrRankingTableRowMap
|
446 |
data={data.data_overall}
|
447 |
tableId={this.state.tableId}
|
448 |
tBodyId={'overall_'+this.state.tableId}
|
|
|
449 |
show={'table-row-group'}
|
450 |
source={source}
|
451 |
/>
|
@@ -455,13 +498,19 @@ class YasrRanking extends React.Component {
|
|
455 |
if(source === 'visitor_votes') {
|
456 |
const vvMost = data.most;
|
457 |
const vvHighest = data.highest;
|
458 |
-
const defaultView = window[this.state.tableId].view
|
459 |
const display = 'table-row-group';
|
460 |
const hide = 'none';
|
461 |
|
|
|
462 |
let styleMost = display;
|
463 |
let styleHighest = hide;
|
464 |
|
|
|
|
|
|
|
|
|
|
|
|
|
465 |
if(defaultView === 'highest') {
|
466 |
styleMost = hide;
|
467 |
styleHighest = display;
|
@@ -469,11 +518,12 @@ class YasrRanking extends React.Component {
|
|
469 |
|
470 |
return (
|
471 |
<>
|
472 |
-
{this.rankingTableHead(source)}
|
473 |
<YasrRankingTableRowMap
|
474 |
data={vvMost}
|
475 |
tableId={this.state.tableId}
|
476 |
tBodyId={'most-rated-posts-'+this.state.tableId}
|
|
|
477 |
show={styleMost}
|
478 |
source={source}
|
479 |
/>
|
@@ -481,6 +531,7 @@ class YasrRanking extends React.Component {
|
|
481 |
data={vvHighest}
|
482 |
tableId={this.state.tableId}
|
483 |
tBodyId={'highest-rated-posts-'+this.state.tableId}
|
|
|
484 |
show={styleHighest}
|
485 |
source={source}
|
486 |
/>
|
@@ -535,7 +586,8 @@ export function yasrDrawRankings () {
|
|
535 |
if (yasrRankingsInDom.length > 0) {
|
536 |
for (let i = 0; i < yasrRankingsInDom.length; i++) {
|
537 |
const tableId = yasrRankingsInDom.item(i).id;
|
538 |
-
const source =
|
|
|
539 |
const rankingTable = document.getElementById(tableId);
|
540 |
|
541 |
let dataSource = false
|
@@ -543,7 +595,7 @@ export function yasrDrawRankings () {
|
|
543 |
dataSource = source;
|
544 |
}
|
545 |
|
546 |
-
ReactDOM.render(<YasrRanking source={dataSource} tableId={tableId}/>, rankingTable);
|
547 |
}
|
548 |
}
|
549 |
|
12 |
|
13 |
function YasrCallRaterJs (props) {
|
14 |
const id = 'yasr-ranking-element-' + uuidv4();
|
15 |
+
const size = document.getElementById(props.tableId).dataset.rankingSize;
|
16 |
|
17 |
return (
|
18 |
<div id={id} ref={() =>
|
54 |
</span>
|
55 |
)
|
56 |
}
|
57 |
+
const text = props.text;
|
|
|
58 |
|
59 |
return (
|
60 |
<span className='yasr-highest-rated-text'>
|
97 |
*/
|
98 |
function YasrRankingTableRightColumn (props) {
|
99 |
|
100 |
+
let txtPosition = 'after';
|
101 |
+
let cstText = __('Rating:' , 'yet-another-stars-rating');
|
102 |
+
|
103 |
+
let params = new URLSearchParams(props.rankingParams);
|
104 |
+
if(params.get('text_position') !== null) {
|
105 |
+
txtPosition = params.get('text_position');
|
106 |
+
}
|
107 |
+
if(params.get('custom_txt') !== null) {
|
108 |
+
cstText = params.get('custom_txt');
|
109 |
+
}
|
110 |
|
111 |
if (txtPosition === 'before') {
|
112 |
return (
|
113 |
<td className={props.colClass}>
|
114 |
+
<YasrTextAfterStars post={props.post} tableId={props.tableId} text={cstText}/>
|
115 |
<YasrCallRaterJs rating={props.post.rating} tableId={props.tableId}/>
|
116 |
</td>
|
117 |
)
|
120 |
return (
|
121 |
<td className={props.colClass}>
|
122 |
<YasrCallRaterJs rating={props.post.rating} tableId={props.tableId}/>
|
123 |
+
<YasrTextAfterStars post={props.post} tableId={props.tableId} text={cstText}/>
|
124 |
</td>
|
125 |
)
|
126 |
}
|
153 |
return (
|
154 |
<tr className={props.trClass}>
|
155 |
<YasrRankingTableLeftColumn colClass={leftClass} post={props.post} />
|
156 |
+
<YasrRankingTableRightColumn colClass={rightClass} post={props.post} tableId={props.tableId} rankingParams={props.rankingParams}/>
|
157 |
</tr>
|
158 |
)
|
159 |
}
|
190 |
key={post.post_id}
|
191 |
source={props.source}
|
192 |
tableId={props.tableId}
|
193 |
+
rankingParams={props.rankingParams}
|
194 |
post={post}
|
195 |
trClass={trClass}
|
196 |
/>
|
213 |
error: null,
|
214 |
isLoaded: false,
|
215 |
data: [],
|
216 |
+
tableId: props.tableId,
|
217 |
+
source: props.source,
|
218 |
+
rankingParams: props.params
|
219 |
};
|
220 |
+
|
221 |
}
|
222 |
|
223 |
/**
|
228 |
* if ajax is disabled or error with rest response are found
|
229 |
*/
|
230 |
componentDidMount() {
|
231 |
+
const rankingData = JSON.parse(document.getElementById(this.state.tableId).dataset.rankingData);
|
232 |
let data = {};
|
233 |
|
234 |
//If ajax is disabled, use global value
|
236 |
console.info(__('Ajax Disabled, getting data from source', 'yet-another-stars-rating'));
|
237 |
this.setState({
|
238 |
isLoaded: true,
|
239 |
+
data: rankingData
|
240 |
});
|
241 |
}
|
242 |
else {
|
257 |
*/
|
258 |
.then(response => {
|
259 |
if (response === 'KO') {
|
260 |
+
data = rankingData;
|
261 |
} else {
|
262 |
if(response.source === 'overall_rating') {
|
263 |
data = response;
|
271 |
}
|
272 |
})
|
273 |
.catch((error) => {
|
274 |
+
data = rankingData;
|
275 |
console.info(__(error));
|
276 |
})
|
277 |
))
|
307 |
* @return array of urls
|
308 |
*/
|
309 |
returnRestUrl(){
|
310 |
+
let queryParams = ((this.state.rankingParams !== '') ? this.state.rankingParams : '');
|
311 |
let dataSource = this.state.source;
|
312 |
let urlYasrRankingApi = false;
|
313 |
const yasrRankingsApiPath = 'yet-another-stars-rating/v1/yasr-rankings/';
|
314 |
|
315 |
+
let cleanedQuery = '';
|
316 |
+
|
317 |
+
if (queryParams !== '' && queryParams !== false) {
|
318 |
+
let params = new URLSearchParams(queryParams);
|
319 |
+
|
320 |
+
if(params.get('order_by') !== null) {
|
321 |
+
cleanedQuery += 'order_by='+params.get('order_by');
|
322 |
+
}
|
323 |
+
|
324 |
+
if(params.get('limit') !== null) {
|
325 |
+
cleanedQuery += '&limit='+params.get('limit');
|
326 |
+
}
|
327 |
+
|
328 |
+
if(params.get('ctg') !== null) {
|
329 |
+
cleanedQuery += '&ctg='+params.get('ctg');
|
330 |
+
}
|
331 |
+
else if(params.get('cpt') !== null) {
|
332 |
+
cleanedQuery += '&cpt='+params.get('cpt');
|
333 |
+
}
|
334 |
+
|
335 |
+
if (cleanedQuery !== '') {
|
336 |
+
cleanedQuery = cleanedQuery.replace(/\s+/g, '');
|
337 |
+
cleanedQuery = '&'+cleanedQuery;
|
338 |
+
}
|
339 |
+
} else {
|
340 |
+
cleanedQuery = '';
|
341 |
}
|
342 |
|
343 |
if(dataSource === 'overall_rating') {
|
344 |
+
urlYasrRankingApi = [yasrCommonData.restEndpoint + yasrRankingsApiPath + '?source=' + dataSource + cleanedQuery];
|
345 |
}
|
346 |
+
|
347 |
if(dataSource === 'visitor_votes') {
|
348 |
let requiredMost = '';
|
349 |
let requiredHighest = '';
|
350 |
+
|
351 |
+
if(queryParams !== '') {
|
352 |
+
let params = new URLSearchParams(queryParams);
|
353 |
+
if (params.get('required_votes[most]') !== null) {
|
354 |
+
requiredMost = '&required_votes=' + params.get('required_votes[most]');
|
355 |
+
}
|
356 |
+
|
357 |
+
if (params.get('required_votes[highest]') !== null) {
|
358 |
+
requiredHighest = '&required_votes=' + params.get('required_votes[highest]');
|
359 |
+
}
|
360 |
}
|
361 |
+
|
362 |
urlYasrRankingApi = [
|
363 |
+
yasrCommonData.restEndpoint + yasrRankingsApiPath + '?show=most&source=' + dataSource + cleanedQuery + requiredMost,
|
364 |
+
yasrCommonData.restEndpoint + yasrRankingsApiPath + '?show=highest&source=' + dataSource + cleanedQuery + requiredHighest
|
365 |
];
|
366 |
|
367 |
}
|
377 |
*
|
378 |
* @return {JSX.Element} - html <thead> element
|
379 |
*/
|
380 |
+
rankingTableHead(source, defaultView) {
|
381 |
const tableId = this.state.tableId;
|
382 |
const idLinkMost = 'link-most-rated-posts-'+tableId;
|
383 |
const idLinkHighest = 'link-highest-rated-posts-'+tableId;
|
384 |
|
385 |
if(source === 'visitor_votes') {
|
|
|
386 |
let containerLink = <span>
|
387 |
<span id={idLinkMost}>
|
388 |
{__('Most Rated', 'yet-another-stars-rating')}
|
481 |
* @return {JSX.Element} - html <tbody> element
|
482 |
*/
|
483 |
rankingTableBody() {
|
484 |
+
const {data, source, rankingParams} = this.state;
|
|
|
485 |
if(source === 'overall_rating') {
|
486 |
return (
|
487 |
<YasrRankingTableRowMap
|
488 |
data={data.data_overall}
|
489 |
tableId={this.state.tableId}
|
490 |
tBodyId={'overall_'+this.state.tableId}
|
491 |
+
rankingParams={rankingParams}
|
492 |
show={'table-row-group'}
|
493 |
source={source}
|
494 |
/>
|
498 |
if(source === 'visitor_votes') {
|
499 |
const vvMost = data.most;
|
500 |
const vvHighest = data.highest;
|
|
|
501 |
const display = 'table-row-group';
|
502 |
const hide = 'none';
|
503 |
|
504 |
+
let defaultView = 'most';
|
505 |
let styleMost = display;
|
506 |
let styleHighest = hide;
|
507 |
|
508 |
+
let params = new URLSearchParams(rankingParams);
|
509 |
+
|
510 |
+
if(params.get('view') !== null) {
|
511 |
+
defaultView = params.get('view');
|
512 |
+
}
|
513 |
+
|
514 |
if(defaultView === 'highest') {
|
515 |
styleMost = hide;
|
516 |
styleHighest = display;
|
518 |
|
519 |
return (
|
520 |
<>
|
521 |
+
{this.rankingTableHead(source, defaultView)}
|
522 |
<YasrRankingTableRowMap
|
523 |
data={vvMost}
|
524 |
tableId={this.state.tableId}
|
525 |
tBodyId={'most-rated-posts-'+this.state.tableId}
|
526 |
+
rankingParams={rankingParams}
|
527 |
show={styleMost}
|
528 |
source={source}
|
529 |
/>
|
531 |
data={vvHighest}
|
532 |
tableId={this.state.tableId}
|
533 |
tBodyId={'highest-rated-posts-'+this.state.tableId}
|
534 |
+
rankingParams={rankingParams}
|
535 |
show={styleHighest}
|
536 |
source={source}
|
537 |
/>
|
586 |
if (yasrRankingsInDom.length > 0) {
|
587 |
for (let i = 0; i < yasrRankingsInDom.length; i++) {
|
588 |
const tableId = yasrRankingsInDom.item(i).id;
|
589 |
+
const source = yasrRankingsInDom.item(i).dataset.rankingSource;
|
590 |
+
const params = JSON.parse(yasrRankingsInDom.item(i).dataset.rankingParams);
|
591 |
const rankingTable = document.getElementById(tableId);
|
592 |
|
593 |
let dataSource = false
|
595 |
dataSource = source;
|
596 |
}
|
597 |
|
598 |
+
ReactDOM.render(<YasrRanking source={dataSource} tableId={tableId} params={params}/>, rankingTable);
|
599 |
}
|
600 |
}
|
601 |
|
includes/js/src/yasr-front.js
CHANGED
@@ -2,29 +2,21 @@ import React from "react";
|
|
2 |
import {yasrDrawRankings} from "./ranking";
|
3 |
|
4 |
const { __ } = wp.i18n; // Import __() from wp.i18n
|
|
|
5 |
|
6 |
/*** Constant used by yasr
|
7 |
-
|
8 |
yasrCommonData (postid, ajaxurl, loggedUser, visitorStatsEnabled, loaderHtml, tooltipValues')
|
9 |
-
|
10 |
***/
|
11 |
|
12 |
-
|
13 |
-
document.addEventListener('DOMContentLoaded', function(event) {
|
14 |
-
|
15 |
-
//Search and set all div with class yasr-rater-stars
|
16 |
-
yasrSearchStarsDom('yasr-rater-stars');
|
17 |
-
|
18 |
-
//Search and set all div with class yasr-rater-stars-vv
|
19 |
-
yasrSearchStarsDom('yasr-rater-stars-vv');
|
20 |
-
|
21 |
//Search and set all div with class yasr-multiset-visitors-rater
|
22 |
-
yasrSearchStarsDom(
|
|
|
|
|
|
|
|
|
23 |
|
24 |
-
//Drow Rankings
|
25 |
-
yasrDrawRankings();
|
26 |
|
27 |
-
});
|
28 |
|
29 |
/**
|
30 |
* Search for divs with defined classname
|
@@ -34,7 +26,6 @@ export function yasrSearchStarsDom (starsClass) {
|
|
34 |
const yasrRaterInDom = document.getElementsByClassName(starsClass);
|
35 |
//If so, call the function to set the rating
|
36 |
if (yasrRaterInDom.length > 0) {
|
37 |
-
|
38 |
//stars class for most shortcodes
|
39 |
if(starsClass === 'yasr-rater-stars' || starsClass === 'yasr-ranking-stars') {
|
40 |
yasrSetRating(yasrRaterInDom);
|
@@ -62,16 +53,16 @@ export function yasrSearchStarsDom (starsClass) {
|
|
62 |
function yasrDrawTipsProgress (yasrStatsInDom) {
|
63 |
|
64 |
//htmlcheckid declared false
|
65 |
-
|
66 |
|
67 |
-
for (
|
68 |
|
69 |
(function (i) {
|
70 |
|
71 |
-
|
72 |
-
|
73 |
|
74 |
-
|
75 |
action: 'yasr_stats_visitors_votes',
|
76 |
post_id: postId
|
77 |
};
|
@@ -79,7 +70,7 @@ function yasrDrawTipsProgress (yasrStatsInDom) {
|
|
79 |
//Convert in a string
|
80 |
//var dataToSend = jsObject_to_URLEncoded(data);
|
81 |
|
82 |
-
|
83 |
|
84 |
tippy(htmlId, {
|
85 |
content: initialContent,
|
@@ -133,9 +124,13 @@ function yasrSetRating (yasrRatingsInDom) {
|
|
133 |
|
134 |
//Check in the object
|
135 |
for (let i = 0; i < yasrRatingsInDom.length; i++) {
|
136 |
-
|
137 |
-
|
138 |
-
|
|
|
|
|
|
|
|
|
139 |
}
|
140 |
|
141 |
}
|
@@ -146,6 +141,11 @@ function yasrVisitorVotesFront (yasrRaterVVInDom) {
|
|
146 |
for (let i = 0; i < yasrRaterVVInDom.length; i++) {
|
147 |
|
148 |
(function(i) {
|
|
|
|
|
|
|
|
|
|
|
149 |
|
150 |
let rating = yasrRaterVVInDom.item(i).getAttribute('data-rating');
|
151 |
let readonlyShortcode = yasrRaterVVInDom.item(i).getAttribute('data-readonly-attribute');
|
@@ -264,7 +264,6 @@ function yasrSetVisitorVotesRater (starSize, rating, postId, readonly, htmlId, u
|
|
264 |
showToolTip: false,
|
265 |
readOnly: readonly,
|
266 |
element: document.getElementById(htmlId),
|
267 |
-
|
268 |
rateCallback: function rateCallback(rating, done) {
|
269 |
//show the loader
|
270 |
document.getElementById(loaderContainer).innerHTML = yasrCommonData.loaderHtml;
|
@@ -310,9 +309,13 @@ function yasrRaterVisitorsMultiSet (yasrMultiSetVisitorInDom) {
|
|
310 |
var ratingArray = [];
|
311 |
|
312 |
//Check in the object
|
313 |
-
for (
|
314 |
-
|
315 |
(function (i) {
|
|
|
|
|
|
|
|
|
|
|
316 |
|
317 |
var htmlId = yasrMultiSetVisitorInDom.item(i).id;
|
318 |
var readonly = yasrMultiSetVisitorInDom.item(i).getAttribute('data-rater-readonly');
|
@@ -329,8 +332,8 @@ function yasrRaterVisitorsMultiSet (yasrMultiSetVisitorInDom) {
|
|
329 |
|
330 |
rateCallback: function rateCallback(rating, done) {
|
331 |
|
332 |
-
var postId
|
333 |
-
var setId
|
334 |
var setIdField = elem.getAttribute('data-rater-set-field-id');
|
335 |
|
336 |
//Just leave 1 number after the .
|
@@ -361,7 +364,6 @@ function yasrRaterVisitorsMultiSet (yasrMultiSetVisitorInDom) {
|
|
361 |
}
|
362 |
|
363 |
jQuery('.yasr-send-visitor-multiset').on('click', function() {
|
364 |
-
|
365 |
const multiSetPostId = this.getAttribute('data-postid');
|
366 |
const multiSetId = this.getAttribute('data-setid');
|
367 |
const nonce = this.getAttribute('data-nonce');
|
2 |
import {yasrDrawRankings} from "./ranking";
|
3 |
|
4 |
const { __ } = wp.i18n; // Import __() from wp.i18n
|
5 |
+
const arrayClasses = ['yasr-rater-stars', 'yasr-rater-stars-vv', 'yasr-multiset-visitors-rater'];
|
6 |
|
7 |
/*** Constant used by yasr
|
|
|
8 |
yasrCommonData (postid, ajaxurl, loggedUser, visitorStatsEnabled, loaderHtml, tooltipValues')
|
|
|
9 |
***/
|
10 |
|
11 |
+
for (let i=0; i<arrayClasses.length; i++) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
//Search and set all div with class yasr-multiset-visitors-rater
|
13 |
+
yasrSearchStarsDom(arrayClasses[i]);
|
14 |
+
}
|
15 |
+
|
16 |
+
//Drow Rankings
|
17 |
+
yasrDrawRankings();
|
18 |
|
|
|
|
|
19 |
|
|
|
20 |
|
21 |
/**
|
22 |
* Search for divs with defined classname
|
26 |
const yasrRaterInDom = document.getElementsByClassName(starsClass);
|
27 |
//If so, call the function to set the rating
|
28 |
if (yasrRaterInDom.length > 0) {
|
|
|
29 |
//stars class for most shortcodes
|
30 |
if(starsClass === 'yasr-rater-stars' || starsClass === 'yasr-ranking-stars') {
|
31 |
yasrSetRating(yasrRaterInDom);
|
53 |
function yasrDrawTipsProgress (yasrStatsInDom) {
|
54 |
|
55 |
//htmlcheckid declared false
|
56 |
+
let htmlIdChecked = false;
|
57 |
|
58 |
+
for (let i = 0; i < yasrStatsInDom.length; i++) {
|
59 |
|
60 |
(function (i) {
|
61 |
|
62 |
+
let htmlId = '#'+yasrStatsInDom.item(i).id;
|
63 |
+
let postId = yasrStatsInDom.item(i).getAttribute('data-postid');
|
64 |
|
65 |
+
let data = {
|
66 |
action: 'yasr_stats_visitors_votes',
|
67 |
post_id: postId
|
68 |
};
|
70 |
//Convert in a string
|
71 |
//var dataToSend = jsObject_to_URLEncoded(data);
|
72 |
|
73 |
+
let initialContent = '<span style="color: #0a0a0a">Loading...</span>';
|
74 |
|
75 |
tippy(htmlId, {
|
76 |
content: initialContent,
|
124 |
|
125 |
//Check in the object
|
126 |
for (let i = 0; i < yasrRatingsInDom.length; i++) {
|
127 |
+
//yasr-star-rating is the class set by rater.js : so, if already exists,
|
128 |
+
//means that rater already run for the element
|
129 |
+
if(yasrRatingsInDom.item(i).classList.contains('yasr-star-rating') === false) {
|
130 |
+
const htmlId = yasrRatingsInDom.item(i).id;
|
131 |
+
const starSize = yasrRatingsInDom.item(i).getAttribute('data-rater-starsize');
|
132 |
+
yasrSetRaterValue(starSize, htmlId);
|
133 |
+
}
|
134 |
}
|
135 |
|
136 |
}
|
141 |
for (let i = 0; i < yasrRaterVVInDom.length; i++) {
|
142 |
|
143 |
(function(i) {
|
144 |
+
//yasr-star-rating is the class set by rater.js : so, if already exists,
|
145 |
+
//means that rater already run for the element
|
146 |
+
if(yasrRaterVVInDom.item(i).classList.contains('yasr-star-rating') !== false) {
|
147 |
+
return;
|
148 |
+
}
|
149 |
|
150 |
let rating = yasrRaterVVInDom.item(i).getAttribute('data-rating');
|
151 |
let readonlyShortcode = yasrRaterVVInDom.item(i).getAttribute('data-readonly-attribute');
|
264 |
showToolTip: false,
|
265 |
readOnly: readonly,
|
266 |
element: document.getElementById(htmlId),
|
|
|
267 |
rateCallback: function rateCallback(rating, done) {
|
268 |
//show the loader
|
269 |
document.getElementById(loaderContainer).innerHTML = yasrCommonData.loaderHtml;
|
309 |
var ratingArray = [];
|
310 |
|
311 |
//Check in the object
|
312 |
+
for (let i = 0; i < yasrMultiSetVisitorInDom.length; i++) {
|
|
|
313 |
(function (i) {
|
314 |
+
//yasr-star-rating is the class set by rater.js : so, if already exists,
|
315 |
+
//means that rater already run for the element
|
316 |
+
if(yasrMultiSetVisitorInDom.item(i).classList.contains('yasr-star-rating') !== false) {
|
317 |
+
return;
|
318 |
+
}
|
319 |
|
320 |
var htmlId = yasrMultiSetVisitorInDom.item(i).id;
|
321 |
var readonly = yasrMultiSetVisitorInDom.item(i).getAttribute('data-rater-readonly');
|
332 |
|
333 |
rateCallback: function rateCallback(rating, done) {
|
334 |
|
335 |
+
var postId = elem.getAttribute('data-rater-postid');
|
336 |
+
var setId = elem.getAttribute('data-rater-setid');
|
337 |
var setIdField = elem.getAttribute('data-rater-set-field-id');
|
338 |
|
339 |
//Just leave 1 number after the .
|
364 |
}
|
365 |
|
366 |
jQuery('.yasr-send-visitor-multiset').on('click', function() {
|
|
|
367 |
const multiSetPostId = this.getAttribute('data-postid');
|
368 |
const multiSetId = this.getAttribute('data-setid');
|
369 |
const nonce = this.getAttribute('data-nonce');
|
includes/js/yasr-front.js
CHANGED
@@ -11,7 +11,7 @@ object-assign
|
|
11 |
*
|
12 |
* This source code is licensed under the MIT license found in the
|
13 |
* LICENSE file in the root directory of this source tree.
|
14 |
-
*/var r=n(1),a=60103,l=60106;t.Fragment=60107,t.StrictMode=60108,t.Profiler=60114;var o=60109,i=60110,u=60112;t.Suspense=60113;var s=60115,c=60116;if("function"==typeof Symbol&&Symbol.for){var f=Symbol.for;a=f("react.element"),l=f("react.portal"),t.Fragment=f("react.fragment"),t.StrictMode=f("react.strict_mode"),t.Profiler=f("react.profiler"),o=f("react.provider"),i=f("react.context"),u=f("react.forward_ref"),t.Suspense=f("react.suspense"),s=f("react.memo"),c=f("react.lazy")}var d="function"==typeof Symbol&&Symbol.iterator;function p(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var m={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},h={};function
|
15 |
/** @license React v17.0.1
|
16 |
* react-dom.production.min.js
|
17 |
*
|
@@ -19,7 +19,7 @@ object-assign
|
|
19 |
*
|
20 |
* This source code is licensed under the MIT license found in the
|
21 |
* LICENSE file in the root directory of this source tree.
|
22 |
-
*/var r=n(0),a=n(1),l=n(6);function o(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}if(!r)throw Error(o(227));var i=new Set,u={};function s(e,t){c(e,t),c(e+"Capture",t)}function c(e,t){for(u[e]=t,e=0;e<t.length;e++)i.add(t[e])}var f=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),d=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,p=Object.prototype.hasOwnProperty,m={},h={};function y(e,t,n,r,a,l,o){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=a,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=l,this.removeEmptyString=o}var v={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){v[e]=new y(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];v[t]=new y(t,1,!1,e[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){v[e]=new y(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){v[e]=new y(e,2,!1,e,null,!1,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){v[e]=new y(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){v[e]=new y(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){v[e]=new y(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){v[e]=new y(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){v[e]=new y(e,5,!1,e.toLowerCase(),null,!1,!1)}));var g=/[\-:]([a-z])/g;function b(e){return e[1].toUpperCase()}function w(e,t,n,r){var a=v.hasOwnProperty(t)?v[t]:null;(null!==a?0===a.type:!r&&(2<t.length&&("o"===t[0]||"O"===t[0])&&("n"===t[1]||"N"===t[1])))||(function(e,t,n,r){if(null==t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,a,r)&&(n=null),r||null===a?function(e){return!!p.call(h,e)||!p.call(m,e)&&(d.test(e)?h[e]=!0:(m[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):a.mustUseProperty?e[a.propertyName]=null===n?3!==a.type&&"":n:(t=a.attributeName,r=a.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(a=a.type)||4===a&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(g,b);v[t]=new y(t,1,!1,e,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(g,b);v[t]=new y(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(g,b);v[t]=new y(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){v[e]=new y(e,1,!1,e.toLowerCase(),null,!1,!1)})),v.xlinkHref=new y("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){v[e]=new y(e,1,!1,e.toLowerCase(),null,!0,!0)}));var k=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,E=60103,S=60106,_=60107,x=60108,C=60114,P=60109,T=60110,N=60112,L=60113,z=60120,O=60115,I=60116,M=60121,R=60128,D=60129,F=60130,j=60131;if("function"==typeof Symbol&&Symbol.for){var U=Symbol.for;E=U("react.element"),S=U("react.portal"),_=U("react.fragment"),x=U("react.strict_mode"),C=U("react.profiler"),P=U("react.provider"),T=U("react.context"),N=U("react.forward_ref"),L=U("react.suspense"),z=U("react.suspense_list"),O=U("react.memo"),I=U("react.lazy"),M=U("react.block"),U("react.scope"),R=U("react.opaque.id"),D=U("react.debug_trace_mode"),F=U("react.offscreen"),j=U("react.legacy_hidden")}var A,B="function"==typeof Symbol&&Symbol.iterator;function V(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=B&&e[B]||e["@@iterator"])?e:null}function H(e){if(void 0===A)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);A=t&&t[1]||""}return"\n"+A+e}var Q=!1;function $(e,t){if(!e||Q)return"";Q=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(e){var r=e}Reflect.construct(e,[],t)}else{try{t.call()}catch(e){r=e}e.call(t.prototype)}else{try{throw Error()}catch(e){r=e}e()}}catch(e){if(e&&r&&"string"==typeof e.stack){for(var a=e.stack.split("\n"),l=r.stack.split("\n"),o=a.length-1,i=l.length-1;1<=o&&0<=i&&a[o]!==l[i];)i--;for(;1<=o&&0<=i;o--,i--)if(a[o]!==l[i]){if(1!==o||1!==i)do{if(o--,0>--i||a[o]!==l[i])return"\n"+a[o].replace(" at new "," at ")}while(1<=o&&0<=i);break}}}finally{Q=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?H(e):""}function W(e){switch(e.tag){case 5:return H(e.type);case 16:return H("Lazy");case 13:return H("Suspense");case 19:return H("SuspenseList");case 0:case 2:case 15:return e=$(e.type,!1);case 11:return e=$(e.type.render,!1);case 22:return e=$(e.type._render,!1);case 1:return e=$(e.type,!0);default:return""}}function q(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case _:return"Fragment";case S:return"Portal";case C:return"Profiler";case x:return"StrictMode";case L:return"Suspense";case z:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case T:return(e.displayName||"Context")+".Consumer";case P:return(e._context.displayName||"Context")+".Provider";case N:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(""!==t?"ForwardRef("+t+")":"ForwardRef");case O:return q(e.type);case M:return q(e._render);case I:t=e._payload,e=e._init;try{return q(e(t))}catch(e){}}return null}function K(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function Y(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function X(e){e._valueTracker||(e._valueTracker=function(e){var t=Y(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var a=n.get,l=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return a.call(this)},set:function(e){r=""+e,l.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function G(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Y(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function J(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function Z(e,t){var n=t.checked;return a({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function ee(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=K(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function te(e,t){null!=(t=t.checked)&&w(e,"checked",t,!1)}function ne(e,t){te(e,t);var n=K(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?ae(e,t.type,n):t.hasOwnProperty("defaultValue")&&ae(e,t.type,K(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function re(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function ae(e,t,n){"number"===t&&J(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}function le(e,t){return e=a({children:void 0},t),(t=function(e){var t="";return r.Children.forEach(e,(function(e){null!=e&&(t+=e)})),t}(t.children))&&(e.children=t),e}function oe(e,t,n,r){if(e=e.options,t){t={};for(var a=0;a<n.length;a++)t["$"+n[a]]=!0;for(n=0;n<e.length;n++)a=t.hasOwnProperty("$"+e[n].value),e[n].selected!==a&&(e[n].selected=a),a&&r&&(e[n].defaultSelected=!0)}else{for(n=""+K(n),t=null,a=0;a<e.length;a++){if(e[a].value===n)return e[a].selected=!0,void(r&&(e[a].defaultSelected=!0));null!==t||e[a].disabled||(t=e[a])}null!==t&&(t.selected=!0)}}function ie(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(o(91));return a({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function ue(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(o(92));if(Array.isArray(n)){if(!(1>=n.length))throw Error(o(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:K(n)}}function se(e,t){var n=K(t.value),r=K(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function ce(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}var fe="http://www.w3.org/1999/xhtml",de="http://www.w3.org/2000/svg";function pe(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function me(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?pe(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var he,ye=function(e){return"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(t,n,r,a){MSApp.execUnsafeLocalFunction((function(){return e(t,n)}))}:e}((function(e,t){if(e.namespaceURI!==de||"innerHTML"in e)e.innerHTML=t;else{for((he=he||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=he.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}}));function ve(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var ge={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},be=["Webkit","ms","Moz","O"];function we(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||ge.hasOwnProperty(e)&&ge[e]?(""+t).trim():t+"px"}function ke(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),a=we(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,a):e[n]=a}}Object.keys(ge).forEach((function(e){be.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),ge[t]=ge[e]}))}));var Ee=a({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Se(e,t){if(t){if(Ee[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(o(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(o(60));if("object"!=typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(o(61))}if(null!=t.style&&"object"!=typeof t.style)throw Error(o(62))}}function _e(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}function xe(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var Ce=null,Pe=null,Te=null;function Ne(e){if(e=Jr(e)){if("function"!=typeof Ce)throw Error(o(280));var t=e.stateNode;t&&(t=ea(t),Ce(e.stateNode,e.type,t))}}function Le(e){Pe?Te?Te.push(e):Te=[e]:Pe=e}function ze(){if(Pe){var e=Pe,t=Te;if(Te=Pe=null,Ne(e),t)for(e=0;e<t.length;e++)Ne(t[e])}}function Oe(e,t){return e(t)}function Ie(e,t,n,r,a){return e(t,n,r,a)}function Me(){}var Re=Oe,De=!1,Fe=!1;function je(){null===Pe&&null===Te||(Me(),ze())}function Ue(e,t){var n=e.stateNode;if(null===n)return null;var r=ea(n);if(null===r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!=typeof n)throw Error(o(231,t,typeof n));return n}var Ae=!1;if(f)try{var Be={};Object.defineProperty(Be,"passive",{get:function(){Ae=!0}}),window.addEventListener("test",Be,Be),window.removeEventListener("test",Be,Be)}catch(e){Ae=!1}function Ve(e,t,n,r,a,l,o,i,u){var s=Array.prototype.slice.call(arguments,3);try{t.apply(n,s)}catch(e){this.onError(e)}}var He=!1,Qe=null,$e=!1,We=null,qe={onError:function(e){He=!0,Qe=e}};function Ke(e,t,n,r,a,l,o,i,u){He=!1,Qe=null,Ve.apply(qe,arguments)}function Ye(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!=(1026&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function Xe(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function Ge(e){if(Ye(e)!==e)throw Error(o(188))}function Je(e){if(!(e=function(e){var t=e.alternate;if(!t){if(null===(t=Ye(e)))throw Error(o(188));return t!==e?null:e}for(var n=e,r=t;;){var a=n.return;if(null===a)break;var l=a.alternate;if(null===l){if(null!==(r=a.return)){n=r;continue}break}if(a.child===l.child){for(l=a.child;l;){if(l===n)return Ge(a),e;if(l===r)return Ge(a),t;l=l.sibling}throw Error(o(188))}if(n.return!==r.return)n=a,r=l;else{for(var i=!1,u=a.child;u;){if(u===n){i=!0,n=a,r=l;break}if(u===r){i=!0,r=a,n=l;break}u=u.sibling}if(!i){for(u=l.child;u;){if(u===n){i=!0,n=l,r=a;break}if(u===r){i=!0,r=l,n=a;break}u=u.sibling}if(!i)throw Error(o(189))}}if(n.alternate!==r)throw Error(o(190))}if(3!==n.tag)throw Error(o(188));return n.stateNode.current===n?e:t}(e)))return null;for(var t=e;;){if(5===t.tag||6===t.tag)return t;if(t.child)t.child.return=t,t=t.child;else{if(t===e)break;for(;!t.sibling;){if(!t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}}return null}function Ze(e,t){for(var n=e.alternate;null!==t;){if(t===e||t===n)return!0;t=t.return}return!1}var et,tt,nt,rt,at=!1,lt=[],ot=null,it=null,ut=null,st=new Map,ct=new Map,ft=[],dt="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function pt(e,t,n,r,a){return{blockedOn:e,domEventName:t,eventSystemFlags:16|n,nativeEvent:a,targetContainers:[r]}}function mt(e,t){switch(e){case"focusin":case"focusout":ot=null;break;case"dragenter":case"dragleave":it=null;break;case"mouseover":case"mouseout":ut=null;break;case"pointerover":case"pointerout":st.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ct.delete(t.pointerId)}}function ht(e,t,n,r,a,l){return null===e||e.nativeEvent!==l?(e=pt(t,n,r,a,l),null!==t&&(null!==(t=Jr(t))&&tt(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==a&&-1===t.indexOf(a)&&t.push(a),e)}function yt(e){var t=Gr(e.target);if(null!==t){var n=Ye(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=Xe(n)))return e.blockedOn=t,void rt(e.lanePriority,(function(){l.unstable_runWithPriority(e.priority,(function(){nt(n)}))}))}else if(3===t&&n.stateNode.hydrate)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function vt(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=Jt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=Jr(n))&&tt(t),e.blockedOn=n,!1;t.shift()}return!0}function gt(e,t,n){vt(e)&&n.delete(t)}function bt(){for(at=!1;0<lt.length;){var e=lt[0];if(null!==e.blockedOn){null!==(e=Jr(e.blockedOn))&&et(e);break}for(var t=e.targetContainers;0<t.length;){var n=Jt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n){e.blockedOn=n;break}t.shift()}null===e.blockedOn&<.shift()}null!==ot&&vt(ot)&&(ot=null),null!==it&&vt(it)&&(it=null),null!==ut&&vt(ut)&&(ut=null),st.forEach(gt),ct.forEach(gt)}function wt(e,t){e.blockedOn===t&&(e.blockedOn=null,at||(at=!0,l.unstable_scheduleCallback(l.unstable_NormalPriority,bt)))}function kt(e){function t(t){return wt(t,e)}if(0<lt.length){wt(lt[0],e);for(var n=1;n<lt.length;n++){var r=lt[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==ot&&wt(ot,e),null!==it&&wt(it,e),null!==ut&&wt(ut,e),st.forEach(t),ct.forEach(t),n=0;n<ft.length;n++)(r=ft[n]).blockedOn===e&&(r.blockedOn=null);for(;0<ft.length&&null===(n=ft[0]).blockedOn;)yt(n),null===n.blockedOn&&ft.shift()}function Et(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var St={animationend:Et("Animation","AnimationEnd"),animationiteration:Et("Animation","AnimationIteration"),animationstart:Et("Animation","AnimationStart"),transitionend:Et("Transition","TransitionEnd")},_t={},xt={};function Ct(e){if(_t[e])return _t[e];if(!St[e])return e;var t,n=St[e];for(t in n)if(n.hasOwnProperty(t)&&t in xt)return _t[e]=n[t];return e}f&&(xt=document.createElement("div").style,"AnimationEvent"in window||(delete St.animationend.animation,delete St.animationiteration.animation,delete St.animationstart.animation),"TransitionEvent"in window||delete St.transitionend.transition);var Pt=Ct("animationend"),Tt=Ct("animationiteration"),Nt=Ct("animationstart"),Lt=Ct("transitionend"),zt=new Map,Ot=new Map,It=["abort","abort",Pt,"animationEnd",Tt,"animationIteration",Nt,"animationStart","canplay","canPlay","canplaythrough","canPlayThrough","durationchange","durationChange","emptied","emptied","encrypted","encrypted","ended","ended","error","error","gotpointercapture","gotPointerCapture","load","load","loadeddata","loadedData","loadedmetadata","loadedMetadata","loadstart","loadStart","lostpointercapture","lostPointerCapture","playing","playing","progress","progress","seeking","seeking","stalled","stalled","suspend","suspend","timeupdate","timeUpdate",Lt,"transitionEnd","waiting","waiting"];function Mt(e,t){for(var n=0;n<e.length;n+=2){var r=e[n],a=e[n+1];a="on"+(a[0].toUpperCase()+a.slice(1)),Ot.set(r,t),zt.set(r,a),s(a,[r])}}(0,l.unstable_now)();var Rt=8;function Dt(e){if(0!=(1&e))return Rt=15,1;if(0!=(2&e))return Rt=14,2;if(0!=(4&e))return Rt=13,4;var t=24&e;return 0!==t?(Rt=12,t):0!=(32&e)?(Rt=11,32):0!==(t=192&e)?(Rt=10,t):0!=(256&e)?(Rt=9,256):0!==(t=3584&e)?(Rt=8,t):0!=(4096&e)?(Rt=7,4096):0!==(t=4186112&e)?(Rt=6,t):0!==(t=62914560&e)?(Rt=5,t):67108864&e?(Rt=4,67108864):0!=(134217728&e)?(Rt=3,134217728):0!==(t=805306368&e)?(Rt=2,t):0!=(1073741824&e)?(Rt=1,1073741824):(Rt=8,e)}function Ft(e,t){var n=e.pendingLanes;if(0===n)return Rt=0;var r=0,a=0,l=e.expiredLanes,o=e.suspendedLanes,i=e.pingedLanes;if(0!==l)r=l,a=Rt=15;else if(0!==(l=134217727&n)){var u=l&~o;0!==u?(r=Dt(u),a=Rt):0!==(i&=l)&&(r=Dt(i),a=Rt)}else 0!==(l=n&~o)?(r=Dt(l),a=Rt):0!==i&&(r=Dt(i),a=Rt);if(0===r)return 0;if(r=n&((0>(r=31-Ht(r))?0:1<<r)<<1)-1,0!==t&&t!==r&&0==(t&o)){if(Dt(t),a<=Rt)return t;Rt=a}if(0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)a=1<<(n=31-Ht(t)),r|=e[n],t&=~a;return r}function jt(e){return 0!==(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function Ut(e,t){switch(e){case 15:return 1;case 14:return 2;case 12:return 0===(e=At(24&~t))?Ut(10,t):e;case 10:return 0===(e=At(192&~t))?Ut(8,t):e;case 8:return 0===(e=At(3584&~t))&&(0===(e=At(4186112&~t))&&(e=512)),e;case 2:return 0===(t=At(805306368&~t))&&(t=268435456),t}throw Error(o(358,e))}function At(e){return e&-e}function Bt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Vt(e,t,n){e.pendingLanes|=t;var r=t-1;e.suspendedLanes&=r,e.pingedLanes&=r,(e=e.eventTimes)[t=31-Ht(t)]=n}var Ht=Math.clz32?Math.clz32:function(e){return 0===e?32:31-(Qt(e)/$t|0)|0},Qt=Math.log,$t=Math.LN2;var Wt=l.unstable_UserBlockingPriority,qt=l.unstable_runWithPriority,Kt=!0;function Yt(e,t,n,r){De||Me();var a=Gt,l=De;De=!0;try{Ie(a,e,t,n,r)}finally{(De=l)||je()}}function Xt(e,t,n,r){qt(Wt,Gt.bind(null,e,t,n,r))}function Gt(e,t,n,r){var a;if(Kt)if((a=0==(4&t))&&0<lt.length&&-1<dt.indexOf(e))e=pt(null,e,t,n,r),lt.push(e);else{var l=Jt(e,t,n,r);if(null===l)a&&mt(e,r);else{if(a){if(-1<dt.indexOf(e))return e=pt(l,e,t,n,r),void lt.push(e);if(function(e,t,n,r,a){switch(t){case"focusin":return ot=ht(ot,e,t,n,r,a),!0;case"dragenter":return it=ht(it,e,t,n,r,a),!0;case"mouseover":return ut=ht(ut,e,t,n,r,a),!0;case"pointerover":var l=a.pointerId;return st.set(l,ht(st.get(l)||null,e,t,n,r,a)),!0;case"gotpointercapture":return l=a.pointerId,ct.set(l,ht(ct.get(l)||null,e,t,n,r,a)),!0}return!1}(l,e,t,n,r))return;mt(e,r)}Lr(e,t,r,null,n)}}}function Jt(e,t,n,r){var a=xe(r);if(null!==(a=Gr(a))){var l=Ye(a);if(null===l)a=null;else{var o=l.tag;if(13===o){if(null!==(a=Xe(l)))return a;a=null}else if(3===o){if(l.stateNode.hydrate)return 3===l.tag?l.stateNode.containerInfo:null;a=null}else l!==a&&(a=null)}}return Lr(e,t,r,a,n),null}var Zt=null,en=null,tn=null;function nn(){if(tn)return tn;var e,t,n=en,r=n.length,a="value"in Zt?Zt.value:Zt.textContent,l=a.length;for(e=0;e<r&&n[e]===a[e];e++);var o=r-e;for(t=1;t<=o&&n[r-t]===a[l-t];t++);return tn=a.slice(e,1<t?1-t:void 0)}function rn(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function an(){return!0}function ln(){return!1}function on(e){function t(t,n,r,a,l){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=a,this.target=l,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(a):a[o]);return this.isDefaultPrevented=(null!=a.defaultPrevented?a.defaultPrevented:!1===a.returnValue)?an:ln,this.isPropagationStopped=ln,this}return a(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=an)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=an)},persist:function(){},isPersistent:an}),t}var un,sn,cn,fn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},dn=on(fn),pn=a({},fn,{view:0,detail:0}),mn=on(pn),hn=a({},pn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Cn,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==cn&&(cn&&"mousemove"===e.type?(un=e.screenX-cn.screenX,sn=e.screenY-cn.screenY):sn=un=0,cn=e),un)},movementY:function(e){return"movementY"in e?e.movementY:sn}}),yn=on(hn),vn=on(a({},hn,{dataTransfer:0})),gn=on(a({},pn,{relatedTarget:0})),bn=on(a({},fn,{animationName:0,elapsedTime:0,pseudoElement:0})),wn=on(a({},fn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}})),kn=on(a({},fn,{data:0})),En={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Sn={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},_n={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function xn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=_n[e])&&!!t[e]}function Cn(){return xn}var Pn=on(a({},pn,{key:function(e){if(e.key){var t=En[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=rn(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?Sn[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Cn,charCode:function(e){return"keypress"===e.type?rn(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?rn(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}})),Tn=on(a({},hn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Nn=on(a({},pn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Cn})),Ln=on(a({},fn,{propertyName:0,elapsedTime:0,pseudoElement:0})),zn=on(a({},hn,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),On=[9,13,27,32],In=f&&"CompositionEvent"in window,Mn=null;f&&"documentMode"in document&&(Mn=document.documentMode);var Rn=f&&"TextEvent"in window&&!Mn,Dn=f&&(!In||Mn&&8<Mn&&11>=Mn),Fn=String.fromCharCode(32),jn=!1;function Un(e,t){switch(e){case"keyup":return-1!==On.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function An(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var Bn=!1;var Vn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Hn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Vn[e.type]:"textarea"===t}function Qn(e,t,n,r){Le(r),0<(t=Or(t,"onChange")).length&&(n=new dn("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var $n=null,Wn=null;function qn(e){_r(e,0)}function Kn(e){if(G(Zr(e)))return e}function Yn(e,t){if("change"===e)return t}var Xn=!1;if(f){var Gn;if(f){var Jn="oninput"in document;if(!Jn){var Zn=document.createElement("div");Zn.setAttribute("oninput","return;"),Jn="function"==typeof Zn.oninput}Gn=Jn}else Gn=!1;Xn=Gn&&(!document.documentMode||9<document.documentMode)}function er(){$n&&($n.detachEvent("onpropertychange",tr),Wn=$n=null)}function tr(e){if("value"===e.propertyName&&Kn(Wn)){var t=[];if(Qn(t,Wn,e,xe(e)),e=qn,De)e(t);else{De=!0;try{Oe(e,t)}finally{De=!1,je()}}}}function nr(e,t,n){"focusin"===e?(er(),Wn=n,($n=t).attachEvent("onpropertychange",tr)):"focusout"===e&&er()}function rr(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Kn(Wn)}function ar(e,t){if("click"===e)return Kn(t)}function lr(e,t){if("input"===e||"change"===e)return Kn(t)}var or="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},ir=Object.prototype.hasOwnProperty;function ur(e,t){if(or(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++)if(!ir.call(t,n[r])||!or(e[n[r]],t[n[r]]))return!1;return!0}function sr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function cr(e,t){var n,r=sr(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=sr(r)}}function fr(){for(var e=window,t=J();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(e){n=!1}if(!n)break;t=J((e=t.contentWindow).document)}return t}function dr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}var pr=f&&"documentMode"in document&&11>=document.documentMode,mr=null,hr=null,yr=null,vr=!1;function gr(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;vr||null==mr||mr!==J(r)||("selectionStart"in(r=mr)&&dr(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},yr&&ur(yr,r)||(yr=r,0<(r=Or(hr,"onSelect")).length&&(t=new dn("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=mr)))}Mt("cancel cancel click click close close contextmenu contextMenu copy copy cut cut auxclick auxClick dblclick doubleClick dragend dragEnd dragstart dragStart drop drop focusin focus focusout blur input input invalid invalid keydown keyDown keypress keyPress keyup keyUp mousedown mouseDown mouseup mouseUp paste paste pause pause play play pointercancel pointerCancel pointerdown pointerDown pointerup pointerUp ratechange rateChange reset reset seeked seeked submit submit touchcancel touchCancel touchend touchEnd touchstart touchStart volumechange volumeChange".split(" "),0),Mt("drag drag dragenter dragEnter dragexit dragExit dragleave dragLeave dragover dragOver mousemove mouseMove mouseout mouseOut mouseover mouseOver pointermove pointerMove pointerout pointerOut pointerover pointerOver scroll scroll toggle toggle touchmove touchMove wheel wheel".split(" "),1),Mt(It,2);for(var br="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),wr=0;wr<br.length;wr++)Ot.set(br[wr],0);c("onMouseEnter",["mouseout","mouseover"]),c("onMouseLeave",["mouseout","mouseover"]),c("onPointerEnter",["pointerout","pointerover"]),c("onPointerLeave",["pointerout","pointerover"]),s("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),s("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),s("onBeforeInput",["compositionend","keypress","textInput","paste"]),s("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),s("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),s("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var kr="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Er=new Set("cancel close invalid load scroll toggle".split(" ").concat(kr));function Sr(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,r,a,l,i,u,s){if(Ke.apply(this,arguments),He){if(!He)throw Error(o(198));var c=Qe;He=!1,Qe=null,$e||($e=!0,We=c)}}(r,t,void 0,e),e.currentTarget=null}function _r(e,t){t=0!=(4&t);for(var n=0;n<e.length;n++){var r=e[n],a=r.event;r=r.listeners;e:{var l=void 0;if(t)for(var o=r.length-1;0<=o;o--){var i=r[o],u=i.instance,s=i.currentTarget;if(i=i.listener,u!==l&&a.isPropagationStopped())break e;Sr(a,i,s),l=u}else for(o=0;o<r.length;o++){if(u=(i=r[o]).instance,s=i.currentTarget,i=i.listener,u!==l&&a.isPropagationStopped())break e;Sr(a,i,s),l=u}}}if($e)throw e=We,$e=!1,We=null,e}function xr(e,t){var n=ta(t),r=e+"__bubble";n.has(r)||(Nr(t,e,2,!1),n.add(r))}var Cr="_reactListening"+Math.random().toString(36).slice(2);function Pr(e){e[Cr]||(e[Cr]=!0,i.forEach((function(t){Er.has(t)||Tr(t,!1,e,null),Tr(t,!0,e,null)})))}function Tr(e,t,n,r){var a=4<arguments.length&&void 0!==arguments[4]?arguments[4]:0,l=n;if("selectionchange"===e&&9!==n.nodeType&&(l=n.ownerDocument),null!==r&&!t&&Er.has(e)){if("scroll"!==e)return;a|=2,l=r}var o=ta(l),i=e+"__"+(t?"capture":"bubble");o.has(i)||(t&&(a|=4),Nr(l,e,a,t),o.add(i))}function Nr(e,t,n,r){var a=Ot.get(t);switch(void 0===a?2:a){case 0:a=Yt;break;case 1:a=Xt;break;default:a=Gt}n=a.bind(null,t,n,e),a=void 0,!Ae||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(a=!0),r?void 0!==a?e.addEventListener(t,n,{capture:!0,passive:a}):e.addEventListener(t,n,!0):void 0!==a?e.addEventListener(t,n,{passive:a}):e.addEventListener(t,n,!1)}function Lr(e,t,n,r,a){var l=r;if(0==(1&t)&&0==(2&t)&&null!==r)e:for(;;){if(null===r)return;var o=r.tag;if(3===o||4===o){var i=r.stateNode.containerInfo;if(i===a||8===i.nodeType&&i.parentNode===a)break;if(4===o)for(o=r.return;null!==o;){var u=o.tag;if((3===u||4===u)&&((u=o.stateNode.containerInfo)===a||8===u.nodeType&&u.parentNode===a))return;o=o.return}for(;null!==i;){if(null===(o=Gr(i)))return;if(5===(u=o.tag)||6===u){r=l=o;continue e}i=i.parentNode}}r=r.return}!function(e,t,n){if(Fe)return e(t,n);Fe=!0;try{Re(e,t,n)}finally{Fe=!1,je()}}((function(){var r=l,a=xe(n),o=[];e:{var i=zt.get(e);if(void 0!==i){var u=dn,s=e;switch(e){case"keypress":if(0===rn(n))break e;case"keydown":case"keyup":u=Pn;break;case"focusin":s="focus",u=gn;break;case"focusout":s="blur",u=gn;break;case"beforeblur":case"afterblur":u=gn;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":u=yn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":u=vn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":u=Nn;break;case Pt:case Tt:case Nt:u=bn;break;case Lt:u=Ln;break;case"scroll":u=mn;break;case"wheel":u=zn;break;case"copy":case"cut":case"paste":u=wn;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":u=Tn}var c=0!=(4&t),f=!c&&"scroll"===e,d=c?null!==i?i+"Capture":null:i;c=[];for(var p,m=r;null!==m;){var h=(p=m).stateNode;if(5===p.tag&&null!==h&&(p=h,null!==d&&(null!=(h=Ue(m,d))&&c.push(zr(m,h,p)))),f)break;m=m.return}0<c.length&&(i=new u(i,s,null,n,a),o.push({event:i,listeners:c}))}}if(0==(7&t)){if(u="mouseout"===e||"pointerout"===e,(!(i="mouseover"===e||"pointerover"===e)||0!=(16&t)||!(s=n.relatedTarget||n.fromElement)||!Gr(s)&&!s[Yr])&&(u||i)&&(i=a.window===a?a:(i=a.ownerDocument)?i.defaultView||i.parentWindow:window,u?(u=r,null!==(s=(s=n.relatedTarget||n.toElement)?Gr(s):null)&&(s!==(f=Ye(s))||5!==s.tag&&6!==s.tag)&&(s=null)):(u=null,s=r),u!==s)){if(c=yn,h="onMouseLeave",d="onMouseEnter",m="mouse","pointerout"!==e&&"pointerover"!==e||(c=Tn,h="onPointerLeave",d="onPointerEnter",m="pointer"),f=null==u?i:Zr(u),p=null==s?i:Zr(s),(i=new c(h,m+"leave",u,n,a)).target=f,i.relatedTarget=p,h=null,Gr(a)===r&&((c=new c(d,m+"enter",s,n,a)).target=p,c.relatedTarget=f,h=c),f=h,u&&s)e:{for(d=s,m=0,p=c=u;p;p=Ir(p))m++;for(p=0,h=d;h;h=Ir(h))p++;for(;0<m-p;)c=Ir(c),m--;for(;0<p-m;)d=Ir(d),p--;for(;m--;){if(c===d||null!==d&&c===d.alternate)break e;c=Ir(c),d=Ir(d)}c=null}else c=null;null!==u&&Mr(o,i,u,c,!1),null!==s&&null!==f&&Mr(o,f,s,c,!0)}if("select"===(u=(i=r?Zr(r):window).nodeName&&i.nodeName.toLowerCase())||"input"===u&&"file"===i.type)var y=Yn;else if(Hn(i))if(Xn)y=lr;else{y=rr;var v=nr}else(u=i.nodeName)&&"input"===u.toLowerCase()&&("checkbox"===i.type||"radio"===i.type)&&(y=ar);switch(y&&(y=y(e,r))?Qn(o,y,n,a):(v&&v(e,i,r),"focusout"===e&&(v=i._wrapperState)&&v.controlled&&"number"===i.type&&ae(i,"number",i.value)),v=r?Zr(r):window,e){case"focusin":(Hn(v)||"true"===v.contentEditable)&&(mr=v,hr=r,yr=null);break;case"focusout":yr=hr=mr=null;break;case"mousedown":vr=!0;break;case"contextmenu":case"mouseup":case"dragend":vr=!1,gr(o,n,a);break;case"selectionchange":if(pr)break;case"keydown":case"keyup":gr(o,n,a)}var g;if(In)e:{switch(e){case"compositionstart":var b="onCompositionStart";break e;case"compositionend":b="onCompositionEnd";break e;case"compositionupdate":b="onCompositionUpdate";break e}b=void 0}else Bn?Un(e,n)&&(b="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(b="onCompositionStart");b&&(Dn&&"ko"!==n.locale&&(Bn||"onCompositionStart"!==b?"onCompositionEnd"===b&&Bn&&(g=nn()):(en="value"in(Zt=a)?Zt.value:Zt.textContent,Bn=!0)),0<(v=Or(r,b)).length&&(b=new kn(b,e,null,n,a),o.push({event:b,listeners:v}),g?b.data=g:null!==(g=An(n))&&(b.data=g))),(g=Rn?function(e,t){switch(e){case"compositionend":return An(t);case"keypress":return 32!==t.which?null:(jn=!0,Fn);case"textInput":return(e=t.data)===Fn&&jn?null:e;default:return null}}(e,n):function(e,t){if(Bn)return"compositionend"===e||!In&&Un(e,t)?(e=nn(),tn=en=Zt=null,Bn=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Dn&&"ko"!==t.locale?null:t.data;default:return null}}(e,n))&&(0<(r=Or(r,"onBeforeInput")).length&&(a=new kn("onBeforeInput","beforeinput",null,n,a),o.push({event:a,listeners:r}),a.data=g))}_r(o,t)}))}function zr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Or(e,t){for(var n=t+"Capture",r=[];null!==e;){var a=e,l=a.stateNode;5===a.tag&&null!==l&&(a=l,null!=(l=Ue(e,n))&&r.unshift(zr(e,l,a)),null!=(l=Ue(e,t))&&r.push(zr(e,l,a))),e=e.return}return r}function Ir(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function Mr(e,t,n,r,a){for(var l=t._reactName,o=[];null!==n&&n!==r;){var i=n,u=i.alternate,s=i.stateNode;if(null!==u&&u===r)break;5===i.tag&&null!==s&&(i=s,a?null!=(u=Ue(n,l))&&o.unshift(zr(n,u,i)):a||null!=(u=Ue(n,l))&&o.push(zr(n,u,i))),n=n.return}0!==o.length&&e.push({event:t,listeners:o})}function Rr(){}var Dr=null,Fr=null;function jr(e,t){switch(e){case"button":case"input":case"select":case"textarea":return!!t.autoFocus}return!1}function Ur(e,t){return"textarea"===e||"option"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var Ar="function"==typeof setTimeout?setTimeout:void 0,Br="function"==typeof clearTimeout?clearTimeout:void 0;function Vr(e){1===e.nodeType?e.textContent="":9===e.nodeType&&(null!=(e=e.body)&&(e.textContent=""))}function Hr(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break}return e}function Qr(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var $r=0;var Wr=Math.random().toString(36).slice(2),qr="__reactFiber$"+Wr,Kr="__reactProps$"+Wr,Yr="__reactContainer$"+Wr,Xr="__reactEvents$"+Wr;function Gr(e){var t=e[qr];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Yr]||n[qr]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=Qr(e);null!==e;){if(n=e[qr])return n;e=Qr(e)}return t}n=(e=n).parentNode}return null}function Jr(e){return!(e=e[qr]||e[Yr])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function Zr(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(o(33))}function ea(e){return e[Kr]||null}function ta(e){var t=e[Xr];return void 0===t&&(t=e[Xr]=new Set),t}var na=[],ra=-1;function aa(e){return{current:e}}function la(e){0>ra||(e.current=na[ra],na[ra]=null,ra--)}function oa(e,t){ra++,na[ra]=e.current,e.current=t}var ia={},ua=aa(ia),sa=aa(!1),ca=ia;function fa(e,t){var n=e.type.contextTypes;if(!n)return ia;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var a,l={};for(a in n)l[a]=t[a];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=l),l}function da(e){return null!=(e=e.childContextTypes)}function pa(){la(sa),la(ua)}function ma(e,t,n){if(ua.current!==ia)throw Error(o(168));oa(ua,t),oa(sa,n)}function ha(e,t,n){var r=e.stateNode;if(e=t.childContextTypes,"function"!=typeof r.getChildContext)return n;for(var l in r=r.getChildContext())if(!(l in e))throw Error(o(108,q(t)||"Unknown",l));return a({},n,r)}function ya(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ia,ca=ua.current,oa(ua,e),oa(sa,sa.current),!0}function va(e,t,n){var r=e.stateNode;if(!r)throw Error(o(169));n?(e=ha(e,t,ca),r.__reactInternalMemoizedMergedChildContext=e,la(sa),la(ua),oa(ua,e)):la(sa),oa(sa,n)}var ga=null,ba=null,wa=l.unstable_runWithPriority,ka=l.unstable_scheduleCallback,Ea=l.unstable_cancelCallback,Sa=l.unstable_shouldYield,_a=l.unstable_requestPaint,xa=l.unstable_now,Ca=l.unstable_getCurrentPriorityLevel,Pa=l.unstable_ImmediatePriority,Ta=l.unstable_UserBlockingPriority,Na=l.unstable_NormalPriority,La=l.unstable_LowPriority,za=l.unstable_IdlePriority,Oa={},Ia=void 0!==_a?_a:function(){},Ma=null,Ra=null,Da=!1,Fa=xa(),ja=1e4>Fa?xa:function(){return xa()-Fa};function Ua(){switch(Ca()){case Pa:return 99;case Ta:return 98;case Na:return 97;case La:return 96;case za:return 95;default:throw Error(o(332))}}function Aa(e){switch(e){case 99:return Pa;case 98:return Ta;case 97:return Na;case 96:return La;case 95:return za;default:throw Error(o(332))}}function Ba(e,t){return e=Aa(e),wa(e,t)}function Va(e,t,n){return e=Aa(e),ka(e,t,n)}function Ha(){if(null!==Ra){var e=Ra;Ra=null,Ea(e)}Qa()}function Qa(){if(!Da&&null!==Ma){Da=!0;var e=0;try{var t=Ma;Ba(99,(function(){for(;e<t.length;e++){var n=t[e];do{n=n(!0)}while(null!==n)}})),Ma=null}catch(t){throw null!==Ma&&(Ma=Ma.slice(e+1)),ka(Pa,Ha),t}finally{Da=!1}}}var $a=k.ReactCurrentBatchConfig;function Wa(e,t){if(e&&e.defaultProps){for(var n in t=a({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}var qa=aa(null),Ka=null,Ya=null,Xa=null;function Ga(){Xa=Ya=Ka=null}function Ja(e){var t=qa.current;la(qa),e.type._context._currentValue=t}function Za(e,t){for(;null!==e;){var n=e.alternate;if((e.childLanes&t)===t){if(null===n||(n.childLanes&t)===t)break;n.childLanes|=t}else e.childLanes|=t,null!==n&&(n.childLanes|=t);e=e.return}}function el(e,t){Ka=e,Xa=Ya=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!=(e.lanes&t)&&(Oo=!0),e.firstContext=null)}function tl(e,t){if(Xa!==e&&!1!==t&&0!==t)if("number"==typeof t&&1073741823!==t||(Xa=e,t=1073741823),t={context:e,observedBits:t,next:null},null===Ya){if(null===Ka)throw Error(o(308));Ya=t,Ka.dependencies={lanes:0,firstContext:t,responders:null}}else Ya=Ya.next=t;return e._currentValue}var nl=!1;function rl(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null},effects:null}}function al(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function ll(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function ol(e,t){if(null!==(e=e.updateQueue)){var n=(e=e.shared).pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}}function il(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var a=null,l=null;if(null!==(n=n.firstBaseUpdate)){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===l?a=l=o:l=l.next=o,n=n.next}while(null!==n);null===l?a=l=t:l=l.next=t}else a=l=t;return n={baseState:r.baseState,firstBaseUpdate:a,lastBaseUpdate:l,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function ul(e,t,n,r){var l=e.updateQueue;nl=!1;var o=l.firstBaseUpdate,i=l.lastBaseUpdate,u=l.shared.pending;if(null!==u){l.shared.pending=null;var s=u,c=s.next;s.next=null,null===i?o=c:i.next=c,i=s;var f=e.alternate;if(null!==f){var d=(f=f.updateQueue).lastBaseUpdate;d!==i&&(null===d?f.firstBaseUpdate=c:d.next=c,f.lastBaseUpdate=s)}}if(null!==o){for(d=l.baseState,i=0,f=c=s=null;;){u=o.lane;var p=o.eventTime;if((r&u)===u){null!==f&&(f=f.next={eventTime:p,lane:0,tag:o.tag,payload:o.payload,callback:o.callback,next:null});e:{var m=e,h=o;switch(u=t,p=n,h.tag){case 1:if("function"==typeof(m=h.payload)){d=m.call(p,d,u);break e}d=m;break e;case 3:m.flags=-4097&m.flags|64;case 0:if(null==(u="function"==typeof(m=h.payload)?m.call(p,d,u):m))break e;d=a({},d,u);break e;case 2:nl=!0}}null!==o.callback&&(e.flags|=32,null===(u=l.effects)?l.effects=[o]:u.push(o))}else p={eventTime:p,lane:u,tag:o.tag,payload:o.payload,callback:o.callback,next:null},null===f?(c=f=p,s=d):f=f.next=p,i|=u;if(null===(o=o.next)){if(null===(u=l.shared.pending))break;o=u.next,u.next=null,l.lastBaseUpdate=u,l.shared.pending=null}}null===f&&(s=d),l.baseState=s,l.firstBaseUpdate=c,l.lastBaseUpdate=f,Mi|=i,e.lanes=i,e.memoizedState=d}}function sl(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],a=r.callback;if(null!==a){if(r.callback=null,r=n,"function"!=typeof a)throw Error(o(191,a));a.call(r)}}}var cl=(new r.Component).refs;function fl(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:a({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var dl={isMounted:function(e){return!!(e=e._reactInternals)&&Ye(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=lu(),a=ou(e),l=ll(r,a);l.payload=t,null!=n&&(l.callback=n),ol(e,l),iu(e,a,r)},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=lu(),a=ou(e),l=ll(r,a);l.tag=1,l.payload=t,null!=n&&(l.callback=n),ol(e,l),iu(e,a,r)},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=lu(),r=ou(e),a=ll(n,r);a.tag=2,null!=t&&(a.callback=t),ol(e,a),iu(e,r,n)}};function pl(e,t,n,r,a,l,o){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,l,o):!t.prototype||!t.prototype.isPureReactComponent||(!ur(n,r)||!ur(a,l))}function ml(e,t,n){var r=!1,a=ia,l=t.contextType;return"object"==typeof l&&null!==l?l=tl(l):(a=da(t)?ca:ua.current,l=(r=null!=(r=t.contextTypes))?fa(e,a):ia),t=new t(n,l),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=dl,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=a,e.__reactInternalMemoizedMaskedChildContext=l),t}function hl(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&dl.enqueueReplaceState(t,t.state,null)}function yl(e,t,n,r){var a=e.stateNode;a.props=n,a.state=e.memoizedState,a.refs=cl,rl(e);var l=t.contextType;"object"==typeof l&&null!==l?a.context=tl(l):(l=da(t)?ca:ua.current,a.context=fa(e,l)),ul(e,n,a,r),a.state=e.memoizedState,"function"==typeof(l=t.getDerivedStateFromProps)&&(fl(e,t,l,n),a.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof a.getSnapshotBeforeUpdate||"function"!=typeof a.UNSAFE_componentWillMount&&"function"!=typeof a.componentWillMount||(t=a.state,"function"==typeof a.componentWillMount&&a.componentWillMount(),"function"==typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount(),t!==a.state&&dl.enqueueReplaceState(a,a.state,null),ul(e,n,a,r),a.state=e.memoizedState),"function"==typeof a.componentDidMount&&(e.flags|=4)}var vl=Array.isArray;function gl(e,t,n){if(null!==(e=n.ref)&&"function"!=typeof e&&"object"!=typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(o(309));var r=n.stateNode}if(!r)throw Error(o(147,e));var a=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===a?t.ref:((t=function(e){var t=r.refs;t===cl&&(t=r.refs={}),null===e?delete t[a]:t[a]=e})._stringRef=a,t)}if("string"!=typeof e)throw Error(o(284));if(!n._owner)throw Error(o(290,e))}return e}function bl(e,t){if("textarea"!==e.type)throw Error(o(31,"[object Object]"===Object.prototype.toString.call(t)?"object with keys {"+Object.keys(t).join(", ")+"}":t))}function wl(e){function t(t,n){if(e){var r=t.lastEffect;null!==r?(r.nextEffect=n,t.lastEffect=n):t.firstEffect=t.lastEffect=n,n.nextEffect=null,n.flags=8}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function a(e,t){return(e=Uu(e,t)).index=0,e.sibling=null,e}function l(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags=2,n):r:(t.flags=2,n):n}function i(t){return e&&null===t.alternate&&(t.flags=2),t}function u(e,t,n,r){return null===t||6!==t.tag?((t=Hu(n,e.mode,r)).return=e,t):((t=a(t,n)).return=e,t)}function s(e,t,n,r){return null!==t&&t.elementType===n.type?((r=a(t,n.props)).ref=gl(e,t,n),r.return=e,r):((r=Au(n.type,n.key,n.props,null,e.mode,r)).ref=gl(e,t,n),r.return=e,r)}function c(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Qu(n,e.mode,r)).return=e,t):((t=a(t,n.children||[])).return=e,t)}function f(e,t,n,r,l){return null===t||7!==t.tag?((t=Bu(n,e.mode,r,l)).return=e,t):((t=a(t,n)).return=e,t)}function d(e,t,n){if("string"==typeof t||"number"==typeof t)return(t=Hu(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case E:return(n=Au(t.type,t.key,t.props,null,e.mode,n)).ref=gl(e,null,t),n.return=e,n;case S:return(t=Qu(t,e.mode,n)).return=e,t}if(vl(t)||V(t))return(t=Bu(t,e.mode,n,null)).return=e,t;bl(e,t)}return null}function p(e,t,n,r){var a=null!==t?t.key:null;if("string"==typeof n||"number"==typeof n)return null!==a?null:u(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case E:return n.key===a?n.type===_?f(e,t,n.props.children,r,a):s(e,t,n,r):null;case S:return n.key===a?c(e,t,n,r):null}if(vl(n)||V(n))return null!==a?null:f(e,t,n,r,null);bl(e,n)}return null}function m(e,t,n,r,a){if("string"==typeof r||"number"==typeof r)return u(t,e=e.get(n)||null,""+r,a);if("object"==typeof r&&null!==r){switch(r.$$typeof){case E:return e=e.get(null===r.key?n:r.key)||null,r.type===_?f(t,e,r.props.children,a,r.key):s(t,e,r,a);case S:return c(t,e=e.get(null===r.key?n:r.key)||null,r,a)}if(vl(r)||V(r))return f(t,e=e.get(n)||null,r,a,null);bl(t,r)}return null}function h(a,o,i,u){for(var s=null,c=null,f=o,h=o=0,y=null;null!==f&&h<i.length;h++){f.index>h?(y=f,f=null):y=f.sibling;var v=p(a,f,i[h],u);if(null===v){null===f&&(f=y);break}e&&f&&null===v.alternate&&t(a,f),o=l(v,o,h),null===c?s=v:c.sibling=v,c=v,f=y}if(h===i.length)return n(a,f),s;if(null===f){for(;h<i.length;h++)null!==(f=d(a,i[h],u))&&(o=l(f,o,h),null===c?s=f:c.sibling=f,c=f);return s}for(f=r(a,f);h<i.length;h++)null!==(y=m(f,a,h,i[h],u))&&(e&&null!==y.alternate&&f.delete(null===y.key?h:y.key),o=l(y,o,h),null===c?s=y:c.sibling=y,c=y);return e&&f.forEach((function(e){return t(a,e)})),s}function y(a,i,u,s){var c=V(u);if("function"!=typeof c)throw Error(o(150));if(null==(u=c.call(u)))throw Error(o(151));for(var f=c=null,h=i,y=i=0,v=null,g=u.next();null!==h&&!g.done;y++,g=u.next()){h.index>y?(v=h,h=null):v=h.sibling;var b=p(a,h,g.value,s);if(null===b){null===h&&(h=v);break}e&&h&&null===b.alternate&&t(a,h),i=l(b,i,y),null===f?c=b:f.sibling=b,f=b,h=v}if(g.done)return n(a,h),c;if(null===h){for(;!g.done;y++,g=u.next())null!==(g=d(a,g.value,s))&&(i=l(g,i,y),null===f?c=g:f.sibling=g,f=g);return c}for(h=r(a,h);!g.done;y++,g=u.next())null!==(g=m(h,a,y,g.value,s))&&(e&&null!==g.alternate&&h.delete(null===g.key?y:g.key),i=l(g,i,y),null===f?c=g:f.sibling=g,f=g);return e&&h.forEach((function(e){return t(a,e)})),c}return function(e,r,l,u){var s="object"==typeof l&&null!==l&&l.type===_&&null===l.key;s&&(l=l.props.children);var c="object"==typeof l&&null!==l;if(c)switch(l.$$typeof){case E:e:{for(c=l.key,s=r;null!==s;){if(s.key===c){switch(s.tag){case 7:if(l.type===_){n(e,s.sibling),(r=a(s,l.props.children)).return=e,e=r;break e}break;default:if(s.elementType===l.type){n(e,s.sibling),(r=a(s,l.props)).ref=gl(e,s,l),r.return=e,e=r;break e}}n(e,s);break}t(e,s),s=s.sibling}l.type===_?((r=Bu(l.props.children,e.mode,u,l.key)).return=e,e=r):((u=Au(l.type,l.key,l.props,null,e.mode,u)).ref=gl(e,r,l),u.return=e,e=u)}return i(e);case S:e:{for(s=l.key;null!==r;){if(r.key===s){if(4===r.tag&&r.stateNode.containerInfo===l.containerInfo&&r.stateNode.implementation===l.implementation){n(e,r.sibling),(r=a(r,l.children||[])).return=e,e=r;break e}n(e,r);break}t(e,r),r=r.sibling}(r=Qu(l,e.mode,u)).return=e,e=r}return i(e)}if("string"==typeof l||"number"==typeof l)return l=""+l,null!==r&&6===r.tag?(n(e,r.sibling),(r=a(r,l)).return=e,e=r):(n(e,r),(r=Hu(l,e.mode,u)).return=e,e=r),i(e);if(vl(l))return h(e,r,l,u);if(V(l))return y(e,r,l,u);if(c&&bl(e,l),void 0===l&&!s)switch(e.tag){case 1:case 22:case 0:case 11:case 15:throw Error(o(152,q(e.type)||"Component"))}return n(e,r)}}var kl=wl(!0),El=wl(!1),Sl={},_l=aa(Sl),xl=aa(Sl),Cl=aa(Sl);function Pl(e){if(e===Sl)throw Error(o(174));return e}function Tl(e,t){switch(oa(Cl,t),oa(xl,e),oa(_l,Sl),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:me(null,"");break;default:t=me(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}la(_l),oa(_l,t)}function Nl(){la(_l),la(xl),la(Cl)}function Ll(e){Pl(Cl.current);var t=Pl(_l.current),n=me(t,e.type);t!==n&&(oa(xl,e),oa(_l,n))}function zl(e){xl.current===e&&(la(_l),la(xl))}var Ol=aa(0);function Il(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!=(64&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Ml=null,Rl=null,Dl=!1;function Fl(e,t){var n=Fu(5,null,null,0);n.elementType="DELETED",n.type="DELETED",n.stateNode=t,n.return=e,n.flags=8,null!==e.lastEffect?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n}function jl(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,!0);case 13:default:return!1}}function Ul(e){if(Dl){var t=Rl;if(t){var n=t;if(!jl(e,t)){if(!(t=Hr(n.nextSibling))||!jl(e,t))return e.flags=-1025&e.flags|2,Dl=!1,void(Ml=e);Fl(Ml,n)}Ml=e,Rl=Hr(t.firstChild)}else e.flags=-1025&e.flags|2,Dl=!1,Ml=e}}function Al(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;Ml=e}function Bl(e){if(e!==Ml)return!1;if(!Dl)return Al(e),Dl=!0,!1;var t=e.type;if(5!==e.tag||"head"!==t&&"body"!==t&&!Ur(t,e.memoizedProps))for(t=Rl;t;)Fl(e,t),t=Hr(t.nextSibling);if(Al(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(o(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){Rl=Hr(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}Rl=null}}else Rl=Ml?Hr(e.stateNode.nextSibling):null;return!0}function Vl(){Rl=Ml=null,Dl=!1}var Hl=[];function Ql(){for(var e=0;e<Hl.length;e++)Hl[e]._workInProgressVersionPrimary=null;Hl.length=0}var $l=k.ReactCurrentDispatcher,Wl=k.ReactCurrentBatchConfig,ql=0,Kl=null,Yl=null,Xl=null,Gl=!1,Jl=!1;function Zl(){throw Error(o(321))}function eo(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!or(e[n],t[n]))return!1;return!0}function to(e,t,n,r,a,l){if(ql=l,Kl=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,$l.current=null===e||null===e.memoizedState?To:No,e=n(r,a),Jl){l=0;do{if(Jl=!1,!(25>l))throw Error(o(301));l+=1,Xl=Yl=null,t.updateQueue=null,$l.current=Lo,e=n(r,a)}while(Jl)}if($l.current=Po,t=null!==Yl&&null!==Yl.next,ql=0,Xl=Yl=Kl=null,Gl=!1,t)throw Error(o(300));return e}function no(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===Xl?Kl.memoizedState=Xl=e:Xl=Xl.next=e,Xl}function ro(){if(null===Yl){var e=Kl.alternate;e=null!==e?e.memoizedState:null}else e=Yl.next;var t=null===Xl?Kl.memoizedState:Xl.next;if(null!==t)Xl=t,Yl=e;else{if(null===e)throw Error(o(310));e={memoizedState:(Yl=e).memoizedState,baseState:Yl.baseState,baseQueue:Yl.baseQueue,queue:Yl.queue,next:null},null===Xl?Kl.memoizedState=Xl=e:Xl=Xl.next=e}return Xl}function ao(e,t){return"function"==typeof t?t(e):t}function lo(e){var t=ro(),n=t.queue;if(null===n)throw Error(o(311));n.lastRenderedReducer=e;var r=Yl,a=r.baseQueue,l=n.pending;if(null!==l){if(null!==a){var i=a.next;a.next=l.next,l.next=i}r.baseQueue=a=l,n.pending=null}if(null!==a){a=a.next,r=r.baseState;var u=i=l=null,s=a;do{var c=s.lane;if((ql&c)===c)null!==u&&(u=u.next={lane:0,action:s.action,eagerReducer:s.eagerReducer,eagerState:s.eagerState,next:null}),r=s.eagerReducer===e?s.eagerState:e(r,s.action);else{var f={lane:c,action:s.action,eagerReducer:s.eagerReducer,eagerState:s.eagerState,next:null};null===u?(i=u=f,l=r):u=u.next=f,Kl.lanes|=c,Mi|=c}s=s.next}while(null!==s&&s!==a);null===u?l=r:u.next=i,or(r,t.memoizedState)||(Oo=!0),t.memoizedState=r,t.baseState=l,t.baseQueue=u,n.lastRenderedState=r}return[t.memoizedState,n.dispatch]}function oo(e){var t=ro(),n=t.queue;if(null===n)throw Error(o(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,l=t.memoizedState;if(null!==a){n.pending=null;var i=a=a.next;do{l=e(l,i.action),i=i.next}while(i!==a);or(l,t.memoizedState)||(Oo=!0),t.memoizedState=l,null===t.baseQueue&&(t.baseState=l),n.lastRenderedState=l}return[l,r]}function io(e,t,n){var r=t._getVersion;r=r(t._source);var a=t._workInProgressVersionPrimary;if(null!==a?e=a===r:(e=e.mutableReadLanes,(e=(ql&e)===e)&&(t._workInProgressVersionPrimary=r,Hl.push(t))),e)return n(t._source);throw Hl.push(t),Error(o(350))}function uo(e,t,n,r){var a=Ci;if(null===a)throw Error(o(349));var l=t._getVersion,i=l(t._source),u=$l.current,s=u.useState((function(){return io(a,t,n)})),c=s[1],f=s[0];s=Xl;var d=e.memoizedState,p=d.refs,m=p.getSnapshot,h=d.source;d=d.subscribe;var y=Kl;return e.memoizedState={refs:p,source:t,subscribe:r},u.useEffect((function(){p.getSnapshot=n,p.setSnapshot=c;var e=l(t._source);if(!or(i,e)){e=n(t._source),or(f,e)||(c(e),e=ou(y),a.mutableReadLanes|=e&a.pendingLanes),e=a.mutableReadLanes,a.entangledLanes|=e;for(var r=a.entanglements,o=e;0<o;){var u=31-Ht(o),s=1<<u;r[u]|=e,o&=~s}}}),[n,t,r]),u.useEffect((function(){return r(t._source,(function(){var e=p.getSnapshot,n=p.setSnapshot;try{n(e(t._source));var r=ou(y);a.mutableReadLanes|=r&a.pendingLanes}catch(e){n((function(){throw e}))}}))}),[t,r]),or(m,n)&&or(h,t)&&or(d,r)||((e={pending:null,dispatch:null,lastRenderedReducer:ao,lastRenderedState:f}).dispatch=c=Co.bind(null,Kl,e),s.queue=e,s.baseQueue=null,f=io(a,t,n),s.memoizedState=s.baseState=f),f}function so(e,t,n){return uo(ro(),e,t,n)}function co(e){var t=no();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e=(e=t.queue={pending:null,dispatch:null,lastRenderedReducer:ao,lastRenderedState:e}).dispatch=Co.bind(null,Kl,e),[t.memoizedState,e]}function fo(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=Kl.updateQueue)?(t={lastEffect:null},Kl.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function po(e){return e={current:e},no().memoizedState=e}function mo(){return ro().memoizedState}function ho(e,t,n,r){var a=no();Kl.flags|=e,a.memoizedState=fo(1|t,n,void 0,void 0===r?null:r)}function yo(e,t,n,r){var a=ro();r=void 0===r?null:r;var l=void 0;if(null!==Yl){var o=Yl.memoizedState;if(l=o.destroy,null!==r&&eo(r,o.deps))return void fo(t,n,l,r)}Kl.flags|=e,a.memoizedState=fo(1|t,n,l,r)}function vo(e,t){return ho(516,4,e,t)}function go(e,t){return yo(516,4,e,t)}function bo(e,t){return yo(4,2,e,t)}function wo(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!=t?(e=e(),t.current=e,function(){t.current=null}):void 0}function ko(e,t,n){return n=null!=n?n.concat([e]):null,yo(4,2,wo.bind(null,t,e),n)}function Eo(){}function So(e,t){var n=ro();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&eo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function _o(e,t){var n=ro();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&eo(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function xo(e,t){var n=Ua();Ba(98>n?98:n,(function(){e(!0)})),Ba(97<n?97:n,(function(){var n=Wl.transition;Wl.transition=1;try{e(!1),t()}finally{Wl.transition=n}}))}function Co(e,t,n){var r=lu(),a=ou(e),l={lane:a,action:n,eagerReducer:null,eagerState:null,next:null},o=t.pending;if(null===o?l.next=l:(l.next=o.next,o.next=l),t.pending=l,o=e.alternate,e===Kl||null!==o&&o===Kl)Jl=Gl=!0;else{if(0===e.lanes&&(null===o||0===o.lanes)&&null!==(o=t.lastRenderedReducer))try{var i=t.lastRenderedState,u=o(i,n);if(l.eagerReducer=o,l.eagerState=u,or(u,i))return}catch(e){}iu(e,a,r)}}var Po={readContext:tl,useCallback:Zl,useContext:Zl,useEffect:Zl,useImperativeHandle:Zl,useLayoutEffect:Zl,useMemo:Zl,useReducer:Zl,useRef:Zl,useState:Zl,useDebugValue:Zl,useDeferredValue:Zl,useTransition:Zl,useMutableSource:Zl,useOpaqueIdentifier:Zl,unstable_isNewReconciler:!1},To={readContext:tl,useCallback:function(e,t){return no().memoizedState=[e,void 0===t?null:t],e},useContext:tl,useEffect:vo,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,ho(4,2,wo.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ho(4,2,e,t)},useMemo:function(e,t){var n=no();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=no();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e=(e=r.queue={pending:null,dispatch:null,lastRenderedReducer:e,lastRenderedState:t}).dispatch=Co.bind(null,Kl,e),[r.memoizedState,e]},useRef:po,useState:co,useDebugValue:Eo,useDeferredValue:function(e){var t=co(e),n=t[0],r=t[1];return vo((function(){var t=Wl.transition;Wl.transition=1;try{r(e)}finally{Wl.transition=t}}),[e]),n},useTransition:function(){var e=co(!1),t=e[0];return po(e=xo.bind(null,e[1])),[e,t]},useMutableSource:function(e,t,n){var r=no();return r.memoizedState={refs:{getSnapshot:t,setSnapshot:null},source:e,subscribe:n},uo(r,e,t,n)},useOpaqueIdentifier:function(){if(Dl){var e=!1,t=function(e){return{$$typeof:R,toString:e,valueOf:e}}((function(){throw e||(e=!0,n("r:"+($r++).toString(36))),Error(o(355))})),n=co(t)[1];return 0==(2&Kl.mode)&&(Kl.flags|=516,fo(5,(function(){n("r:"+($r++).toString(36))}),void 0,null)),t}return co(t="r:"+($r++).toString(36)),t},unstable_isNewReconciler:!1},No={readContext:tl,useCallback:So,useContext:tl,useEffect:go,useImperativeHandle:ko,useLayoutEffect:bo,useMemo:_o,useReducer:lo,useRef:mo,useState:function(){return lo(ao)},useDebugValue:Eo,useDeferredValue:function(e){var t=lo(ao),n=t[0],r=t[1];return go((function(){var t=Wl.transition;Wl.transition=1;try{r(e)}finally{Wl.transition=t}}),[e]),n},useTransition:function(){var e=lo(ao)[0];return[mo().current,e]},useMutableSource:so,useOpaqueIdentifier:function(){return lo(ao)[0]},unstable_isNewReconciler:!1},Lo={readContext:tl,useCallback:So,useContext:tl,useEffect:go,useImperativeHandle:ko,useLayoutEffect:bo,useMemo:_o,useReducer:oo,useRef:mo,useState:function(){return oo(ao)},useDebugValue:Eo,useDeferredValue:function(e){var t=oo(ao),n=t[0],r=t[1];return go((function(){var t=Wl.transition;Wl.transition=1;try{r(e)}finally{Wl.transition=t}}),[e]),n},useTransition:function(){var e=oo(ao)[0];return[mo().current,e]},useMutableSource:so,useOpaqueIdentifier:function(){return oo(ao)[0]},unstable_isNewReconciler:!1},zo=k.ReactCurrentOwner,Oo=!1;function Io(e,t,n,r){t.child=null===e?El(t,null,n,r):kl(t,e.child,n,r)}function Mo(e,t,n,r,a){n=n.render;var l=t.ref;return el(t,a),r=to(e,t,n,r,l,a),null===e||Oo?(t.flags|=1,Io(e,t,r,a),t.child):(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~a,ei(e,t,a))}function Ro(e,t,n,r,a,l){if(null===e){var o=n.type;return"function"!=typeof o||ju(o)||void 0!==o.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Au(n.type,null,r,t,t.mode,l)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=o,Do(e,t,o,r,a,l))}return o=e.child,0==(a&l)&&(a=o.memoizedProps,(n=null!==(n=n.compare)?n:ur)(a,r)&&e.ref===t.ref)?ei(e,t,l):(t.flags|=1,(e=Uu(o,r)).ref=t.ref,e.return=t,t.child=e)}function Do(e,t,n,r,a,l){if(null!==e&&ur(e.memoizedProps,r)&&e.ref===t.ref){if(Oo=!1,0==(l&a))return t.lanes=e.lanes,ei(e,t,l);0!=(16384&e.flags)&&(Oo=!0)}return Uo(e,t,n,r,l)}function Fo(e,t,n){var r=t.pendingProps,a=r.children,l=null!==e?e.memoizedState:null;if("hidden"===r.mode||"unstable-defer-without-hiding"===r.mode)if(0==(4&t.mode))t.memoizedState={baseLanes:0},hu(t,n);else{if(0==(1073741824&n))return e=null!==l?l.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e},hu(t,e),null;t.memoizedState={baseLanes:0},hu(t,null!==l?l.baseLanes:n)}else null!==l?(r=l.baseLanes|n,t.memoizedState=null):r=n,hu(t,r);return Io(e,t,a,n),t.child}function jo(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=128)}function Uo(e,t,n,r,a){var l=da(n)?ca:ua.current;return l=fa(t,l),el(t,a),n=to(e,t,n,r,l,a),null===e||Oo?(t.flags|=1,Io(e,t,n,a),t.child):(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~a,ei(e,t,a))}function Ao(e,t,n,r,a){if(da(n)){var l=!0;ya(t)}else l=!1;if(el(t,a),null===t.stateNode)null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),ml(t,n,r),yl(t,n,r,a),r=!0;else if(null===e){var o=t.stateNode,i=t.memoizedProps;o.props=i;var u=o.context,s=n.contextType;"object"==typeof s&&null!==s?s=tl(s):s=fa(t,s=da(n)?ca:ua.current);var c=n.getDerivedStateFromProps,f="function"==typeof c||"function"==typeof o.getSnapshotBeforeUpdate;f||"function"!=typeof o.UNSAFE_componentWillReceiveProps&&"function"!=typeof o.componentWillReceiveProps||(i!==r||u!==s)&&hl(t,o,r,s),nl=!1;var d=t.memoizedState;o.state=d,ul(t,r,o,a),u=t.memoizedState,i!==r||d!==u||sa.current||nl?("function"==typeof c&&(fl(t,n,c,r),u=t.memoizedState),(i=nl||pl(t,n,i,r,d,u,s))?(f||"function"!=typeof o.UNSAFE_componentWillMount&&"function"!=typeof o.componentWillMount||("function"==typeof o.componentWillMount&&o.componentWillMount(),"function"==typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount()),"function"==typeof o.componentDidMount&&(t.flags|=4)):("function"==typeof o.componentDidMount&&(t.flags|=4),t.memoizedProps=r,t.memoizedState=u),o.props=r,o.state=u,o.context=s,r=i):("function"==typeof o.componentDidMount&&(t.flags|=4),r=!1)}else{o=t.stateNode,al(e,t),i=t.memoizedProps,s=t.type===t.elementType?i:Wa(t.type,i),o.props=s,f=t.pendingProps,d=o.context,"object"==typeof(u=n.contextType)&&null!==u?u=tl(u):u=fa(t,u=da(n)?ca:ua.current);var p=n.getDerivedStateFromProps;(c="function"==typeof p||"function"==typeof o.getSnapshotBeforeUpdate)||"function"!=typeof o.UNSAFE_componentWillReceiveProps&&"function"!=typeof o.componentWillReceiveProps||(i!==f||d!==u)&&hl(t,o,r,u),nl=!1,d=t.memoizedState,o.state=d,ul(t,r,o,a);var m=t.memoizedState;i!==f||d!==m||sa.current||nl?("function"==typeof p&&(fl(t,n,p,r),m=t.memoizedState),(s=nl||pl(t,n,s,r,d,m,u))?(c||"function"!=typeof o.UNSAFE_componentWillUpdate&&"function"!=typeof o.componentWillUpdate||("function"==typeof o.componentWillUpdate&&o.componentWillUpdate(r,m,u),"function"==typeof o.UNSAFE_componentWillUpdate&&o.UNSAFE_componentWillUpdate(r,m,u)),"function"==typeof o.componentDidUpdate&&(t.flags|=4),"function"==typeof o.getSnapshotBeforeUpdate&&(t.flags|=256)):("function"!=typeof o.componentDidUpdate||i===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),"function"!=typeof o.getSnapshotBeforeUpdate||i===e.memoizedProps&&d===e.memoizedState||(t.flags|=256),t.memoizedProps=r,t.memoizedState=m),o.props=r,o.state=m,o.context=u,r=s):("function"!=typeof o.componentDidUpdate||i===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),"function"!=typeof o.getSnapshotBeforeUpdate||i===e.memoizedProps&&d===e.memoizedState||(t.flags|=256),r=!1)}return Bo(e,t,n,r,l,a)}function Bo(e,t,n,r,a,l){jo(e,t);var o=0!=(64&t.flags);if(!r&&!o)return a&&va(t,n,!1),ei(e,t,l);r=t.stateNode,zo.current=t;var i=o&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&o?(t.child=kl(t,e.child,null,l),t.child=kl(t,null,i,l)):Io(e,t,i,l),t.memoizedState=r.state,a&&va(t,n,!0),t.child}function Vo(e){var t=e.stateNode;t.pendingContext?ma(0,t.pendingContext,t.pendingContext!==t.context):t.context&&ma(0,t.context,!1),Tl(e,t.containerInfo)}var Ho,Qo,$o,Wo={dehydrated:null,retryLane:0};function qo(e,t,n){var r,a=t.pendingProps,l=Ol.current,o=!1;return(r=0!=(64&t.flags))||(r=(null===e||null!==e.memoizedState)&&0!=(2&l)),r?(o=!0,t.flags&=-65):null!==e&&null===e.memoizedState||void 0===a.fallback||!0===a.unstable_avoidThisFallback||(l|=1),oa(Ol,1&l),null===e?(void 0!==a.fallback&&Ul(t),e=a.children,l=a.fallback,o?(e=Ko(t,e,l,n),t.child.memoizedState={baseLanes:n},t.memoizedState=Wo,e):"number"==typeof a.unstable_expectedLoadTime?(e=Ko(t,e,l,n),t.child.memoizedState={baseLanes:n},t.memoizedState=Wo,t.lanes=33554432,e):((n=Vu({mode:"visible",children:e},t.mode,n,null)).return=t,t.child=n)):(e.memoizedState,o?(a=Xo(e,t,a.children,a.fallback,n),o=t.child,l=e.child.memoizedState,o.memoizedState=null===l?{baseLanes:n}:{baseLanes:l.baseLanes|n},o.childLanes=e.childLanes&~n,t.memoizedState=Wo,a):(n=Yo(e,t,a.children,n),t.memoizedState=null,n))}function Ko(e,t,n,r){var a=e.mode,l=e.child;return t={mode:"hidden",children:t},0==(2&a)&&null!==l?(l.childLanes=0,l.pendingProps=t):l=Vu(t,a,0,null),n=Bu(n,a,r,null),l.return=e,n.return=e,l.sibling=n,e.child=l,n}function Yo(e,t,n,r){var a=e.child;return e=a.sibling,n=Uu(a,{mode:"visible",children:n}),0==(2&t.mode)&&(n.lanes=r),n.return=t,n.sibling=null,null!==e&&(e.nextEffect=null,e.flags=8,t.firstEffect=t.lastEffect=e),t.child=n}function Xo(e,t,n,r,a){var l=t.mode,o=e.child;e=o.sibling;var i={mode:"hidden",children:n};return 0==(2&l)&&t.child!==o?((n=t.child).childLanes=0,n.pendingProps=i,null!==(o=n.lastEffect)?(t.firstEffect=n.firstEffect,t.lastEffect=o,o.nextEffect=null):t.firstEffect=t.lastEffect=null):n=Uu(o,i),null!==e?r=Uu(e,r):(r=Bu(r,l,a,null)).flags|=2,r.return=t,n.return=t,n.sibling=r,t.child=n,r}function Go(e,t){e.lanes|=t;var n=e.alternate;null!==n&&(n.lanes|=t),Za(e.return,t)}function Jo(e,t,n,r,a,l){var o=e.memoizedState;null===o?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:a,lastEffect:l}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=a,o.lastEffect=l)}function Zo(e,t,n){var r=t.pendingProps,a=r.revealOrder,l=r.tail;if(Io(e,t,r.children,n),0!=(2&(r=Ol.current)))r=1&r|2,t.flags|=64;else{if(null!==e&&0!=(64&e.flags))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&Go(e,n);else if(19===e.tag)Go(e,n);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(oa(Ol,r),0==(2&t.mode))t.memoizedState=null;else switch(a){case"forwards":for(n=t.child,a=null;null!==n;)null!==(e=n.alternate)&&null===Il(e)&&(a=n),n=n.sibling;null===(n=a)?(a=t.child,t.child=null):(a=n.sibling,n.sibling=null),Jo(t,!1,a,n,l,t.lastEffect);break;case"backwards":for(n=null,a=t.child,t.child=null;null!==a;){if(null!==(e=a.alternate)&&null===Il(e)){t.child=a;break}e=a.sibling,a.sibling=n,n=a,a=e}Jo(t,!0,n,null,l,t.lastEffect);break;case"together":Jo(t,!1,null,null,void 0,t.lastEffect);break;default:t.memoizedState=null}return t.child}function ei(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),Mi|=t.lanes,0!=(n&t.childLanes)){if(null!==e&&t.child!==e.child)throw Error(o(153));if(null!==t.child){for(n=Uu(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Uu(e,e.pendingProps)).return=t;n.sibling=null}return t.child}return null}function ti(e,t){if(!Dl)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function ni(e,t,n){var r=t.pendingProps;switch(t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;case 1:return da(t.type)&&pa(),null;case 3:return Nl(),la(sa),la(ua),Ql(),(r=t.stateNode).pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(Bl(t)?t.flags|=4:r.hydrate||(t.flags|=256)),null;case 5:zl(t);var l=Pl(Cl.current);if(n=t.type,null!==e&&null!=t.stateNode)Qo(e,t,n,r),e.ref!==t.ref&&(t.flags|=128);else{if(!r){if(null===t.stateNode)throw Error(o(166));return null}if(e=Pl(_l.current),Bl(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[qr]=t,r[Kr]=i,n){case"dialog":xr("cancel",r),xr("close",r);break;case"iframe":case"object":case"embed":xr("load",r);break;case"video":case"audio":for(e=0;e<kr.length;e++)xr(kr[e],r);break;case"source":xr("error",r);break;case"img":case"image":case"link":xr("error",r),xr("load",r);break;case"details":xr("toggle",r);break;case"input":ee(r,i),xr("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},xr("invalid",r);break;case"textarea":ue(r,i),xr("invalid",r)}for(var s in Se(n,i),e=null,i)i.hasOwnProperty(s)&&(l=i[s],"children"===s?"string"==typeof l?r.textContent!==l&&(e=["children",l]):"number"==typeof l&&r.textContent!==""+l&&(e=["children",""+l]):u.hasOwnProperty(s)&&null!=l&&"onScroll"===s&&xr("scroll",r));switch(n){case"input":X(r),re(r,i,!0);break;case"textarea":X(r),ce(r);break;case"select":case"option":break;default:"function"==typeof i.onClick&&(r.onclick=Rr)}r=e,t.updateQueue=r,null!==r&&(t.flags|=4)}else{switch(s=9===l.nodeType?l:l.ownerDocument,e===fe&&(e=pe(n)),e===fe?"script"===n?((e=s.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"==typeof r.is?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),"select"===n&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[qr]=t,e[Kr]=r,Ho(e,t),t.stateNode=e,s=_e(n,r),n){case"dialog":xr("cancel",e),xr("close",e),l=r;break;case"iframe":case"object":case"embed":xr("load",e),l=r;break;case"video":case"audio":for(l=0;l<kr.length;l++)xr(kr[l],e);l=r;break;case"source":xr("error",e),l=r;break;case"img":case"image":case"link":xr("error",e),xr("load",e),l=r;break;case"details":xr("toggle",e),l=r;break;case"input":ee(e,r),l=Z(e,r),xr("invalid",e);break;case"option":l=le(e,r);break;case"select":e._wrapperState={wasMultiple:!!r.multiple},l=a({},r,{value:void 0}),xr("invalid",e);break;case"textarea":ue(e,r),l=ie(e,r),xr("invalid",e);break;default:l=r}Se(n,l);var c=l;for(i in c)if(c.hasOwnProperty(i)){var f=c[i];"style"===i?ke(e,f):"dangerouslySetInnerHTML"===i?null!=(f=f?f.__html:void 0)&&ye(e,f):"children"===i?"string"==typeof f?("textarea"!==n||""!==f)&&ve(e,f):"number"==typeof f&&ve(e,""+f):"suppressContentEditableWarning"!==i&&"suppressHydrationWarning"!==i&&"autoFocus"!==i&&(u.hasOwnProperty(i)?null!=f&&"onScroll"===i&&xr("scroll",e):null!=f&&w(e,i,f,s))}switch(n){case"input":X(e),re(e,r,!1);break;case"textarea":X(e),ce(e);break;case"option":null!=r.value&&e.setAttribute("value",""+K(r.value));break;case"select":e.multiple=!!r.multiple,null!=(i=r.value)?oe(e,!!r.multiple,i,!1):null!=r.defaultValue&&oe(e,!!r.multiple,r.defaultValue,!0);break;default:"function"==typeof l.onClick&&(e.onclick=Rr)}jr(n,r)&&(t.flags|=4)}null!==t.ref&&(t.flags|=128)}return null;case 6:if(e&&null!=t.stateNode)$o(0,t,e.memoizedProps,r);else{if("string"!=typeof r&&null===t.stateNode)throw Error(o(166));n=Pl(Cl.current),Pl(_l.current),Bl(t)?(r=t.stateNode,n=t.memoizedProps,r[qr]=t,r.nodeValue!==n&&(t.flags|=4)):((r=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[qr]=t,t.stateNode=r)}return null;case 13:return la(Ol),r=t.memoizedState,0!=(64&t.flags)?(t.lanes=n,t):(r=null!==r,n=!1,null===e?void 0!==t.memoizedProps.fallback&&Bl(t):n=null!==e.memoizedState,r&&!n&&0!=(2&t.mode)&&(null===e&&!0!==t.memoizedProps.unstable_avoidThisFallback||0!=(1&Ol.current)?0===zi&&(zi=3):(0!==zi&&3!==zi||(zi=4),null===Ci||0==(134217727&Mi)&&0==(134217727&Ri)||fu(Ci,Ti))),(r||n)&&(t.flags|=4),null);case 4:return Nl(),null===e&&Pr(t.stateNode.containerInfo),null;case 10:return Ja(t),null;case 17:return da(t.type)&&pa(),null;case 19:if(la(Ol),null===(r=t.memoizedState))return null;if(i=0!=(64&t.flags),null===(s=r.rendering))if(i)ti(r,!1);else{if(0!==zi||null!==e&&0!=(64&e.flags))for(e=t.child;null!==e;){if(null!==(s=Il(e))){for(t.flags|=64,ti(r,!1),null!==(i=s.updateQueue)&&(t.updateQueue=i,t.flags|=4),null===r.lastEffect&&(t.firstEffect=null),t.lastEffect=r.lastEffect,r=n,n=t.child;null!==n;)e=r,(i=n).flags&=2,i.nextEffect=null,i.firstEffect=null,i.lastEffect=null,null===(s=i.alternate)?(i.childLanes=0,i.lanes=e,i.child=null,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=s.childLanes,i.lanes=s.lanes,i.child=s.child,i.memoizedProps=s.memoizedProps,i.memoizedState=s.memoizedState,i.updateQueue=s.updateQueue,i.type=s.type,e=s.dependencies,i.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return oa(Ol,1&Ol.current|2),t.child}e=e.sibling}null!==r.tail&&ja()>Ui&&(t.flags|=64,i=!0,ti(r,!1),t.lanes=33554432)}else{if(!i)if(null!==(e=Il(s))){if(t.flags|=64,i=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),ti(r,!0),null===r.tail&&"hidden"===r.tailMode&&!s.alternate&&!Dl)return null!==(t=t.lastEffect=r.lastEffect)&&(t.nextEffect=null),null}else 2*ja()-r.renderingStartTime>Ui&&1073741824!==n&&(t.flags|=64,i=!0,ti(r,!1),t.lanes=33554432);r.isBackwards?(s.sibling=t.child,t.child=s):(null!==(n=r.last)?n.sibling=s:t.child=s,r.last=s)}return null!==r.tail?(n=r.tail,r.rendering=n,r.tail=n.sibling,r.lastEffect=t.lastEffect,r.renderingStartTime=ja(),n.sibling=null,t=Ol.current,oa(Ol,i?1&t|2:1&t),n):null;case 23:case 24:return yu(),null!==e&&null!==e.memoizedState!=(null!==t.memoizedState)&&"unstable-defer-without-hiding"!==r.mode&&(t.flags|=4),null}throw Error(o(156,t.tag))}function ri(e){switch(e.tag){case 1:da(e.type)&&pa();var t=e.flags;return 4096&t?(e.flags=-4097&t|64,e):null;case 3:if(Nl(),la(sa),la(ua),Ql(),0!=(64&(t=e.flags)))throw Error(o(285));return e.flags=-4097&t|64,e;case 5:return zl(e),null;case 13:return la(Ol),4096&(t=e.flags)?(e.flags=-4097&t|64,e):null;case 19:return la(Ol),null;case 4:return Nl(),null;case 10:return Ja(e),null;case 23:case 24:return yu(),null;default:return null}}function ai(e,t){try{var n="",r=t;do{n+=W(r),r=r.return}while(r);var a=n}catch(e){a="\nError generating stack: "+e.message+"\n"+e.stack}return{value:e,source:t,stack:a}}function li(e,t){try{console.error(t.value)}catch(e){setTimeout((function(){throw e}))}}Ho=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Qo=function(e,t,n,r){var l=e.memoizedProps;if(l!==r){e=t.stateNode,Pl(_l.current);var o,i=null;switch(n){case"input":l=Z(e,l),r=Z(e,r),i=[];break;case"option":l=le(e,l),r=le(e,r),i=[];break;case"select":l=a({},l,{value:void 0}),r=a({},r,{value:void 0}),i=[];break;case"textarea":l=ie(e,l),r=ie(e,r),i=[];break;default:"function"!=typeof l.onClick&&"function"==typeof r.onClick&&(e.onclick=Rr)}for(f in Se(n,r),n=null,l)if(!r.hasOwnProperty(f)&&l.hasOwnProperty(f)&&null!=l[f])if("style"===f){var s=l[f];for(o in s)s.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else"dangerouslySetInnerHTML"!==f&&"children"!==f&&"suppressContentEditableWarning"!==f&&"suppressHydrationWarning"!==f&&"autoFocus"!==f&&(u.hasOwnProperty(f)?i||(i=[]):(i=i||[]).push(f,null));for(f in r){var c=r[f];if(s=null!=l?l[f]:void 0,r.hasOwnProperty(f)&&c!==s&&(null!=c||null!=s))if("style"===f)if(s){for(o in s)!s.hasOwnProperty(o)||c&&c.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in c)c.hasOwnProperty(o)&&s[o]!==c[o]&&(n||(n={}),n[o]=c[o])}else n||(i||(i=[]),i.push(f,n)),n=c;else"dangerouslySetInnerHTML"===f?(c=c?c.__html:void 0,s=s?s.__html:void 0,null!=c&&s!==c&&(i=i||[]).push(f,c)):"children"===f?"string"!=typeof c&&"number"!=typeof c||(i=i||[]).push(f,""+c):"suppressContentEditableWarning"!==f&&"suppressHydrationWarning"!==f&&(u.hasOwnProperty(f)?(null!=c&&"onScroll"===f&&xr("scroll",e),i||s===c||(i=[])):"object"==typeof c&&null!==c&&c.$$typeof===R?c.toString():(i=i||[]).push(f,c))}n&&(i=i||[]).push("style",n);var f=i;(t.updateQueue=f)&&(t.flags|=4)}},$o=function(e,t,n,r){n!==r&&(t.flags|=4)};var oi="function"==typeof WeakMap?WeakMap:Map;function ii(e,t,n){(n=ll(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Hi||(Hi=!0,Qi=r),li(0,t)},n}function ui(e,t,n){(n=ll(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var a=t.value;n.payload=function(){return li(0,t),r(a)}}var l=e.stateNode;return null!==l&&"function"==typeof l.componentDidCatch&&(n.callback=function(){"function"!=typeof r&&(null===$i?$i=new Set([this]):$i.add(this),li(0,t));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}var si="function"==typeof WeakSet?WeakSet:Set;function ci(e){var t=e.ref;if(null!==t)if("function"==typeof t)try{t(null)}catch(t){Iu(e,t)}else t.current=null}function fi(e,t){switch(t.tag){case 0:case 11:case 15:case 22:return;case 1:if(256&t.flags&&null!==e){var n=e.memoizedProps,r=e.memoizedState;t=(e=t.stateNode).getSnapshotBeforeUpdate(t.elementType===t.type?n:Wa(t.type,n),r),e.__reactInternalSnapshotBeforeUpdate=t}return;case 3:return void(256&t.flags&&Vr(t.stateNode.containerInfo));case 5:case 6:case 4:case 17:return}throw Error(o(163))}function di(e,t,n){switch(n.tag){case 0:case 11:case 15:case 22:if(null!==(t=null!==(t=n.updateQueue)?t.lastEffect:null)){e=t=t.next;do{if(3==(3&e.tag)){var r=e.create;e.destroy=r()}e=e.next}while(e!==t)}if(null!==(t=null!==(t=n.updateQueue)?t.lastEffect:null)){e=t=t.next;do{var a=e;r=a.next,0!=(4&(a=a.tag))&&0!=(1&a)&&(Lu(n,e),Nu(n,e)),e=r}while(e!==t)}return;case 1:return e=n.stateNode,4&n.flags&&(null===t?e.componentDidMount():(r=n.elementType===n.type?t.memoizedProps:Wa(n.type,t.memoizedProps),e.componentDidUpdate(r,t.memoizedState,e.__reactInternalSnapshotBeforeUpdate))),void(null!==(t=n.updateQueue)&&sl(n,t,e));case 3:if(null!==(t=n.updateQueue)){if(e=null,null!==n.child)switch(n.child.tag){case 5:e=n.child.stateNode;break;case 1:e=n.child.stateNode}sl(n,t,e)}return;case 5:return e=n.stateNode,void(null===t&&4&n.flags&&jr(n.type,n.memoizedProps)&&e.focus());case 6:case 4:case 12:return;case 13:return void(null===n.memoizedState&&(n=n.alternate,null!==n&&(n=n.memoizedState,null!==n&&(n=n.dehydrated,null!==n&&kt(n)))));case 19:case 17:case 20:case 21:case 23:case 24:return}throw Error(o(163))}function pi(e,t){for(var n=e;;){if(5===n.tag){var r=n.stateNode;if(t)"function"==typeof(r=r.style).setProperty?r.setProperty("display","none","important"):r.display="none";else{r=n.stateNode;var a=n.memoizedProps.style;a=null!=a&&a.hasOwnProperty("display")?a.display:null,r.style.display=we("display",a)}}else if(6===n.tag)n.stateNode.nodeValue=t?"":n.memoizedProps;else if((23!==n.tag&&24!==n.tag||null===n.memoizedState||n===e)&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===e)break;for(;null===n.sibling;){if(null===n.return||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}}function mi(e,t){if(ba&&"function"==typeof ba.onCommitFiberUnmount)try{ba.onCommitFiberUnmount(ga,t)}catch(e){}switch(t.tag){case 0:case 11:case 14:case 15:case 22:if(null!==(e=t.updateQueue)&&null!==(e=e.lastEffect)){var n=e=e.next;do{var r=n,a=r.destroy;if(r=r.tag,void 0!==a)if(0!=(4&r))Lu(t,n);else{r=t;try{a()}catch(e){Iu(r,e)}}n=n.next}while(n!==e)}break;case 1:if(ci(t),"function"==typeof(e=t.stateNode).componentWillUnmount)try{e.props=t.memoizedProps,e.state=t.memoizedState,e.componentWillUnmount()}catch(e){Iu(t,e)}break;case 5:ci(t);break;case 4:gi(e,t)}}function hi(e){e.alternate=null,e.child=null,e.dependencies=null,e.firstEffect=null,e.lastEffect=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.return=null,e.updateQueue=null}function yi(e){return 5===e.tag||3===e.tag||4===e.tag}function vi(e){e:{for(var t=e.return;null!==t;){if(yi(t))break e;t=t.return}throw Error(o(160))}var n=t;switch(t=n.stateNode,n.tag){case 5:var r=!1;break;case 3:case 4:t=t.containerInfo,r=!0;break;default:throw Error(o(161))}16&n.flags&&(ve(t,""),n.flags&=-17);e:t:for(n=e;;){for(;null===n.sibling;){if(null===n.return||yi(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;5!==n.tag&&6!==n.tag&&18!==n.tag;){if(2&n.flags)continue t;if(null===n.child||4===n.tag)continue t;n.child.return=n,n=n.child}if(!(2&n.flags)){n=n.stateNode;break e}}r?function e(t,n,r){var a=t.tag,l=5===a||6===a;if(l)t=l?t.stateNode:t.stateNode.instance,n?8===r.nodeType?r.parentNode.insertBefore(t,n):r.insertBefore(t,n):(8===r.nodeType?(n=r.parentNode).insertBefore(t,r):(n=r).appendChild(t),null!==(r=r._reactRootContainer)&&void 0!==r||null!==n.onclick||(n.onclick=Rr));else if(4!==a&&null!==(t=t.child))for(e(t,n,r),t=t.sibling;null!==t;)e(t,n,r),t=t.sibling}(e,n,t):function e(t,n,r){var a=t.tag,l=5===a||6===a;if(l)t=l?t.stateNode:t.stateNode.instance,n?r.insertBefore(t,n):r.appendChild(t);else if(4!==a&&null!==(t=t.child))for(e(t,n,r),t=t.sibling;null!==t;)e(t,n,r),t=t.sibling}(e,n,t)}function gi(e,t){for(var n,r,a=t,l=!1;;){if(!l){l=a.return;e:for(;;){if(null===l)throw Error(o(160));switch(n=l.stateNode,l.tag){case 5:r=!1;break e;case 3:case 4:n=n.containerInfo,r=!0;break e}l=l.return}l=!0}if(5===a.tag||6===a.tag){e:for(var i=e,u=a,s=u;;)if(mi(i,s),null!==s.child&&4!==s.tag)s.child.return=s,s=s.child;else{if(s===u)break e;for(;null===s.sibling;){if(null===s.return||s.return===u)break e;s=s.return}s.sibling.return=s.return,s=s.sibling}r?(i=n,u=a.stateNode,8===i.nodeType?i.parentNode.removeChild(u):i.removeChild(u)):n.removeChild(a.stateNode)}else if(4===a.tag){if(null!==a.child){n=a.stateNode.containerInfo,r=!0,a.child.return=a,a=a.child;continue}}else if(mi(e,a),null!==a.child){a.child.return=a,a=a.child;continue}if(a===t)break;for(;null===a.sibling;){if(null===a.return||a.return===t)return;4===(a=a.return).tag&&(l=!1)}a.sibling.return=a.return,a=a.sibling}}function bi(e,t){switch(t.tag){case 0:case 11:case 14:case 15:case 22:var n=t.updateQueue;if(null!==(n=null!==n?n.lastEffect:null)){var r=n=n.next;do{3==(3&r.tag)&&(e=r.destroy,r.destroy=void 0,void 0!==e&&e()),r=r.next}while(r!==n)}return;case 1:return;case 5:if(null!=(n=t.stateNode)){r=t.memoizedProps;var a=null!==e?e.memoizedProps:r;e=t.type;var l=t.updateQueue;if(t.updateQueue=null,null!==l){for(n[Kr]=r,"input"===e&&"radio"===r.type&&null!=r.name&&te(n,r),_e(e,a),t=_e(e,r),a=0;a<l.length;a+=2){var i=l[a],u=l[a+1];"style"===i?ke(n,u):"dangerouslySetInnerHTML"===i?ye(n,u):"children"===i?ve(n,u):w(n,i,u,t)}switch(e){case"input":ne(n,r);break;case"textarea":se(n,r);break;case"select":e=n._wrapperState.wasMultiple,n._wrapperState.wasMultiple=!!r.multiple,null!=(l=r.value)?oe(n,!!r.multiple,l,!1):e!==!!r.multiple&&(null!=r.defaultValue?oe(n,!!r.multiple,r.defaultValue,!0):oe(n,!!r.multiple,r.multiple?[]:"",!1))}}}return;case 6:if(null===t.stateNode)throw Error(o(162));return void(t.stateNode.nodeValue=t.memoizedProps);case 3:return void((n=t.stateNode).hydrate&&(n.hydrate=!1,kt(n.containerInfo)));case 12:return;case 13:return null!==t.memoizedState&&(ji=ja(),pi(t.child,!0)),void wi(t);case 19:return void wi(t);case 17:return;case 23:case 24:return void pi(t,null!==t.memoizedState)}throw Error(o(163))}function wi(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new si),t.forEach((function(t){var r=Ru.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function ki(e,t){return null!==e&&(null===(e=e.memoizedState)||null!==e.dehydrated)&&(null!==(t=t.memoizedState)&&null===t.dehydrated)}var Ei=Math.ceil,Si=k.ReactCurrentDispatcher,_i=k.ReactCurrentOwner,xi=0,Ci=null,Pi=null,Ti=0,Ni=0,Li=aa(0),zi=0,Oi=null,Ii=0,Mi=0,Ri=0,Di=0,Fi=null,ji=0,Ui=1/0;function Ai(){Ui=ja()+500}var Bi,Vi=null,Hi=!1,Qi=null,$i=null,Wi=!1,qi=null,Ki=90,Yi=[],Xi=[],Gi=null,Ji=0,Zi=null,eu=-1,tu=0,nu=0,ru=null,au=!1;function lu(){return 0!=(48&xi)?ja():-1!==eu?eu:eu=ja()}function ou(e){if(0==(2&(e=e.mode)))return 1;if(0==(4&e))return 99===Ua()?1:2;if(0===tu&&(tu=Ii),0!==$a.transition){0!==nu&&(nu=null!==Fi?Fi.pendingLanes:0),e=tu;var t=4186112&~nu;return 0===(t&=-t)&&(0===(t=(e=4186112&~e)&-e)&&(t=8192)),t}return e=Ua(),0!=(4&xi)&&98===e?e=Ut(12,tu):e=Ut(e=function(e){switch(e){case 99:return 15;case 98:return 10;case 97:case 96:return 8;case 95:return 2;default:return 0}}(e),tu),e}function iu(e,t,n){if(50<Ji)throw Ji=0,Zi=null,Error(o(185));if(null===(e=uu(e,t)))return null;Vt(e,t,n),e===Ci&&(Ri|=t,4===zi&&fu(e,Ti));var r=Ua();1===t?0!=(8&xi)&&0==(48&xi)?du(e):(su(e,n),0===xi&&(Ai(),Ha())):(0==(4&xi)||98!==r&&99!==r||(null===Gi?Gi=new Set([e]):Gi.add(e)),su(e,n)),Fi=e}function uu(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}function su(e,t){for(var n=e.callbackNode,r=e.suspendedLanes,a=e.pingedLanes,l=e.expirationTimes,i=e.pendingLanes;0<i;){var u=31-Ht(i),s=1<<u,c=l[u];if(-1===c){if(0==(s&r)||0!=(s&a)){c=t,Dt(s);var f=Rt;l[u]=10<=f?c+250:6<=f?c+5e3:-1}}else c<=t&&(e.expiredLanes|=s);i&=~s}if(r=Ft(e,e===Ci?Ti:0),t=Rt,0===r)null!==n&&(n!==Oa&&Ea(n),e.callbackNode=null,e.callbackPriority=0);else{if(null!==n){if(e.callbackPriority===t)return;n!==Oa&&Ea(n)}15===t?(n=du.bind(null,e),null===Ma?(Ma=[n],Ra=ka(Pa,Qa)):Ma.push(n),n=Oa):14===t?n=Va(99,du.bind(null,e)):n=Va(n=function(e){switch(e){case 15:case 14:return 99;case 13:case 12:case 11:case 10:return 98;case 9:case 8:case 7:case 6:case 4:case 5:return 97;case 3:case 2:case 1:return 95;case 0:return 90;default:throw Error(o(358,e))}}(t),cu.bind(null,e)),e.callbackPriority=t,e.callbackNode=n}}function cu(e){if(eu=-1,nu=tu=0,0!=(48&xi))throw Error(o(327));var t=e.callbackNode;if(Tu()&&e.callbackNode!==t)return null;var n=Ft(e,e===Ci?Ti:0);if(0===n)return null;var r=n,a=xi;xi|=16;var l=bu();for(Ci===e&&Ti===r||(Ai(),vu(e,r));;)try{Eu();break}catch(t){gu(e,t)}if(Ga(),Si.current=l,xi=a,null!==Pi?r=0:(Ci=null,Ti=0,r=zi),0!=(Ii&Ri))vu(e,0);else if(0!==r){if(2===r&&(xi|=64,e.hydrate&&(e.hydrate=!1,Vr(e.containerInfo)),0!==(n=jt(e))&&(r=wu(e,n))),1===r)throw t=Oi,vu(e,0),fu(e,n),su(e,ja()),t;switch(e.finishedWork=e.current.alternate,e.finishedLanes=n,r){case 0:case 1:throw Error(o(345));case 2:xu(e);break;case 3:if(fu(e,n),(62914560&n)===n&&10<(r=ji+500-ja())){if(0!==Ft(e,0))break;if(((a=e.suspendedLanes)&n)!==n){lu(),e.pingedLanes|=e.suspendedLanes&a;break}e.timeoutHandle=Ar(xu.bind(null,e),r);break}xu(e);break;case 4:if(fu(e,n),(4186112&n)===n)break;for(r=e.eventTimes,a=-1;0<n;){var i=31-Ht(n);l=1<<i,(i=r[i])>a&&(a=i),n&=~l}if(n=a,10<(n=(120>(n=ja()-n)?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*Ei(n/1960))-n)){e.timeoutHandle=Ar(xu.bind(null,e),n);break}xu(e);break;case 5:xu(e);break;default:throw Error(o(329))}}return su(e,ja()),e.callbackNode===t?cu.bind(null,e):null}function fu(e,t){for(t&=~Di,t&=~Ri,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Ht(t),r=1<<n;e[n]=-1,t&=~r}}function du(e){if(0!=(48&xi))throw Error(o(327));if(Tu(),e===Ci&&0!=(e.expiredLanes&Ti)){var t=Ti,n=wu(e,t);0!=(Ii&Ri)&&(n=wu(e,t=Ft(e,t)))}else n=wu(e,t=Ft(e,0));if(0!==e.tag&&2===n&&(xi|=64,e.hydrate&&(e.hydrate=!1,Vr(e.containerInfo)),0!==(t=jt(e))&&(n=wu(e,t))),1===n)throw n=Oi,vu(e,0),fu(e,t),su(e,ja()),n;return e.finishedWork=e.current.alternate,e.finishedLanes=t,xu(e),su(e,ja()),null}function pu(e,t){var n=xi;xi|=1;try{return e(t)}finally{0===(xi=n)&&(Ai(),Ha())}}function mu(e,t){var n=xi;xi&=-2,xi|=8;try{return e(t)}finally{0===(xi=n)&&(Ai(),Ha())}}function hu(e,t){oa(Li,Ni),Ni|=t,Ii|=t}function yu(){Ni=Li.current,la(Li)}function vu(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,Br(n)),null!==Pi)for(n=Pi.return;null!==n;){var r=n;switch(r.tag){case 1:null!=(r=r.type.childContextTypes)&&pa();break;case 3:Nl(),la(sa),la(ua),Ql();break;case 5:zl(r);break;case 4:Nl();break;case 13:case 19:la(Ol);break;case 10:Ja(r);break;case 23:case 24:yu()}n=n.return}Ci=e,Pi=Uu(e.current,null),Ti=Ni=Ii=t,zi=0,Oi=null,Di=Ri=Mi=0}function gu(e,t){for(;;){var n=Pi;try{if(Ga(),$l.current=Po,Gl){for(var r=Kl.memoizedState;null!==r;){var a=r.queue;null!==a&&(a.pending=null),r=r.next}Gl=!1}if(ql=0,Xl=Yl=Kl=null,Jl=!1,_i.current=null,null===n||null===n.return){zi=1,Oi=t,Pi=null;break}e:{var l=e,o=n.return,i=n,u=t;if(t=Ti,i.flags|=2048,i.firstEffect=i.lastEffect=null,null!==u&&"object"==typeof u&&"function"==typeof u.then){var s=u;if(0==(2&i.mode)){var c=i.alternate;c?(i.updateQueue=c.updateQueue,i.memoizedState=c.memoizedState,i.lanes=c.lanes):(i.updateQueue=null,i.memoizedState=null)}var f=0!=(1&Ol.current),d=o;do{var p;if(p=13===d.tag){var m=d.memoizedState;if(null!==m)p=null!==m.dehydrated;else{var h=d.memoizedProps;p=void 0!==h.fallback&&(!0!==h.unstable_avoidThisFallback||!f)}}if(p){var y=d.updateQueue;if(null===y){var v=new Set;v.add(s),d.updateQueue=v}else y.add(s);if(0==(2&d.mode)){if(d.flags|=64,i.flags|=16384,i.flags&=-2981,1===i.tag)if(null===i.alternate)i.tag=17;else{var g=ll(-1,1);g.tag=2,ol(i,g)}i.lanes|=1;break e}u=void 0,i=t;var b=l.pingCache;if(null===b?(b=l.pingCache=new oi,u=new Set,b.set(s,u)):void 0===(u=b.get(s))&&(u=new Set,b.set(s,u)),!u.has(i)){u.add(i);var w=Mu.bind(null,l,s,i);s.then(w,w)}d.flags|=4096,d.lanes=t;break e}d=d.return}while(null!==d);u=Error((q(i.type)||"A React component")+" suspended while rendering, but no fallback UI was specified.\n\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.")}5!==zi&&(zi=2),u=ai(u,i),d=o;do{switch(d.tag){case 3:l=u,d.flags|=4096,t&=-t,d.lanes|=t,il(d,ii(0,l,t));break e;case 1:l=u;var k=d.type,E=d.stateNode;if(0==(64&d.flags)&&("function"==typeof k.getDerivedStateFromError||null!==E&&"function"==typeof E.componentDidCatch&&(null===$i||!$i.has(E)))){d.flags|=4096,t&=-t,d.lanes|=t,il(d,ui(d,l,t));break e}}d=d.return}while(null!==d)}_u(n)}catch(e){t=e,Pi===n&&null!==n&&(Pi=n=n.return);continue}break}}function bu(){var e=Si.current;return Si.current=Po,null===e?Po:e}function wu(e,t){var n=xi;xi|=16;var r=bu();for(Ci===e&&Ti===t||vu(e,t);;)try{ku();break}catch(t){gu(e,t)}if(Ga(),xi=n,Si.current=r,null!==Pi)throw Error(o(261));return Ci=null,Ti=0,zi}function ku(){for(;null!==Pi;)Su(Pi)}function Eu(){for(;null!==Pi&&!Sa();)Su(Pi)}function Su(e){var t=Bi(e.alternate,e,Ni);e.memoizedProps=e.pendingProps,null===t?_u(e):Pi=t,_i.current=null}function _u(e){var t=e;do{var n=t.alternate;if(e=t.return,0==(2048&t.flags)){if(null!==(n=ni(n,t,Ni)))return void(Pi=n);if(24!==(n=t).tag&&23!==n.tag||null===n.memoizedState||0!=(1073741824&Ni)||0==(4&n.mode)){for(var r=0,a=n.child;null!==a;)r|=a.lanes|a.childLanes,a=a.sibling;n.childLanes=r}null!==e&&0==(2048&e.flags)&&(null===e.firstEffect&&(e.firstEffect=t.firstEffect),null!==t.lastEffect&&(null!==e.lastEffect&&(e.lastEffect.nextEffect=t.firstEffect),e.lastEffect=t.lastEffect),1<t.flags&&(null!==e.lastEffect?e.lastEffect.nextEffect=t:e.firstEffect=t,e.lastEffect=t))}else{if(null!==(n=ri(t)))return n.flags&=2047,void(Pi=n);null!==e&&(e.firstEffect=e.lastEffect=null,e.flags|=2048)}if(null!==(t=t.sibling))return void(Pi=t);Pi=t=e}while(null!==t);0===zi&&(zi=5)}function xu(e){var t=Ua();return Ba(99,Cu.bind(null,e,t)),null}function Cu(e,t){do{Tu()}while(null!==qi);if(0!=(48&xi))throw Error(o(327));var n=e.finishedWork;if(null===n)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(o(177));e.callbackNode=null;var r=n.lanes|n.childLanes,a=r,l=e.pendingLanes&~a;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=a,e.mutableReadLanes&=a,e.entangledLanes&=a,a=e.entanglements;for(var i=e.eventTimes,u=e.expirationTimes;0<l;){var s=31-Ht(l),c=1<<s;a[s]=0,i[s]=-1,u[s]=-1,l&=~c}if(null!==Gi&&0==(24&r)&&Gi.has(e)&&Gi.delete(e),e===Ci&&(Pi=Ci=null,Ti=0),1<n.flags?null!==n.lastEffect?(n.lastEffect.nextEffect=n,r=n.firstEffect):r=n:r=n.firstEffect,null!==r){if(a=xi,xi|=32,_i.current=null,Dr=Kt,dr(i=fr())){if("selectionStart"in i)u={start:i.selectionStart,end:i.selectionEnd};else e:if(u=(u=i.ownerDocument)&&u.defaultView||window,(c=u.getSelection&&u.getSelection())&&0!==c.rangeCount){u=c.anchorNode,l=c.anchorOffset,s=c.focusNode,c=c.focusOffset;try{u.nodeType,s.nodeType}catch(e){u=null;break e}var f=0,d=-1,p=-1,m=0,h=0,y=i,v=null;t:for(;;){for(var g;y!==u||0!==l&&3!==y.nodeType||(d=f+l),y!==s||0!==c&&3!==y.nodeType||(p=f+c),3===y.nodeType&&(f+=y.nodeValue.length),null!==(g=y.firstChild);)v=y,y=g;for(;;){if(y===i)break t;if(v===u&&++m===l&&(d=f),v===s&&++h===c&&(p=f),null!==(g=y.nextSibling))break;v=(y=v).parentNode}y=g}u=-1===d||-1===p?null:{start:d,end:p}}else u=null;u=u||{start:0,end:0}}else u=null;Fr={focusedElem:i,selectionRange:u},Kt=!1,ru=null,au=!1,Vi=r;do{try{Pu()}catch(e){if(null===Vi)throw Error(o(330));Iu(Vi,e),Vi=Vi.nextEffect}}while(null!==Vi);ru=null,Vi=r;do{try{for(i=e;null!==Vi;){var b=Vi.flags;if(16&b&&ve(Vi.stateNode,""),128&b){var w=Vi.alternate;if(null!==w){var k=w.ref;null!==k&&("function"==typeof k?k(null):k.current=null)}}switch(1038&b){case 2:vi(Vi),Vi.flags&=-3;break;case 6:vi(Vi),Vi.flags&=-3,bi(Vi.alternate,Vi);break;case 1024:Vi.flags&=-1025;break;case 1028:Vi.flags&=-1025,bi(Vi.alternate,Vi);break;case 4:bi(Vi.alternate,Vi);break;case 8:gi(i,u=Vi);var E=u.alternate;hi(u),null!==E&&hi(E)}Vi=Vi.nextEffect}}catch(e){if(null===Vi)throw Error(o(330));Iu(Vi,e),Vi=Vi.nextEffect}}while(null!==Vi);if(k=Fr,w=fr(),b=k.focusedElem,i=k.selectionRange,w!==b&&b&&b.ownerDocument&&function e(t,n){return!(!t||!n)&&(t===n||(!t||3!==t.nodeType)&&(n&&3===n.nodeType?e(t,n.parentNode):"contains"in t?t.contains(n):!!t.compareDocumentPosition&&!!(16&t.compareDocumentPosition(n))))}(b.ownerDocument.documentElement,b)){null!==i&&dr(b)&&(w=i.start,void 0===(k=i.end)&&(k=w),"selectionStart"in b?(b.selectionStart=w,b.selectionEnd=Math.min(k,b.value.length)):(k=(w=b.ownerDocument||document)&&w.defaultView||window).getSelection&&(k=k.getSelection(),u=b.textContent.length,E=Math.min(i.start,u),i=void 0===i.end?E:Math.min(i.end,u),!k.extend&&E>i&&(u=i,i=E,E=u),u=cr(b,E),l=cr(b,i),u&&l&&(1!==k.rangeCount||k.anchorNode!==u.node||k.anchorOffset!==u.offset||k.focusNode!==l.node||k.focusOffset!==l.offset)&&((w=w.createRange()).setStart(u.node,u.offset),k.removeAllRanges(),E>i?(k.addRange(w),k.extend(l.node,l.offset)):(w.setEnd(l.node,l.offset),k.addRange(w))))),w=[];for(k=b;k=k.parentNode;)1===k.nodeType&&w.push({element:k,left:k.scrollLeft,top:k.scrollTop});for("function"==typeof b.focus&&b.focus(),b=0;b<w.length;b++)(k=w[b]).element.scrollLeft=k.left,k.element.scrollTop=k.top}Kt=!!Dr,Fr=Dr=null,e.current=n,Vi=r;do{try{for(b=e;null!==Vi;){var S=Vi.flags;if(36&S&&di(b,Vi.alternate,Vi),128&S){w=void 0;var _=Vi.ref;if(null!==_){var x=Vi.stateNode;switch(Vi.tag){case 5:w=x;break;default:w=x}"function"==typeof _?_(w):_.current=w}}Vi=Vi.nextEffect}}catch(e){if(null===Vi)throw Error(o(330));Iu(Vi,e),Vi=Vi.nextEffect}}while(null!==Vi);Vi=null,Ia(),xi=a}else e.current=n;if(Wi)Wi=!1,qi=e,Ki=t;else for(Vi=r;null!==Vi;)t=Vi.nextEffect,Vi.nextEffect=null,8&Vi.flags&&((S=Vi).sibling=null,S.stateNode=null),Vi=t;if(0===(r=e.pendingLanes)&&($i=null),1===r?e===Zi?Ji++:(Ji=0,Zi=e):Ji=0,n=n.stateNode,ba&&"function"==typeof ba.onCommitFiberRoot)try{ba.onCommitFiberRoot(ga,n,void 0,64==(64&n.current.flags))}catch(e){}if(su(e,ja()),Hi)throw Hi=!1,e=Qi,Qi=null,e;return 0!=(8&xi)||Ha(),null}function Pu(){for(;null!==Vi;){var e=Vi.alternate;au||null===ru||(0!=(8&Vi.flags)?Ze(Vi,ru)&&(au=!0):13===Vi.tag&&ki(e,Vi)&&Ze(Vi,ru)&&(au=!0));var t=Vi.flags;0!=(256&t)&&fi(e,Vi),0==(512&t)||Wi||(Wi=!0,Va(97,(function(){return Tu(),null}))),Vi=Vi.nextEffect}}function Tu(){if(90!==Ki){var e=97<Ki?97:Ki;return Ki=90,Ba(e,zu)}return!1}function Nu(e,t){Yi.push(t,e),Wi||(Wi=!0,Va(97,(function(){return Tu(),null})))}function Lu(e,t){Xi.push(t,e),Wi||(Wi=!0,Va(97,(function(){return Tu(),null})))}function zu(){if(null===qi)return!1;var e=qi;if(qi=null,0!=(48&xi))throw Error(o(331));var t=xi;xi|=32;var n=Xi;Xi=[];for(var r=0;r<n.length;r+=2){var a=n[r],l=n[r+1],i=a.destroy;if(a.destroy=void 0,"function"==typeof i)try{i()}catch(e){if(null===l)throw Error(o(330));Iu(l,e)}}for(n=Yi,Yi=[],r=0;r<n.length;r+=2){a=n[r],l=n[r+1];try{var u=a.create;a.destroy=u()}catch(e){if(null===l)throw Error(o(330));Iu(l,e)}}for(u=e.current.firstEffect;null!==u;)e=u.nextEffect,u.nextEffect=null,8&u.flags&&(u.sibling=null,u.stateNode=null),u=e;return xi=t,Ha(),!0}function Ou(e,t,n){ol(e,t=ii(0,t=ai(n,t),1)),t=lu(),null!==(e=uu(e,1))&&(Vt(e,1,t),su(e,t))}function Iu(e,t){if(3===e.tag)Ou(e,e,t);else for(var n=e.return;null!==n;){if(3===n.tag){Ou(n,e,t);break}if(1===n.tag){var r=n.stateNode;if("function"==typeof n.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===$i||!$i.has(r))){var a=ui(n,e=ai(t,e),1);if(ol(n,a),a=lu(),null!==(n=uu(n,1)))Vt(n,1,a),su(n,a);else if("function"==typeof r.componentDidCatch&&(null===$i||!$i.has(r)))try{r.componentDidCatch(t,e)}catch(e){}break}}n=n.return}}function Mu(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=lu(),e.pingedLanes|=e.suspendedLanes&n,Ci===e&&(Ti&n)===n&&(4===zi||3===zi&&(62914560&Ti)===Ti&&500>ja()-ji?vu(e,0):Di|=n),su(e,t)}function Ru(e,t){var n=e.stateNode;null!==n&&n.delete(t),0===(t=0)&&(0==(2&(t=e.mode))?t=1:0==(4&t)?t=99===Ua()?1:2:(0===tu&&(tu=Ii),0===(t=At(62914560&~tu))&&(t=4194304))),n=lu(),null!==(e=uu(e,t))&&(Vt(e,t,n),su(e,n))}function Du(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.flags=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childLanes=this.lanes=0,this.alternate=null}function Fu(e,t,n,r){return new Du(e,t,n,r)}function ju(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Uu(e,t){var n=e.alternate;return null===n?((n=Fu(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.nextEffect=null,n.firstEffect=null,n.lastEffect=null),n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Au(e,t,n,r,a,l){var i=2;if(r=e,"function"==typeof e)ju(e)&&(i=1);else if("string"==typeof e)i=5;else e:switch(e){case _:return Bu(n.children,a,l,t);case D:i=8,a|=16;break;case x:i=8,a|=1;break;case C:return(e=Fu(12,n,t,8|a)).elementType=C,e.type=C,e.lanes=l,e;case L:return(e=Fu(13,n,t,a)).type=L,e.elementType=L,e.lanes=l,e;case z:return(e=Fu(19,n,t,a)).elementType=z,e.lanes=l,e;case F:return Vu(n,a,l,t);case j:return(e=Fu(24,n,t,a)).elementType=j,e.lanes=l,e;default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case P:i=10;break e;case T:i=9;break e;case N:i=11;break e;case O:i=14;break e;case I:i=16,r=null;break e;case M:i=22;break e}throw Error(o(130,null==e?e:typeof e,""))}return(t=Fu(i,n,t,a)).elementType=e,t.type=r,t.lanes=l,t}function Bu(e,t,n,r){return(e=Fu(7,e,r,t)).lanes=n,e}function Vu(e,t,n,r){return(e=Fu(23,e,r,t)).elementType=F,e.lanes=n,e}function Hu(e,t,n){return(e=Fu(6,e,null,t)).lanes=n,e}function Qu(e,t,n){return(t=Fu(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function $u(e,t,n){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.pendingContext=this.context=null,this.hydrate=n,this.callbackNode=null,this.callbackPriority=0,this.eventTimes=Bt(0),this.expirationTimes=Bt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Bt(0),this.mutableSourceEagerHydrationData=null}function Wu(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:S,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}function qu(e,t,n,r){var a=t.current,l=lu(),i=ou(a);e:if(n){t:{if(Ye(n=n._reactInternals)!==n||1!==n.tag)throw Error(o(170));var u=n;do{switch(u.tag){case 3:u=u.stateNode.context;break t;case 1:if(da(u.type)){u=u.stateNode.__reactInternalMemoizedMergedChildContext;break t}}u=u.return}while(null!==u);throw Error(o(171))}if(1===n.tag){var s=n.type;if(da(s)){n=ha(n,s,u);break e}}n=u}else n=ia;return null===t.context?t.context=n:t.pendingContext=n,(t=ll(l,i)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),ol(a,t),iu(a,i,l),i}function Ku(e){if(!(e=e.current).child)return null;switch(e.child.tag){case 5:default:return e.child.stateNode}}function Yu(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function Xu(e,t){Yu(e,t),(e=e.alternate)&&Yu(e,t)}function Gu(e,t,n){var r=null!=n&&null!=n.hydrationOptions&&n.hydrationOptions.mutableSources||null;if(n=new $u(e,t,null!=n&&!0===n.hydrate),t=Fu(3,null,null,2===t?7:1===t?3:0),n.current=t,t.stateNode=n,rl(t),e[Yr]=n.current,Pr(8===e.nodeType?e.parentNode:e),r)for(e=0;e<r.length;e++){var a=(t=r[e])._getVersion;a=a(t._source),null==n.mutableSourceEagerHydrationData?n.mutableSourceEagerHydrationData=[t,a]:n.mutableSourceEagerHydrationData.push(t,a)}this._internalRoot=n}function Ju(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function Zu(e,t,n,r,a){var l=n._reactRootContainer;if(l){var o=l._internalRoot;if("function"==typeof a){var i=a;a=function(){var e=Ku(o);i.call(e)}}qu(t,o,e,a)}else{if(l=n._reactRootContainer=function(e,t){if(t||(t=!(!(t=e?9===e.nodeType?e.documentElement:e.firstChild:null)||1!==t.nodeType||!t.hasAttribute("data-reactroot"))),!t)for(var n;n=e.lastChild;)e.removeChild(n);return new Gu(e,0,t?{hydrate:!0}:void 0)}(n,r),o=l._internalRoot,"function"==typeof a){var u=a;a=function(){var e=Ku(o);u.call(e)}}mu((function(){qu(t,o,e,a)}))}return Ku(o)}function es(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!Ju(t))throw Error(o(200));return Wu(e,t,null,n)}Bi=function(e,t,n){var r=t.lanes;if(null!==e)if(e.memoizedProps!==t.pendingProps||sa.current)Oo=!0;else{if(0==(n&r)){switch(Oo=!1,t.tag){case 3:Vo(t),Vl();break;case 5:Ll(t);break;case 1:da(t.type)&&ya(t);break;case 4:Tl(t,t.stateNode.containerInfo);break;case 10:r=t.memoizedProps.value;var a=t.type._context;oa(qa,a._currentValue),a._currentValue=r;break;case 13:if(null!==t.memoizedState)return 0!=(n&t.child.childLanes)?qo(e,t,n):(oa(Ol,1&Ol.current),null!==(t=ei(e,t,n))?t.sibling:null);oa(Ol,1&Ol.current);break;case 19:if(r=0!=(n&t.childLanes),0!=(64&e.flags)){if(r)return Zo(e,t,n);t.flags|=64}if(null!==(a=t.memoizedState)&&(a.rendering=null,a.tail=null,a.lastEffect=null),oa(Ol,Ol.current),r)break;return null;case 23:case 24:return t.lanes=0,Fo(e,t,n)}return ei(e,t,n)}Oo=0!=(16384&e.flags)}else Oo=!1;switch(t.lanes=0,t.tag){case 2:if(r=t.type,null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,a=fa(t,ua.current),el(t,n),a=to(null,t,r,e,a,n),t.flags|=1,"object"==typeof a&&null!==a&&"function"==typeof a.render&&void 0===a.$$typeof){if(t.tag=1,t.memoizedState=null,t.updateQueue=null,da(r)){var l=!0;ya(t)}else l=!1;t.memoizedState=null!==a.state&&void 0!==a.state?a.state:null,rl(t);var i=r.getDerivedStateFromProps;"function"==typeof i&&fl(t,r,i,e),a.updater=dl,t.stateNode=a,a._reactInternals=t,yl(t,r,e,n),t=Bo(null,t,r,!0,l,n)}else t.tag=0,Io(null,t,a,n),t=t.child;return t;case 16:a=t.elementType;e:{switch(null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,a=(l=a._init)(a._payload),t.type=a,l=t.tag=function(e){if("function"==typeof e)return ju(e)?1:0;if(null!=e){if((e=e.$$typeof)===N)return 11;if(e===O)return 14}return 2}(a),e=Wa(a,e),l){case 0:t=Uo(null,t,a,e,n);break e;case 1:t=Ao(null,t,a,e,n);break e;case 11:t=Mo(null,t,a,e,n);break e;case 14:t=Ro(null,t,a,Wa(a.type,e),r,n);break e}throw Error(o(306,a,""))}return t;case 0:return r=t.type,a=t.pendingProps,Uo(e,t,r,a=t.elementType===r?a:Wa(r,a),n);case 1:return r=t.type,a=t.pendingProps,Ao(e,t,r,a=t.elementType===r?a:Wa(r,a),n);case 3:if(Vo(t),r=t.updateQueue,null===e||null===r)throw Error(o(282));if(r=t.pendingProps,a=null!==(a=t.memoizedState)?a.element:null,al(e,t),ul(t,r,null,n),(r=t.memoizedState.element)===a)Vl(),t=ei(e,t,n);else{if((l=(a=t.stateNode).hydrate)&&(Rl=Hr(t.stateNode.containerInfo.firstChild),Ml=t,l=Dl=!0),l){if(null!=(e=a.mutableSourceEagerHydrationData))for(a=0;a<e.length;a+=2)(l=e[a])._workInProgressVersionPrimary=e[a+1],Hl.push(l);for(n=El(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|1024,n=n.sibling}else Io(e,t,r,n),Vl();t=t.child}return t;case 5:return Ll(t),null===e&&Ul(t),r=t.type,a=t.pendingProps,l=null!==e?e.memoizedProps:null,i=a.children,Ur(r,a)?i=null:null!==l&&Ur(r,l)&&(t.flags|=16),jo(e,t),Io(e,t,i,n),t.child;case 6:return null===e&&Ul(t),null;case 13:return qo(e,t,n);case 4:return Tl(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=kl(t,null,r,n):Io(e,t,r,n),t.child;case 11:return r=t.type,a=t.pendingProps,Mo(e,t,r,a=t.elementType===r?a:Wa(r,a),n);case 7:return Io(e,t,t.pendingProps,n),t.child;case 8:case 12:return Io(e,t,t.pendingProps.children,n),t.child;case 10:e:{r=t.type._context,a=t.pendingProps,i=t.memoizedProps,l=a.value;var u=t.type._context;if(oa(qa,u._currentValue),u._currentValue=l,null!==i)if(u=i.value,0===(l=or(u,l)?0:0|("function"==typeof r._calculateChangedBits?r._calculateChangedBits(u,l):1073741823))){if(i.children===a.children&&!sa.current){t=ei(e,t,n);break e}}else for(null!==(u=t.child)&&(u.return=t);null!==u;){var s=u.dependencies;if(null!==s){i=u.child;for(var c=s.firstContext;null!==c;){if(c.context===r&&0!=(c.observedBits&l)){1===u.tag&&((c=ll(-1,n&-n)).tag=2,ol(u,c)),u.lanes|=n,null!==(c=u.alternate)&&(c.lanes|=n),Za(u.return,n),s.lanes|=n;break}c=c.next}}else i=10===u.tag&&u.type===t.type?null:u.child;if(null!==i)i.return=u;else for(i=u;null!==i;){if(i===t){i=null;break}if(null!==(u=i.sibling)){u.return=i.return,i=u;break}i=i.return}u=i}Io(e,t,a.children,n),t=t.child}return t;case 9:return a=t.type,r=(l=t.pendingProps).children,el(t,n),r=r(a=tl(a,l.unstable_observedBits)),t.flags|=1,Io(e,t,r,n),t.child;case 14:return l=Wa(a=t.type,t.pendingProps),Ro(e,t,a,l=Wa(a.type,l),r,n);case 15:return Do(e,t,t.type,t.pendingProps,r,n);case 17:return r=t.type,a=t.pendingProps,a=t.elementType===r?a:Wa(r,a),null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),t.tag=1,da(r)?(e=!0,ya(t)):e=!1,el(t,n),ml(t,r,a),yl(t,r,a,n),Bo(null,t,r,!0,e,n);case 19:return Zo(e,t,n);case 23:case 24:return Fo(e,t,n)}throw Error(o(156,t.tag))},Gu.prototype.render=function(e){qu(e,this._internalRoot,null,null)},Gu.prototype.unmount=function(){var e=this._internalRoot,t=e.containerInfo;qu(null,e,null,(function(){t[Yr]=null}))},et=function(e){13===e.tag&&(iu(e,4,lu()),Xu(e,4))},tt=function(e){13===e.tag&&(iu(e,67108864,lu()),Xu(e,67108864))},nt=function(e){if(13===e.tag){var t=lu(),n=ou(e);iu(e,n,t),Xu(e,n)}},rt=function(e,t){return t()},Ce=function(e,t,n){switch(t){case"input":if(ne(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=ea(r);if(!a)throw Error(o(90));G(r),ne(r,a)}}}break;case"textarea":se(e,n);break;case"select":null!=(t=n.value)&&oe(e,!!n.multiple,t,!1)}},Oe=pu,Ie=function(e,t,n,r,a){var l=xi;xi|=4;try{return Ba(98,e.bind(null,t,n,r,a))}finally{0===(xi=l)&&(Ai(),Ha())}},Me=function(){0==(49&xi)&&(function(){if(null!==Gi){var e=Gi;Gi=null,e.forEach((function(e){e.expiredLanes|=24&e.pendingLanes,su(e,ja())}))}Ha()}(),Tu())},Re=function(e,t){var n=xi;xi|=2;try{return e(t)}finally{0===(xi=n)&&(Ai(),Ha())}};var ts={Events:[Jr,Zr,ea,Le,ze,Tu,{current:!1}]},ns={findFiberByHostInstance:Gr,bundleType:0,version:"17.0.1",rendererPackageName:"react-dom"},rs={bundleType:ns.bundleType,version:ns.version,rendererPackageName:ns.rendererPackageName,rendererConfig:ns.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:k.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=Je(e))?null:e.stateNode},findFiberByHostInstance:ns.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null};if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var as=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!as.isDisabled&&as.supportsFiber)try{ga=as.inject(rs),ba=as}catch(e){}}t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ts,t.createPortal=es,t.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"==typeof e.render)throw Error(o(188));throw Error(o(268,Object.keys(e)))}return e=null===(e=Je(t))?null:e.stateNode},t.flushSync=function(e,t){var n=xi;if(0!=(48&n))return e(t);xi|=1;try{if(e)return Ba(99,e.bind(null,t))}finally{xi=n,Ha()}},t.hydrate=function(e,t,n){if(!Ju(t))throw Error(o(200));return Zu(null,e,t,!0,n)},t.render=function(e,t,n){if(!Ju(t))throw Error(o(200));return Zu(null,e,t,!1,n)},t.unmountComponentAtNode=function(e){if(!Ju(e))throw Error(o(40));return!!e._reactRootContainer&&(mu((function(){Zu(null,null,e,!1,(function(){e._reactRootContainer=null,e[Yr]=null}))})),!0)},t.unstable_batchedUpdates=pu,t.unstable_createPortal=function(e,t){return es(e,t,2<arguments.length&&void 0!==arguments[2]?arguments[2]:null)},t.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Ju(n))throw Error(o(200));if(null==e||void 0===e._reactInternals)throw Error(o(38));return Zu(e,t,n,!1,r)},t.version="17.0.1"},function(e,t,n){"use strict";e.exports=n(7)},function(e,t,n){"use strict";
|
23 |
/** @license React v0.20.1
|
24 |
* scheduler.production.min.js
|
25 |
*
|
@@ -27,4 +27,4 @@ object-assign
|
|
27 |
*
|
28 |
* This source code is licensed under the MIT license found in the
|
29 |
* LICENSE file in the root directory of this source tree.
|
30 |
-
*/var r,a,l,o;if("object"==typeof performance&&"function"==typeof performance.now){var i=performance;t.unstable_now=function(){return i.now()}}else{var u=Date,s=u.now();t.unstable_now=function(){return u.now()-s}}if("undefined"==typeof window||"function"!=typeof MessageChannel){var c=null,f=null,d=function(){if(null!==c)try{var e=t.unstable_now();c(!0,e),c=null}catch(e){throw setTimeout(d,0),e}};r=function(e){null!==c?setTimeout(r,0,e):(c=e,setTimeout(d,0))},a=function(e,t){f=setTimeout(e,t)},l=function(){clearTimeout(f)},t.unstable_shouldYield=function(){return!1},o=t.unstable_forceFrameRate=function(){}}else{var p=window.setTimeout,m=window.clearTimeout;if("undefined"!=typeof console){var h=window.cancelAnimationFrame;"function"!=typeof window.requestAnimationFrame&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),"function"!=typeof h&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills")}var y=!1,v=null,g=-1,b=5,w=0;t.unstable_shouldYield=function(){return t.unstable_now()>=w},o=function(){},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):b=0<e?Math.floor(1e3/e):5};var k=new MessageChannel,E=k.port2;k.port1.onmessage=function(){if(null!==v){var e=t.unstable_now();w=e+b;try{v(!0,e)?E.postMessage(null):(y=!1,v=null)}catch(e){throw E.postMessage(null),e}}else y=!1},r=function(e){v=e,y||(y=!0,E.postMessage(null))},a=function(e,n){g=p((function(){e(t.unstable_now())}),n)},l=function(){m(g),g=-1}}function S(e,t){var n=e.length;e.push(t);e:for(;;){var r=n-1>>>1,a=e[r];if(!(void 0!==a&&0<C(a,t)))break e;e[r]=t,e[n]=a,n=r}}function _(e){return void 0===(e=e[0])?null:e}function x(e){var t=e[0];if(void 0!==t){var n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,a=e.length;r<a;){var l=2*(r+1)-1,o=e[l],i=l+1,u=e[i];if(void 0!==o&&0>C(o,n))void 0!==u&&0>C(u,o)?(e[r]=u,e[i]=n,r=i):(e[r]=o,e[l]=n,r=l);else{if(!(void 0!==u&&0>C(u,n)))break e;e[r]=u,e[i]=n,r=i}}}return t}return null}function C(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}var P=[],T=[],N=1,L=null,z=3,O=!1,I=!1,M=!1;function R(e){for(var t=_(T);null!==t;){if(null===t.callback)x(T);else{if(!(t.startTime<=e))break;x(T),t.sortIndex=t.expirationTime,S(P,t)}t=_(T)}}function D(e){if(M=!1,R(e),!I)if(null!==_(P))I=!0,r(F);else{var t=_(T);null!==t&&a(D,t.startTime-e)}}function F(e,n){I=!1,M&&(M=!1,l()),O=!0;var r=z;try{for(R(n),L=_(P);null!==L&&(!(L.expirationTime>n)||e&&!t.unstable_shouldYield());){var o=L.callback;if("function"==typeof o){L.callback=null,z=L.priorityLevel;var i=o(L.expirationTime<=n);n=t.unstable_now(),"function"==typeof i?L.callback=i:L===_(P)&&x(P),R(n)}else x(P);L=_(P)}if(null!==L)var u=!0;else{var s=_(T);null!==s&&a(D,s.startTime-n),u=!1}return u}finally{L=null,z=r,O=!1}}var j=o;t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){I||O||(I=!0,r(F))},t.unstable_getCurrentPriorityLevel=function(){return z},t.unstable_getFirstCallbackNode=function(){return _(P)},t.unstable_next=function(e){switch(z){case 1:case 2:case 3:var t=3;break;default:t=z}var n=z;z=t;try{return e()}finally{z=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=j,t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=z;z=e;try{return t()}finally{z=n}},t.unstable_scheduleCallback=function(e,n,o){var i=t.unstable_now();switch("object"==typeof o&&null!==o?o="number"==typeof(o=o.delay)&&0<o?i+o:i:o=i,e){case 1:var u=-1;break;case 2:u=250;break;case 5:u=1073741823;break;case 4:u=1e4;break;default:u=5e3}return e={id:N++,callback:n,priorityLevel:e,startTime:o,expirationTime:u=o+u,sortIndex:-1},o>i?(e.sortIndex=o,S(T,e),null===_(P)&&e===_(T)&&(M?l():M=!0,a(D,o-i))):(e.sortIndex=u,S(P,e),I||O||(I=!0,r(F))),e},t.unstable_wrapCallback=function(e){var t=z;return function(){var n=z;z=t;try{return e.apply(this,arguments)}finally{z=n}}}},function(e,t,n){"use strict";n.r(t),n.d(t,"yasrSearchStarsDom",(function(){return O}));var r,a=n(0),l=n.n(a),o=n(2),i=n.n(o);var u="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto),s=new Uint8Array(16);function c(){if(!u)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return u(s)}var f=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;for(var d=function(e){return"string"==typeof e&&f.test(e)},p=[],m=0;m<256;++m)p.push((m+256).toString(16).substr(1));var h=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(p[e[t+0]]+p[e[t+1]]+p[e[t+2]]+p[e[t+3]]+"-"+p[e[t+4]]+p[e[t+5]]+"-"+p[e[t+6]]+p[e[t+7]]+"-"+p[e[t+8]]+p[e[t+9]]+"-"+p[e[t+10]]+p[e[t+11]]+p[e[t+12]]+p[e[t+13]]+p[e[t+14]]+p[e[t+15]]).toLowerCase();if(!d(n))throw TypeError("Stringified UUID is invalid");return n};var y=function(e,t,n){var r=(e=e||{}).random||(e.rng||c)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var a=0;a<16;++a)t[n+a]=r[a];return t}return h(r)};function v(e){return(v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function g(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function b(e,t){return(b=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function w(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=E(e);if(t){var a=E(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return k(this,n)}}function k(e,t){return!t||"object"!==v(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function E(e){return(E=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var S=wp.i18n.__;function _(e){var t="yasr-ranking-element-"+y(),n=window[e.tableId].size;return l.a.createElement("div",{id:t,ref:function(){return raterJs({starSize:n,step:.1,showToolTip:!1,rating:e.rating,readOnly:!0,element:document.getElementById(t)})}})}function x(e){if(void 0!==e.post.number_of_votes)return l.a.createElement("span",{className:"yasr-most-rated-text"},"[",S("Total:","yet-another-stars-rating")," ",e.post.number_of_votes," ",S("Average:","yet-another-stars-rating")," ",e.post.rating,"]");var t=window[e.tableId].custom_text;return l.a.createElement("span",{className:"yasr-highest-rated-text"},t," ",e.post.rating)}function C(e){return l.a.createElement("td",{className:e.colClass},l.a.createElement("a",{href:e.post.link},function(e){if("string"!=typeof e||-1===e.indexOf("&"))return e;void 0===r&&(r=document.implementation&&document.implementation.createHTMLDocument?document.implementation.createHTMLDocument("").createElement("textarea"):document.createElement("textarea")),r.innerHTML=e;var t=r.textContent;return r.innerHTML="",t}(e.post.title)))}function P(e){return"before"===window[e.tableId].text_position?l.a.createElement("td",{className:e.colClass},l.a.createElement(x,{post:e.post,tableId:e.tableId}),l.a.createElement(_,{rating:e.post.rating,tableId:e.tableId})):l.a.createElement("td",{className:e.colClass},l.a.createElement(_,{rating:e.post.rating,tableId:e.tableId}),l.a.createElement(x,{post:e.post,tableId:e.tableId}))}function T(e){var t="",n="";return"overall_rating"===e.source?(t="yasr-top-10-overall-left",n="yasr-top-10-overall-right"):"visitor_votes"===e.source&&(t="yasr-top-10-most-highest-left",n="yasr-top-10-most-highest-right"),l.a.createElement("tr",{className:e.trClass},l.a.createElement(C,{colClass:t,post:e.post}),l.a.createElement(P,{colClass:n,post:e.post,tableId:e.tableId}))}function N(e){return l.a.createElement("tbody",{id:e.tBodyId,style:{display:e.show}},e.data.map((function(t,n){var r="yasr-rankings-td-colored";return"overall_rating"===e.source&&(r="yasr-rankings-td-white"),n%2==0&&(r="yasr-rankings-td-white","overall_rating"===e.source&&(r="yasr-rankings-td-colored")),l.a.createElement(T,{key:t.post_id,source:e.source,tableId:e.tableId,post:t,trClass:r})})))}var L=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&b(e,t)}(o,e);var t,n,r,a=w(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=a.call(this,e)).state={error:null,isLoaded:!1,data:[],tableId:e.tableId,source:e.source,queryParams:window[e.tableId].params},t}return t=o,(n=[{key:"componentDidMount",value:function(){var e=this,t={};if("yes"!==yasrCommonData.ajaxEnabled)console.info(S("Ajax Disabled, getting data from source","yet-another-stars-rating")),this.setState({isLoaded:!0,data:window[this.state.tableId]});else if(!1!==this.state.source){var n=this.returnRestUrl();Promise.all(n.map((function(n){return fetch(n).then((function(e){return!0===e.ok?e.json():(console.info(S("Ajax Call Failed. Getting data from source")),"KO")})).then((function(n){"KO"===n?t=window[e.state.tableId]:("overall_rating"===n.source&&(t=n),"visitor_votes"===n.source&&(t[n.show]=n.data_vv))})).catch((function(n){t=window[e.state.tableId],console.info(S(n))}))}))).then((function(n){e.setState({isLoaded:!0,data:t})})).catch((function(n){console.info(S(n)),e.setState({isLoaded:!0,data:t})}))}else this.setState({error:S("Invalid Data Source","yet-another-stars-rating")})}},{key:"returnRestUrl",value:function(){var e=""!==this.state.queryParams?this.state.queryParams:"",t=this.state.source,n=!1,r="yet-another-stars-rating/v1/yasr-rankings/";if(""!==e&&(e="&"+e),"overall_rating"===t&&(n=[yasrCommonData.restEndpoint+r+"?source="+t+e]),"visitor_votes"===t){var a="",l="";""!==window[this.state.tableId].required_votes&&(a="&required_votes="+window[this.state.tableId].required_votes.most,l="&required_votes="+window[this.state.tableId].required_votes.highest),n=[yasrCommonData.restEndpoint+r+"?show=most&source="+t+e+a,yasrCommonData.restEndpoint+r+"?show=highest&source="+t+e+l]}return n}},{key:"rankingTableHead",value:function(e){var t=this.state.tableId,n="link-most-rated-posts-"+t,r="link-highest-rated-posts-"+t;if("visitor_votes"===e){var a=window[this.state.tableId].view,o=l.a.createElement("span",null,l.a.createElement("span",{id:n},S("Most Rated","yet-another-stars-rating"))," | ",l.a.createElement("a",{href:"#",id:r,onClick:this.switchTBody.bind(this)},S("Highest Rated","yet-another-stars-rating")));return"highest"===a&&(o=l.a.createElement("span",null,l.a.createElement("span",{id:r},S("Highest Rated","yet-another-stars-rating"))," | ",l.a.createElement("a",{href:"#",id:n,onClick:this.switchTBody.bind(this)},S("Most Rated","yet-another-stars-rating")))),l.a.createElement("thead",null,l.a.createElement("tr",{className:"yasr-rankings-td-colored yasr-rankings-heading"},l.a.createElement("th",null,"Post"),l.a.createElement("th",null,S("Order By","yet-another-stars-rating-pro"),": ",o)))}return l.a.createElement(l.a.Fragment,null)}},{key:"switchTBody",value:function(e){e.preventDefault();var t=e.target.id,n=this.state.tableId,r="link-most-rated-posts-"+n,a="link-highest-rated-posts-"+n,l="most-rated-posts-"+n,o="highest-rated-posts-"+n,i=document.getElementById(t),u=document.createElement("span");u.innerHTML=i.innerHTML,u.id=i.id,i.parentNode.replaceChild(u,i),t===r&&(document.getElementById(o).style.display="none",document.getElementById(l).style.display="",u=document.getElementById(a),i.innerHTML=u.innerHTML,i.id=u.id,u.parentNode.replaceChild(i,u)),t===a&&(document.getElementById(l).style.display="none",document.getElementById(o).style.display="",u=document.getElementById(r),i.innerHTML=u.innerHTML,i.id=u.id,u.parentNode.replaceChild(i,u))}},{key:"rankingTableBody",value:function(){var e=this.state,t=e.data,n=e.source;if("overall_rating"===n)return l.a.createElement(N,{data:t.data_overall,tableId:this.state.tableId,tBodyId:"overall_"+this.state.tableId,show:"table-row-group",source:n});if("visitor_votes"===n){var r=t.most,a=t.highest,o="table-row-group",i="none";return"highest"===window[this.state.tableId].view&&(o="none",i="table-row-group"),l.a.createElement(l.a.Fragment,null,this.rankingTableHead(n),l.a.createElement(N,{data:r,tableId:this.state.tableId,tBodyId:"most-rated-posts-"+this.state.tableId,show:o,source:n}),l.a.createElement(N,{data:a,tableId:this.state.tableId,tBodyId:"highest-rated-posts-"+this.state.tableId,show:i,source:n}))}}},{key:"render",value:function(){var e=this.state,t=e.error,n=e.isLoaded;return t?l.a.createElement("tbody",null,l.a.createElement("tr",null,l.a.createElement("td",null,console.log(t),"Error"))):!1===n?l.a.createElement("tbody",null,l.a.createElement("tr",null,l.a.createElement("td",null,S("Loading Charts","yet-another-stars-rating")))):l.a.createElement(l.a.Fragment,null,this.rankingTableBody())}}])&&g(t.prototype,n),r&&g(t,r),o}(l.a.Component);var z=wp.i18n.__;function O(e){var t=document.getElementsByClassName(e);if(t.length>0){if("yasr-rater-stars"!==e&&"yasr-ranking-stars"!==e||function(e){for(var t=0;t<e.length;t++){var n=e.item(t).id;I(e.item(t).getAttribute("data-rater-starsize"),n)}}(t),"yasr-rater-stars-vv"===e&&(function(e){for(var t=0;t<e.length;t++)!function(t){var n=e.item(t).getAttribute("data-rating"),r=e.item(t).getAttribute("data-readonly-attribute"),a=e.item(t).getAttribute("data-rater-readonly");null===r&&(r=!1),r=R(r),a=R(a),!0===r&&(a=!0);var l=e.item(t).getAttribute("data-rater-postid"),o=e.item(t).id,i=o.replace("yasr-visitor-votes-rater-",""),u=parseInt(e.item(t).getAttribute("data-rater-starsize")),s=e.item(t).getAttribute("data-rater-nonce"),c=e.item(t).getAttribute("data-issingular"),f="yasr-vv-votes-number-container-"+i,d="yasr-vv-average-container-"+i,p=document.getElementById(f),m=document.getElementById(d),h="yasr-vv-loader-"+i,y=!1;if("yes"===yasrCommonData.ajaxEnabled){var v=e.item(t).getAttribute("data-cpt");""===v&&(v="posts");var g="wp/v2/"+v+"/"+l+"?_fields=yasr_visitor_votes&_wpnonce="+yasrCommonData.nonce;jQuery.get(yasrCommonData.restEndpoint+g).done((function(e){var t;(t=!0===r||e.yasr_visitor_votes.stars_attributes.read_only,n=(n=e.yasr_visitor_votes.number_of_votes>0?e.yasr_visitor_votes.sum_votes/e.yasr_visitor_votes.number_of_votes:0).toFixed(1),n=parseFloat(n),M(u,n,l,t,o,i,s,c,p,m,h),!0!==r)&&(null!==p&&(p.innerHTML=e.yasr_visitor_votes.number_of_votes),null!==m&&(m.innerHTML=n),!1!==e.yasr_visitor_votes.stars_attributes.span_bottom&&(y=e.yasr_visitor_votes.stars_attributes.span_bottom,document.getElementById(h).innerHTML=y))})).fail((function(e,t,f,d){console.info(z("YASR ajax call failed. Showing ratings from html","yet-another-stars-rating")),M(u,n,l,a,o,i,s,c,p,m,h),!0!==r&&(document.getElementById("yasr-below-stars-hidden-"+i).style.display="")}))}else M(u,n,l,a,o,i,s,c,p,m,h)}(t)}(t),"yes"===yasrCommonData.visitorStatsEnabled)){var n=document.getElementsByClassName("yasr-dashicons-visitor-stats");n&&function(e){for(var t=!1,n=0;n<e.length;n++)!function(n){var r="#"+e.item(n).id,a={action:"yasr_stats_visitors_votes",post_id:e.item(n).getAttribute("data-postid")};tippy(r,{content:'<span style="color: #0a0a0a">Loading...</span>',theme:"yasr",arrow:"true",arrowType:"round",onShow:function(e){r!==t&&jQuery.post(yasrCommonData.ajaxurl,a,(function(t){t=JSON.parse(t),e.setContent(t)}))},onHidden:function(){t=r}})}(n)}(n)}"yasr-multiset-visitors-rater"===e&&function(e){for(var t="",n=[],r=0;r<e.length;r++)!function(r){var a=e.item(r).id,l=e.item(r).getAttribute("data-rater-readonly");l=R(l);var o=document.querySelector("#"+a);raterJs({starSize:16,step:1,showToolTip:!1,readOnly:l,element:o,rateCallback:function(e,r){var a=o.getAttribute("data-rater-postid"),l=o.getAttribute("data-rater-setid"),i=o.getAttribute("data-rater-set-field-id");e=e.toFixed(1);var u=parseInt(e);this.setRating(u),t={postid:a,setid:l,field:i,rating:u},n.push(t),r()}})}(r);jQuery(".yasr-send-visitor-multiset").on("click",(function(){var e=this.getAttribute("data-postid"),t=this.getAttribute("data-setid"),r=this.getAttribute("data-nonce");jQuery("#yasr-send-visitor-multiset-"+e+"-"+t).hide(),jQuery("#yasr-loader-multiset-visitor-"+e+"-"+t).show();var a={action:"yasr_visitor_multiset_field_vote",nonce:r,post_id:e,rating:n,set_type:t};jQuery.post(yasrCommonData.ajaxurl,a,(function(n){jQuery("#yasr-loader-multiset-visitor-"+e+"-"+t).text(n)}))}))}(t)}}function I(e,t){e=parseInt(e),raterJs({starSize:e,step:.1,showToolTip:!1,readOnly:!0,element:document.getElementById(t)})}function M(e,t,n,r,a,l,o,i,u,s,c){t=parseFloat(t),r=R(r),raterJs({starSize:e,rating:t,step:1,showToolTip:!1,readOnly:r,element:document.getElementById(a),rateCallback:function(e,t){document.getElementById(c).innerHTML=yasrCommonData.loaderHtml;var r={action:"yasr_send_visitor_rating",rating:e,post_id:n,nonce_visitor:o,is_singular:i};this.setRating(e),this.disable(),jQuery.post(yasrCommonData.ajaxurl,r,(function(e){e=JSON.parse(e),null!==u&&(u.innerHTML=e.number_of_votes),null!==s&&(s.innerHTML=e.average_rating),document.getElementById(c).innerHTML=e.rating_saved_text})),t()}})}function R(e){return null!=e&&""!==e||(e=!0),"true"!==e&&"1"!==e||(e=!0),"false"!==e&&"0"!==e||(e=!1),e}document.addEventListener("DOMContentLoaded",(function(e){O("yasr-rater-stars"),O("yasr-rater-stars-vv"),O("yasr-multiset-visitors-rater"),function(){var e=document.getElementsByClassName("yasr-stars-rankings");if(e.length>0)for(var t=0;t<e.length;t++){var n=e.item(t).id,r=window[n].source,a=document.getElementById(n),o=!1;"overall_rating"!==r&&"visitor_votes"!==r||(o=r),i.a.render(l.a.createElement(L,{source:o,tableId:n}),a)}}()}))}]);
|
11 |
*
|
12 |
* This source code is licensed under the MIT license found in the
|
13 |
* LICENSE file in the root directory of this source tree.
|
14 |
+
*/var r=n(1),a=60103,l=60106;t.Fragment=60107,t.StrictMode=60108,t.Profiler=60114;var o=60109,i=60110,u=60112;t.Suspense=60113;var s=60115,c=60116;if("function"==typeof Symbol&&Symbol.for){var f=Symbol.for;a=f("react.element"),l=f("react.portal"),t.Fragment=f("react.fragment"),t.StrictMode=f("react.strict_mode"),t.Profiler=f("react.profiler"),o=f("react.provider"),i=f("react.context"),u=f("react.forward_ref"),t.Suspense=f("react.suspense"),s=f("react.memo"),c=f("react.lazy")}var d="function"==typeof Symbol&&Symbol.iterator;function p(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var m={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},h={};function g(e,t,n){this.props=e,this.context=t,this.refs=h,this.updater=n||m}function y(){}function v(e,t,n){this.props=e,this.context=t,this.refs=h,this.updater=n||m}g.prototype.isReactComponent={},g.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error(p(85));this.updater.enqueueSetState(this,e,t,"setState")},g.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},y.prototype=g.prototype;var b=v.prototype=new y;b.constructor=v,r(b,g.prototype),b.isPureReactComponent=!0;var w={current:null},k=Object.prototype.hasOwnProperty,E={key:!0,ref:!0,__self:!0,__source:!0};function S(e,t,n){var r,l={},o=null,i=null;if(null!=t)for(r in void 0!==t.ref&&(i=t.ref),void 0!==t.key&&(o=""+t.key),t)k.call(t,r)&&!E.hasOwnProperty(r)&&(l[r]=t[r]);var u=arguments.length-2;if(1===u)l.children=n;else if(1<u){for(var s=Array(u),c=0;c<u;c++)s[c]=arguments[c+2];l.children=s}if(e&&e.defaultProps)for(r in u=e.defaultProps)void 0===l[r]&&(l[r]=u[r]);return{$$typeof:a,type:e,key:o,ref:i,props:l,_owner:w.current}}function _(e){return"object"==typeof e&&null!==e&&e.$$typeof===a}var x=/\/+/g;function C(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function P(e,t,n,r,o){var i=typeof e;"undefined"!==i&&"boolean"!==i||(e=null);var u=!1;if(null===e)u=!0;else switch(i){case"string":case"number":u=!0;break;case"object":switch(e.$$typeof){case a:case l:u=!0}}if(u)return o=o(u=e),e=""===r?"."+C(u,0):r,Array.isArray(o)?(n="",null!=e&&(n=e.replace(x,"$&/")+"/"),P(o,t,n,"",(function(e){return e}))):null!=o&&(_(o)&&(o=function(e,t){return{$$typeof:a,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(o,n+(!o.key||u&&u.key===o.key?"":(""+o.key).replace(x,"$&/")+"/")+e)),t.push(o)),1;if(u=0,r=""===r?".":r+":",Array.isArray(e))for(var s=0;s<e.length;s++){var c=r+C(i=e[s],s);u+=P(i,t,n,c,o)}else if("function"==typeof(c=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=d&&e[d]||e["@@iterator"])?e:null}(e)))for(e=c.call(e),s=0;!(i=e.next()).done;)u+=P(i=i.value,t,n,c=r+C(i,s++),o);else if("object"===i)throw t=""+e,Error(p(31,"[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t));return u}function T(e,t,n){if(null==e)return e;var r=[],a=0;return P(e,r,"","",(function(e){return t.call(n,e,a++)})),r}function N(e){if(-1===e._status){var t=e._result;t=t(),e._status=0,e._result=t,t.then((function(t){0===e._status&&(t=t.default,e._status=1,e._result=t)}),(function(t){0===e._status&&(e._status=2,e._result=t)}))}if(1===e._status)return e._result;throw e._result}var L={current:null};function z(){var e=L.current;if(null===e)throw Error(p(321));return e}var O={ReactCurrentDispatcher:L,ReactCurrentBatchConfig:{transition:0},ReactCurrentOwner:w,IsSomeRendererActing:{current:!1},assign:r};t.Children={map:T,forEach:function(e,t,n){T(e,(function(){t.apply(this,arguments)}),n)},count:function(e){var t=0;return T(e,(function(){t++})),t},toArray:function(e){return T(e,(function(e){return e}))||[]},only:function(e){if(!_(e))throw Error(p(143));return e}},t.Component=g,t.PureComponent=v,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=O,t.cloneElement=function(e,t,n){if(null==e)throw Error(p(267,e));var l=r({},e.props),o=e.key,i=e.ref,u=e._owner;if(null!=t){if(void 0!==t.ref&&(i=t.ref,u=w.current),void 0!==t.key&&(o=""+t.key),e.type&&e.type.defaultProps)var s=e.type.defaultProps;for(c in t)k.call(t,c)&&!E.hasOwnProperty(c)&&(l[c]=void 0===t[c]&&void 0!==s?s[c]:t[c])}var c=arguments.length-2;if(1===c)l.children=n;else if(1<c){s=Array(c);for(var f=0;f<c;f++)s[f]=arguments[f+2];l.children=s}return{$$typeof:a,type:e.type,key:o,ref:i,props:l,_owner:u}},t.createContext=function(e,t){return void 0===t&&(t=null),(e={$$typeof:i,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:o,_context:e},e.Consumer=e},t.createElement=S,t.createFactory=function(e){var t=S.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:u,render:e}},t.isValidElement=_,t.lazy=function(e){return{$$typeof:c,_payload:{_status:-1,_result:e},_init:N}},t.memo=function(e,t){return{$$typeof:s,type:e,compare:void 0===t?null:t}},t.useCallback=function(e,t){return z().useCallback(e,t)},t.useContext=function(e,t){return z().useContext(e,t)},t.useDebugValue=function(){},t.useEffect=function(e,t){return z().useEffect(e,t)},t.useImperativeHandle=function(e,t,n){return z().useImperativeHandle(e,t,n)},t.useLayoutEffect=function(e,t){return z().useLayoutEffect(e,t)},t.useMemo=function(e,t){return z().useMemo(e,t)},t.useReducer=function(e,t,n){return z().useReducer(e,t,n)},t.useRef=function(e){return z().useRef(e)},t.useState=function(e){return z().useState(e)},t.version="17.0.1"},function(e,t,n){"use strict";
|
15 |
/** @license React v17.0.1
|
16 |
* react-dom.production.min.js
|
17 |
*
|
19 |
*
|
20 |
* This source code is licensed under the MIT license found in the
|
21 |
* LICENSE file in the root directory of this source tree.
|
22 |
+
*/var r=n(0),a=n(1),l=n(6);function o(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}if(!r)throw Error(o(227));var i=new Set,u={};function s(e,t){c(e,t),c(e+"Capture",t)}function c(e,t){for(u[e]=t,e=0;e<t.length;e++)i.add(t[e])}var f=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),d=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,p=Object.prototype.hasOwnProperty,m={},h={};function g(e,t,n,r,a,l,o){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=a,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=l,this.removeEmptyString=o}var y={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){y[e]=new g(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];y[t]=new g(t,1,!1,e[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){y[e]=new g(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){y[e]=new g(e,2,!1,e,null,!1,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){y[e]=new g(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){y[e]=new g(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){y[e]=new g(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){y[e]=new g(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){y[e]=new g(e,5,!1,e.toLowerCase(),null,!1,!1)}));var v=/[\-:]([a-z])/g;function b(e){return e[1].toUpperCase()}function w(e,t,n,r){var a=y.hasOwnProperty(t)?y[t]:null;(null!==a?0===a.type:!r&&(2<t.length&&("o"===t[0]||"O"===t[0])&&("n"===t[1]||"N"===t[1])))||(function(e,t,n,r){if(null==t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,a,r)&&(n=null),r||null===a?function(e){return!!p.call(h,e)||!p.call(m,e)&&(d.test(e)?h[e]=!0:(m[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):a.mustUseProperty?e[a.propertyName]=null===n?3!==a.type&&"":n:(t=a.attributeName,r=a.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(a=a.type)||4===a&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(v,b);y[t]=new g(t,1,!1,e,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(v,b);y[t]=new g(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(v,b);y[t]=new g(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){y[e]=new g(e,1,!1,e.toLowerCase(),null,!1,!1)})),y.xlinkHref=new g("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){y[e]=new g(e,1,!1,e.toLowerCase(),null,!0,!0)}));var k=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,E=60103,S=60106,_=60107,x=60108,C=60114,P=60109,T=60110,N=60112,L=60113,z=60120,O=60115,I=60116,M=60121,R=60128,D=60129,F=60130,U=60131;if("function"==typeof Symbol&&Symbol.for){var j=Symbol.for;E=j("react.element"),S=j("react.portal"),_=j("react.fragment"),x=j("react.strict_mode"),C=j("react.profiler"),P=j("react.provider"),T=j("react.context"),N=j("react.forward_ref"),L=j("react.suspense"),z=j("react.suspense_list"),O=j("react.memo"),I=j("react.lazy"),M=j("react.block"),j("react.scope"),R=j("react.opaque.id"),D=j("react.debug_trace_mode"),F=j("react.offscreen"),U=j("react.legacy_hidden")}var A,B="function"==typeof Symbol&&Symbol.iterator;function V(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=B&&e[B]||e["@@iterator"])?e:null}function H(e){if(void 0===A)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);A=t&&t[1]||""}return"\n"+A+e}var Q=!1;function $(e,t){if(!e||Q)return"";Q=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(e){var r=e}Reflect.construct(e,[],t)}else{try{t.call()}catch(e){r=e}e.call(t.prototype)}else{try{throw Error()}catch(e){r=e}e()}}catch(e){if(e&&r&&"string"==typeof e.stack){for(var a=e.stack.split("\n"),l=r.stack.split("\n"),o=a.length-1,i=l.length-1;1<=o&&0<=i&&a[o]!==l[i];)i--;for(;1<=o&&0<=i;o--,i--)if(a[o]!==l[i]){if(1!==o||1!==i)do{if(o--,0>--i||a[o]!==l[i])return"\n"+a[o].replace(" at new "," at ")}while(1<=o&&0<=i);break}}}finally{Q=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?H(e):""}function W(e){switch(e.tag){case 5:return H(e.type);case 16:return H("Lazy");case 13:return H("Suspense");case 19:return H("SuspenseList");case 0:case 2:case 15:return e=$(e.type,!1);case 11:return e=$(e.type.render,!1);case 22:return e=$(e.type._render,!1);case 1:return e=$(e.type,!0);default:return""}}function q(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case _:return"Fragment";case S:return"Portal";case C:return"Profiler";case x:return"StrictMode";case L:return"Suspense";case z:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case T:return(e.displayName||"Context")+".Consumer";case P:return(e._context.displayName||"Context")+".Provider";case N:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(""!==t?"ForwardRef("+t+")":"ForwardRef");case O:return q(e.type);case M:return q(e._render);case I:t=e._payload,e=e._init;try{return q(e(t))}catch(e){}}return null}function K(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function Y(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function X(e){e._valueTracker||(e._valueTracker=function(e){var t=Y(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var a=n.get,l=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return a.call(this)},set:function(e){r=""+e,l.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function G(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Y(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function J(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function Z(e,t){var n=t.checked;return a({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function ee(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=K(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function te(e,t){null!=(t=t.checked)&&w(e,"checked",t,!1)}function ne(e,t){te(e,t);var n=K(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?ae(e,t.type,n):t.hasOwnProperty("defaultValue")&&ae(e,t.type,K(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function re(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function ae(e,t,n){"number"===t&&J(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}function le(e,t){return e=a({children:void 0},t),(t=function(e){var t="";return r.Children.forEach(e,(function(e){null!=e&&(t+=e)})),t}(t.children))&&(e.children=t),e}function oe(e,t,n,r){if(e=e.options,t){t={};for(var a=0;a<n.length;a++)t["$"+n[a]]=!0;for(n=0;n<e.length;n++)a=t.hasOwnProperty("$"+e[n].value),e[n].selected!==a&&(e[n].selected=a),a&&r&&(e[n].defaultSelected=!0)}else{for(n=""+K(n),t=null,a=0;a<e.length;a++){if(e[a].value===n)return e[a].selected=!0,void(r&&(e[a].defaultSelected=!0));null!==t||e[a].disabled||(t=e[a])}null!==t&&(t.selected=!0)}}function ie(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(o(91));return a({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function ue(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(o(92));if(Array.isArray(n)){if(!(1>=n.length))throw Error(o(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:K(n)}}function se(e,t){var n=K(t.value),r=K(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function ce(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}var fe="http://www.w3.org/1999/xhtml",de="http://www.w3.org/2000/svg";function pe(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function me(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?pe(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var he,ge=function(e){return"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(t,n,r,a){MSApp.execUnsafeLocalFunction((function(){return e(t,n)}))}:e}((function(e,t){if(e.namespaceURI!==de||"innerHTML"in e)e.innerHTML=t;else{for((he=he||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=he.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}}));function ye(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var ve={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},be=["Webkit","ms","Moz","O"];function we(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||ve.hasOwnProperty(e)&&ve[e]?(""+t).trim():t+"px"}function ke(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),a=we(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,a):e[n]=a}}Object.keys(ve).forEach((function(e){be.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),ve[t]=ve[e]}))}));var Ee=a({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Se(e,t){if(t){if(Ee[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(o(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(o(60));if("object"!=typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(o(61))}if(null!=t.style&&"object"!=typeof t.style)throw Error(o(62))}}function _e(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}function xe(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var Ce=null,Pe=null,Te=null;function Ne(e){if(e=Jr(e)){if("function"!=typeof Ce)throw Error(o(280));var t=e.stateNode;t&&(t=ea(t),Ce(e.stateNode,e.type,t))}}function Le(e){Pe?Te?Te.push(e):Te=[e]:Pe=e}function ze(){if(Pe){var e=Pe,t=Te;if(Te=Pe=null,Ne(e),t)for(e=0;e<t.length;e++)Ne(t[e])}}function Oe(e,t){return e(t)}function Ie(e,t,n,r,a){return e(t,n,r,a)}function Me(){}var Re=Oe,De=!1,Fe=!1;function Ue(){null===Pe&&null===Te||(Me(),ze())}function je(e,t){var n=e.stateNode;if(null===n)return null;var r=ea(n);if(null===r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!=typeof n)throw Error(o(231,t,typeof n));return n}var Ae=!1;if(f)try{var Be={};Object.defineProperty(Be,"passive",{get:function(){Ae=!0}}),window.addEventListener("test",Be,Be),window.removeEventListener("test",Be,Be)}catch(e){Ae=!1}function Ve(e,t,n,r,a,l,o,i,u){var s=Array.prototype.slice.call(arguments,3);try{t.apply(n,s)}catch(e){this.onError(e)}}var He=!1,Qe=null,$e=!1,We=null,qe={onError:function(e){He=!0,Qe=e}};function Ke(e,t,n,r,a,l,o,i,u){He=!1,Qe=null,Ve.apply(qe,arguments)}function Ye(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!=(1026&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function Xe(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function Ge(e){if(Ye(e)!==e)throw Error(o(188))}function Je(e){if(!(e=function(e){var t=e.alternate;if(!t){if(null===(t=Ye(e)))throw Error(o(188));return t!==e?null:e}for(var n=e,r=t;;){var a=n.return;if(null===a)break;var l=a.alternate;if(null===l){if(null!==(r=a.return)){n=r;continue}break}if(a.child===l.child){for(l=a.child;l;){if(l===n)return Ge(a),e;if(l===r)return Ge(a),t;l=l.sibling}throw Error(o(188))}if(n.return!==r.return)n=a,r=l;else{for(var i=!1,u=a.child;u;){if(u===n){i=!0,n=a,r=l;break}if(u===r){i=!0,r=a,n=l;break}u=u.sibling}if(!i){for(u=l.child;u;){if(u===n){i=!0,n=l,r=a;break}if(u===r){i=!0,r=l,n=a;break}u=u.sibling}if(!i)throw Error(o(189))}}if(n.alternate!==r)throw Error(o(190))}if(3!==n.tag)throw Error(o(188));return n.stateNode.current===n?e:t}(e)))return null;for(var t=e;;){if(5===t.tag||6===t.tag)return t;if(t.child)t.child.return=t,t=t.child;else{if(t===e)break;for(;!t.sibling;){if(!t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}}return null}function Ze(e,t){for(var n=e.alternate;null!==t;){if(t===e||t===n)return!0;t=t.return}return!1}var et,tt,nt,rt,at=!1,lt=[],ot=null,it=null,ut=null,st=new Map,ct=new Map,ft=[],dt="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function pt(e,t,n,r,a){return{blockedOn:e,domEventName:t,eventSystemFlags:16|n,nativeEvent:a,targetContainers:[r]}}function mt(e,t){switch(e){case"focusin":case"focusout":ot=null;break;case"dragenter":case"dragleave":it=null;break;case"mouseover":case"mouseout":ut=null;break;case"pointerover":case"pointerout":st.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ct.delete(t.pointerId)}}function ht(e,t,n,r,a,l){return null===e||e.nativeEvent!==l?(e=pt(t,n,r,a,l),null!==t&&(null!==(t=Jr(t))&&tt(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==a&&-1===t.indexOf(a)&&t.push(a),e)}function gt(e){var t=Gr(e.target);if(null!==t){var n=Ye(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=Xe(n)))return e.blockedOn=t,void rt(e.lanePriority,(function(){l.unstable_runWithPriority(e.priority,(function(){nt(n)}))}))}else if(3===t&&n.stateNode.hydrate)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function yt(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=Jt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=Jr(n))&&tt(t),e.blockedOn=n,!1;t.shift()}return!0}function vt(e,t,n){yt(e)&&n.delete(t)}function bt(){for(at=!1;0<lt.length;){var e=lt[0];if(null!==e.blockedOn){null!==(e=Jr(e.blockedOn))&&et(e);break}for(var t=e.targetContainers;0<t.length;){var n=Jt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n){e.blockedOn=n;break}t.shift()}null===e.blockedOn&<.shift()}null!==ot&&yt(ot)&&(ot=null),null!==it&&yt(it)&&(it=null),null!==ut&&yt(ut)&&(ut=null),st.forEach(vt),ct.forEach(vt)}function wt(e,t){e.blockedOn===t&&(e.blockedOn=null,at||(at=!0,l.unstable_scheduleCallback(l.unstable_NormalPriority,bt)))}function kt(e){function t(t){return wt(t,e)}if(0<lt.length){wt(lt[0],e);for(var n=1;n<lt.length;n++){var r=lt[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==ot&&wt(ot,e),null!==it&&wt(it,e),null!==ut&&wt(ut,e),st.forEach(t),ct.forEach(t),n=0;n<ft.length;n++)(r=ft[n]).blockedOn===e&&(r.blockedOn=null);for(;0<ft.length&&null===(n=ft[0]).blockedOn;)gt(n),null===n.blockedOn&&ft.shift()}function Et(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var St={animationend:Et("Animation","AnimationEnd"),animationiteration:Et("Animation","AnimationIteration"),animationstart:Et("Animation","AnimationStart"),transitionend:Et("Transition","TransitionEnd")},_t={},xt={};function Ct(e){if(_t[e])return _t[e];if(!St[e])return e;var t,n=St[e];for(t in n)if(n.hasOwnProperty(t)&&t in xt)return _t[e]=n[t];return e}f&&(xt=document.createElement("div").style,"AnimationEvent"in window||(delete St.animationend.animation,delete St.animationiteration.animation,delete St.animationstart.animation),"TransitionEvent"in window||delete St.transitionend.transition);var Pt=Ct("animationend"),Tt=Ct("animationiteration"),Nt=Ct("animationstart"),Lt=Ct("transitionend"),zt=new Map,Ot=new Map,It=["abort","abort",Pt,"animationEnd",Tt,"animationIteration",Nt,"animationStart","canplay","canPlay","canplaythrough","canPlayThrough","durationchange","durationChange","emptied","emptied","encrypted","encrypted","ended","ended","error","error","gotpointercapture","gotPointerCapture","load","load","loadeddata","loadedData","loadedmetadata","loadedMetadata","loadstart","loadStart","lostpointercapture","lostPointerCapture","playing","playing","progress","progress","seeking","seeking","stalled","stalled","suspend","suspend","timeupdate","timeUpdate",Lt,"transitionEnd","waiting","waiting"];function Mt(e,t){for(var n=0;n<e.length;n+=2){var r=e[n],a=e[n+1];a="on"+(a[0].toUpperCase()+a.slice(1)),Ot.set(r,t),zt.set(r,a),s(a,[r])}}(0,l.unstable_now)();var Rt=8;function Dt(e){if(0!=(1&e))return Rt=15,1;if(0!=(2&e))return Rt=14,2;if(0!=(4&e))return Rt=13,4;var t=24&e;return 0!==t?(Rt=12,t):0!=(32&e)?(Rt=11,32):0!==(t=192&e)?(Rt=10,t):0!=(256&e)?(Rt=9,256):0!==(t=3584&e)?(Rt=8,t):0!=(4096&e)?(Rt=7,4096):0!==(t=4186112&e)?(Rt=6,t):0!==(t=62914560&e)?(Rt=5,t):67108864&e?(Rt=4,67108864):0!=(134217728&e)?(Rt=3,134217728):0!==(t=805306368&e)?(Rt=2,t):0!=(1073741824&e)?(Rt=1,1073741824):(Rt=8,e)}function Ft(e,t){var n=e.pendingLanes;if(0===n)return Rt=0;var r=0,a=0,l=e.expiredLanes,o=e.suspendedLanes,i=e.pingedLanes;if(0!==l)r=l,a=Rt=15;else if(0!==(l=134217727&n)){var u=l&~o;0!==u?(r=Dt(u),a=Rt):0!==(i&=l)&&(r=Dt(i),a=Rt)}else 0!==(l=n&~o)?(r=Dt(l),a=Rt):0!==i&&(r=Dt(i),a=Rt);if(0===r)return 0;if(r=n&((0>(r=31-Ht(r))?0:1<<r)<<1)-1,0!==t&&t!==r&&0==(t&o)){if(Dt(t),a<=Rt)return t;Rt=a}if(0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)a=1<<(n=31-Ht(t)),r|=e[n],t&=~a;return r}function Ut(e){return 0!==(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function jt(e,t){switch(e){case 15:return 1;case 14:return 2;case 12:return 0===(e=At(24&~t))?jt(10,t):e;case 10:return 0===(e=At(192&~t))?jt(8,t):e;case 8:return 0===(e=At(3584&~t))&&(0===(e=At(4186112&~t))&&(e=512)),e;case 2:return 0===(t=At(805306368&~t))&&(t=268435456),t}throw Error(o(358,e))}function At(e){return e&-e}function Bt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Vt(e,t,n){e.pendingLanes|=t;var r=t-1;e.suspendedLanes&=r,e.pingedLanes&=r,(e=e.eventTimes)[t=31-Ht(t)]=n}var Ht=Math.clz32?Math.clz32:function(e){return 0===e?32:31-(Qt(e)/$t|0)|0},Qt=Math.log,$t=Math.LN2;var Wt=l.unstable_UserBlockingPriority,qt=l.unstable_runWithPriority,Kt=!0;function Yt(e,t,n,r){De||Me();var a=Gt,l=De;De=!0;try{Ie(a,e,t,n,r)}finally{(De=l)||Ue()}}function Xt(e,t,n,r){qt(Wt,Gt.bind(null,e,t,n,r))}function Gt(e,t,n,r){var a;if(Kt)if((a=0==(4&t))&&0<lt.length&&-1<dt.indexOf(e))e=pt(null,e,t,n,r),lt.push(e);else{var l=Jt(e,t,n,r);if(null===l)a&&mt(e,r);else{if(a){if(-1<dt.indexOf(e))return e=pt(l,e,t,n,r),void lt.push(e);if(function(e,t,n,r,a){switch(t){case"focusin":return ot=ht(ot,e,t,n,r,a),!0;case"dragenter":return it=ht(it,e,t,n,r,a),!0;case"mouseover":return ut=ht(ut,e,t,n,r,a),!0;case"pointerover":var l=a.pointerId;return st.set(l,ht(st.get(l)||null,e,t,n,r,a)),!0;case"gotpointercapture":return l=a.pointerId,ct.set(l,ht(ct.get(l)||null,e,t,n,r,a)),!0}return!1}(l,e,t,n,r))return;mt(e,r)}Lr(e,t,r,null,n)}}}function Jt(e,t,n,r){var a=xe(r);if(null!==(a=Gr(a))){var l=Ye(a);if(null===l)a=null;else{var o=l.tag;if(13===o){if(null!==(a=Xe(l)))return a;a=null}else if(3===o){if(l.stateNode.hydrate)return 3===l.tag?l.stateNode.containerInfo:null;a=null}else l!==a&&(a=null)}}return Lr(e,t,r,a,n),null}var Zt=null,en=null,tn=null;function nn(){if(tn)return tn;var e,t,n=en,r=n.length,a="value"in Zt?Zt.value:Zt.textContent,l=a.length;for(e=0;e<r&&n[e]===a[e];e++);var o=r-e;for(t=1;t<=o&&n[r-t]===a[l-t];t++);return tn=a.slice(e,1<t?1-t:void 0)}function rn(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function an(){return!0}function ln(){return!1}function on(e){function t(t,n,r,a,l){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=a,this.target=l,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(a):a[o]);return this.isDefaultPrevented=(null!=a.defaultPrevented?a.defaultPrevented:!1===a.returnValue)?an:ln,this.isPropagationStopped=ln,this}return a(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=an)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=an)},persist:function(){},isPersistent:an}),t}var un,sn,cn,fn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},dn=on(fn),pn=a({},fn,{view:0,detail:0}),mn=on(pn),hn=a({},pn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Cn,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==cn&&(cn&&"mousemove"===e.type?(un=e.screenX-cn.screenX,sn=e.screenY-cn.screenY):sn=un=0,cn=e),un)},movementY:function(e){return"movementY"in e?e.movementY:sn}}),gn=on(hn),yn=on(a({},hn,{dataTransfer:0})),vn=on(a({},pn,{relatedTarget:0})),bn=on(a({},fn,{animationName:0,elapsedTime:0,pseudoElement:0})),wn=on(a({},fn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}})),kn=on(a({},fn,{data:0})),En={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Sn={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},_n={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function xn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=_n[e])&&!!t[e]}function Cn(){return xn}var Pn=on(a({},pn,{key:function(e){if(e.key){var t=En[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=rn(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?Sn[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Cn,charCode:function(e){return"keypress"===e.type?rn(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?rn(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}})),Tn=on(a({},hn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Nn=on(a({},pn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Cn})),Ln=on(a({},fn,{propertyName:0,elapsedTime:0,pseudoElement:0})),zn=on(a({},hn,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),On=[9,13,27,32],In=f&&"CompositionEvent"in window,Mn=null;f&&"documentMode"in document&&(Mn=document.documentMode);var Rn=f&&"TextEvent"in window&&!Mn,Dn=f&&(!In||Mn&&8<Mn&&11>=Mn),Fn=String.fromCharCode(32),Un=!1;function jn(e,t){switch(e){case"keyup":return-1!==On.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function An(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var Bn=!1;var Vn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Hn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Vn[e.type]:"textarea"===t}function Qn(e,t,n,r){Le(r),0<(t=Or(t,"onChange")).length&&(n=new dn("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var $n=null,Wn=null;function qn(e){_r(e,0)}function Kn(e){if(G(Zr(e)))return e}function Yn(e,t){if("change"===e)return t}var Xn=!1;if(f){var Gn;if(f){var Jn="oninput"in document;if(!Jn){var Zn=document.createElement("div");Zn.setAttribute("oninput","return;"),Jn="function"==typeof Zn.oninput}Gn=Jn}else Gn=!1;Xn=Gn&&(!document.documentMode||9<document.documentMode)}function er(){$n&&($n.detachEvent("onpropertychange",tr),Wn=$n=null)}function tr(e){if("value"===e.propertyName&&Kn(Wn)){var t=[];if(Qn(t,Wn,e,xe(e)),e=qn,De)e(t);else{De=!0;try{Oe(e,t)}finally{De=!1,Ue()}}}}function nr(e,t,n){"focusin"===e?(er(),Wn=n,($n=t).attachEvent("onpropertychange",tr)):"focusout"===e&&er()}function rr(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Kn(Wn)}function ar(e,t){if("click"===e)return Kn(t)}function lr(e,t){if("input"===e||"change"===e)return Kn(t)}var or="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},ir=Object.prototype.hasOwnProperty;function ur(e,t){if(or(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++)if(!ir.call(t,n[r])||!or(e[n[r]],t[n[r]]))return!1;return!0}function sr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function cr(e,t){var n,r=sr(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=sr(r)}}function fr(){for(var e=window,t=J();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(e){n=!1}if(!n)break;t=J((e=t.contentWindow).document)}return t}function dr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}var pr=f&&"documentMode"in document&&11>=document.documentMode,mr=null,hr=null,gr=null,yr=!1;function vr(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;yr||null==mr||mr!==J(r)||("selectionStart"in(r=mr)&&dr(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},gr&&ur(gr,r)||(gr=r,0<(r=Or(hr,"onSelect")).length&&(t=new dn("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=mr)))}Mt("cancel cancel click click close close contextmenu contextMenu copy copy cut cut auxclick auxClick dblclick doubleClick dragend dragEnd dragstart dragStart drop drop focusin focus focusout blur input input invalid invalid keydown keyDown keypress keyPress keyup keyUp mousedown mouseDown mouseup mouseUp paste paste pause pause play play pointercancel pointerCancel pointerdown pointerDown pointerup pointerUp ratechange rateChange reset reset seeked seeked submit submit touchcancel touchCancel touchend touchEnd touchstart touchStart volumechange volumeChange".split(" "),0),Mt("drag drag dragenter dragEnter dragexit dragExit dragleave dragLeave dragover dragOver mousemove mouseMove mouseout mouseOut mouseover mouseOver pointermove pointerMove pointerout pointerOut pointerover pointerOver scroll scroll toggle toggle touchmove touchMove wheel wheel".split(" "),1),Mt(It,2);for(var br="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),wr=0;wr<br.length;wr++)Ot.set(br[wr],0);c("onMouseEnter",["mouseout","mouseover"]),c("onMouseLeave",["mouseout","mouseover"]),c("onPointerEnter",["pointerout","pointerover"]),c("onPointerLeave",["pointerout","pointerover"]),s("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),s("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),s("onBeforeInput",["compositionend","keypress","textInput","paste"]),s("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),s("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),s("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var kr="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Er=new Set("cancel close invalid load scroll toggle".split(" ").concat(kr));function Sr(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,r,a,l,i,u,s){if(Ke.apply(this,arguments),He){if(!He)throw Error(o(198));var c=Qe;He=!1,Qe=null,$e||($e=!0,We=c)}}(r,t,void 0,e),e.currentTarget=null}function _r(e,t){t=0!=(4&t);for(var n=0;n<e.length;n++){var r=e[n],a=r.event;r=r.listeners;e:{var l=void 0;if(t)for(var o=r.length-1;0<=o;o--){var i=r[o],u=i.instance,s=i.currentTarget;if(i=i.listener,u!==l&&a.isPropagationStopped())break e;Sr(a,i,s),l=u}else for(o=0;o<r.length;o++){if(u=(i=r[o]).instance,s=i.currentTarget,i=i.listener,u!==l&&a.isPropagationStopped())break e;Sr(a,i,s),l=u}}}if($e)throw e=We,$e=!1,We=null,e}function xr(e,t){var n=ta(t),r=e+"__bubble";n.has(r)||(Nr(t,e,2,!1),n.add(r))}var Cr="_reactListening"+Math.random().toString(36).slice(2);function Pr(e){e[Cr]||(e[Cr]=!0,i.forEach((function(t){Er.has(t)||Tr(t,!1,e,null),Tr(t,!0,e,null)})))}function Tr(e,t,n,r){var a=4<arguments.length&&void 0!==arguments[4]?arguments[4]:0,l=n;if("selectionchange"===e&&9!==n.nodeType&&(l=n.ownerDocument),null!==r&&!t&&Er.has(e)){if("scroll"!==e)return;a|=2,l=r}var o=ta(l),i=e+"__"+(t?"capture":"bubble");o.has(i)||(t&&(a|=4),Nr(l,e,a,t),o.add(i))}function Nr(e,t,n,r){var a=Ot.get(t);switch(void 0===a?2:a){case 0:a=Yt;break;case 1:a=Xt;break;default:a=Gt}n=a.bind(null,t,n,e),a=void 0,!Ae||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(a=!0),r?void 0!==a?e.addEventListener(t,n,{capture:!0,passive:a}):e.addEventListener(t,n,!0):void 0!==a?e.addEventListener(t,n,{passive:a}):e.addEventListener(t,n,!1)}function Lr(e,t,n,r,a){var l=r;if(0==(1&t)&&0==(2&t)&&null!==r)e:for(;;){if(null===r)return;var o=r.tag;if(3===o||4===o){var i=r.stateNode.containerInfo;if(i===a||8===i.nodeType&&i.parentNode===a)break;if(4===o)for(o=r.return;null!==o;){var u=o.tag;if((3===u||4===u)&&((u=o.stateNode.containerInfo)===a||8===u.nodeType&&u.parentNode===a))return;o=o.return}for(;null!==i;){if(null===(o=Gr(i)))return;if(5===(u=o.tag)||6===u){r=l=o;continue e}i=i.parentNode}}r=r.return}!function(e,t,n){if(Fe)return e(t,n);Fe=!0;try{Re(e,t,n)}finally{Fe=!1,Ue()}}((function(){var r=l,a=xe(n),o=[];e:{var i=zt.get(e);if(void 0!==i){var u=dn,s=e;switch(e){case"keypress":if(0===rn(n))break e;case"keydown":case"keyup":u=Pn;break;case"focusin":s="focus",u=vn;break;case"focusout":s="blur",u=vn;break;case"beforeblur":case"afterblur":u=vn;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":u=gn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":u=yn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":u=Nn;break;case Pt:case Tt:case Nt:u=bn;break;case Lt:u=Ln;break;case"scroll":u=mn;break;case"wheel":u=zn;break;case"copy":case"cut":case"paste":u=wn;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":u=Tn}var c=0!=(4&t),f=!c&&"scroll"===e,d=c?null!==i?i+"Capture":null:i;c=[];for(var p,m=r;null!==m;){var h=(p=m).stateNode;if(5===p.tag&&null!==h&&(p=h,null!==d&&(null!=(h=je(m,d))&&c.push(zr(m,h,p)))),f)break;m=m.return}0<c.length&&(i=new u(i,s,null,n,a),o.push({event:i,listeners:c}))}}if(0==(7&t)){if(u="mouseout"===e||"pointerout"===e,(!(i="mouseover"===e||"pointerover"===e)||0!=(16&t)||!(s=n.relatedTarget||n.fromElement)||!Gr(s)&&!s[Yr])&&(u||i)&&(i=a.window===a?a:(i=a.ownerDocument)?i.defaultView||i.parentWindow:window,u?(u=r,null!==(s=(s=n.relatedTarget||n.toElement)?Gr(s):null)&&(s!==(f=Ye(s))||5!==s.tag&&6!==s.tag)&&(s=null)):(u=null,s=r),u!==s)){if(c=gn,h="onMouseLeave",d="onMouseEnter",m="mouse","pointerout"!==e&&"pointerover"!==e||(c=Tn,h="onPointerLeave",d="onPointerEnter",m="pointer"),f=null==u?i:Zr(u),p=null==s?i:Zr(s),(i=new c(h,m+"leave",u,n,a)).target=f,i.relatedTarget=p,h=null,Gr(a)===r&&((c=new c(d,m+"enter",s,n,a)).target=p,c.relatedTarget=f,h=c),f=h,u&&s)e:{for(d=s,m=0,p=c=u;p;p=Ir(p))m++;for(p=0,h=d;h;h=Ir(h))p++;for(;0<m-p;)c=Ir(c),m--;for(;0<p-m;)d=Ir(d),p--;for(;m--;){if(c===d||null!==d&&c===d.alternate)break e;c=Ir(c),d=Ir(d)}c=null}else c=null;null!==u&&Mr(o,i,u,c,!1),null!==s&&null!==f&&Mr(o,f,s,c,!0)}if("select"===(u=(i=r?Zr(r):window).nodeName&&i.nodeName.toLowerCase())||"input"===u&&"file"===i.type)var g=Yn;else if(Hn(i))if(Xn)g=lr;else{g=rr;var y=nr}else(u=i.nodeName)&&"input"===u.toLowerCase()&&("checkbox"===i.type||"radio"===i.type)&&(g=ar);switch(g&&(g=g(e,r))?Qn(o,g,n,a):(y&&y(e,i,r),"focusout"===e&&(y=i._wrapperState)&&y.controlled&&"number"===i.type&&ae(i,"number",i.value)),y=r?Zr(r):window,e){case"focusin":(Hn(y)||"true"===y.contentEditable)&&(mr=y,hr=r,gr=null);break;case"focusout":gr=hr=mr=null;break;case"mousedown":yr=!0;break;case"contextmenu":case"mouseup":case"dragend":yr=!1,vr(o,n,a);break;case"selectionchange":if(pr)break;case"keydown":case"keyup":vr(o,n,a)}var v;if(In)e:{switch(e){case"compositionstart":var b="onCompositionStart";break e;case"compositionend":b="onCompositionEnd";break e;case"compositionupdate":b="onCompositionUpdate";break e}b=void 0}else Bn?jn(e,n)&&(b="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(b="onCompositionStart");b&&(Dn&&"ko"!==n.locale&&(Bn||"onCompositionStart"!==b?"onCompositionEnd"===b&&Bn&&(v=nn()):(en="value"in(Zt=a)?Zt.value:Zt.textContent,Bn=!0)),0<(y=Or(r,b)).length&&(b=new kn(b,e,null,n,a),o.push({event:b,listeners:y}),v?b.data=v:null!==(v=An(n))&&(b.data=v))),(v=Rn?function(e,t){switch(e){case"compositionend":return An(t);case"keypress":return 32!==t.which?null:(Un=!0,Fn);case"textInput":return(e=t.data)===Fn&&Un?null:e;default:return null}}(e,n):function(e,t){if(Bn)return"compositionend"===e||!In&&jn(e,t)?(e=nn(),tn=en=Zt=null,Bn=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Dn&&"ko"!==t.locale?null:t.data;default:return null}}(e,n))&&(0<(r=Or(r,"onBeforeInput")).length&&(a=new kn("onBeforeInput","beforeinput",null,n,a),o.push({event:a,listeners:r}),a.data=v))}_r(o,t)}))}function zr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Or(e,t){for(var n=t+"Capture",r=[];null!==e;){var a=e,l=a.stateNode;5===a.tag&&null!==l&&(a=l,null!=(l=je(e,n))&&r.unshift(zr(e,l,a)),null!=(l=je(e,t))&&r.push(zr(e,l,a))),e=e.return}return r}function Ir(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function Mr(e,t,n,r,a){for(var l=t._reactName,o=[];null!==n&&n!==r;){var i=n,u=i.alternate,s=i.stateNode;if(null!==u&&u===r)break;5===i.tag&&null!==s&&(i=s,a?null!=(u=je(n,l))&&o.unshift(zr(n,u,i)):a||null!=(u=je(n,l))&&o.push(zr(n,u,i))),n=n.return}0!==o.length&&e.push({event:t,listeners:o})}function Rr(){}var Dr=null,Fr=null;function Ur(e,t){switch(e){case"button":case"input":case"select":case"textarea":return!!t.autoFocus}return!1}function jr(e,t){return"textarea"===e||"option"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var Ar="function"==typeof setTimeout?setTimeout:void 0,Br="function"==typeof clearTimeout?clearTimeout:void 0;function Vr(e){1===e.nodeType?e.textContent="":9===e.nodeType&&(null!=(e=e.body)&&(e.textContent=""))}function Hr(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break}return e}function Qr(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var $r=0;var Wr=Math.random().toString(36).slice(2),qr="__reactFiber$"+Wr,Kr="__reactProps$"+Wr,Yr="__reactContainer$"+Wr,Xr="__reactEvents$"+Wr;function Gr(e){var t=e[qr];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Yr]||n[qr]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=Qr(e);null!==e;){if(n=e[qr])return n;e=Qr(e)}return t}n=(e=n).parentNode}return null}function Jr(e){return!(e=e[qr]||e[Yr])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function Zr(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(o(33))}function ea(e){return e[Kr]||null}function ta(e){var t=e[Xr];return void 0===t&&(t=e[Xr]=new Set),t}var na=[],ra=-1;function aa(e){return{current:e}}function la(e){0>ra||(e.current=na[ra],na[ra]=null,ra--)}function oa(e,t){ra++,na[ra]=e.current,e.current=t}var ia={},ua=aa(ia),sa=aa(!1),ca=ia;function fa(e,t){var n=e.type.contextTypes;if(!n)return ia;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var a,l={};for(a in n)l[a]=t[a];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=l),l}function da(e){return null!=(e=e.childContextTypes)}function pa(){la(sa),la(ua)}function ma(e,t,n){if(ua.current!==ia)throw Error(o(168));oa(ua,t),oa(sa,n)}function ha(e,t,n){var r=e.stateNode;if(e=t.childContextTypes,"function"!=typeof r.getChildContext)return n;for(var l in r=r.getChildContext())if(!(l in e))throw Error(o(108,q(t)||"Unknown",l));return a({},n,r)}function ga(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ia,ca=ua.current,oa(ua,e),oa(sa,sa.current),!0}function ya(e,t,n){var r=e.stateNode;if(!r)throw Error(o(169));n?(e=ha(e,t,ca),r.__reactInternalMemoizedMergedChildContext=e,la(sa),la(ua),oa(ua,e)):la(sa),oa(sa,n)}var va=null,ba=null,wa=l.unstable_runWithPriority,ka=l.unstable_scheduleCallback,Ea=l.unstable_cancelCallback,Sa=l.unstable_shouldYield,_a=l.unstable_requestPaint,xa=l.unstable_now,Ca=l.unstable_getCurrentPriorityLevel,Pa=l.unstable_ImmediatePriority,Ta=l.unstable_UserBlockingPriority,Na=l.unstable_NormalPriority,La=l.unstable_LowPriority,za=l.unstable_IdlePriority,Oa={},Ia=void 0!==_a?_a:function(){},Ma=null,Ra=null,Da=!1,Fa=xa(),Ua=1e4>Fa?xa:function(){return xa()-Fa};function ja(){switch(Ca()){case Pa:return 99;case Ta:return 98;case Na:return 97;case La:return 96;case za:return 95;default:throw Error(o(332))}}function Aa(e){switch(e){case 99:return Pa;case 98:return Ta;case 97:return Na;case 96:return La;case 95:return za;default:throw Error(o(332))}}function Ba(e,t){return e=Aa(e),wa(e,t)}function Va(e,t,n){return e=Aa(e),ka(e,t,n)}function Ha(){if(null!==Ra){var e=Ra;Ra=null,Ea(e)}Qa()}function Qa(){if(!Da&&null!==Ma){Da=!0;var e=0;try{var t=Ma;Ba(99,(function(){for(;e<t.length;e++){var n=t[e];do{n=n(!0)}while(null!==n)}})),Ma=null}catch(t){throw null!==Ma&&(Ma=Ma.slice(e+1)),ka(Pa,Ha),t}finally{Da=!1}}}var $a=k.ReactCurrentBatchConfig;function Wa(e,t){if(e&&e.defaultProps){for(var n in t=a({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}var qa=aa(null),Ka=null,Ya=null,Xa=null;function Ga(){Xa=Ya=Ka=null}function Ja(e){var t=qa.current;la(qa),e.type._context._currentValue=t}function Za(e,t){for(;null!==e;){var n=e.alternate;if((e.childLanes&t)===t){if(null===n||(n.childLanes&t)===t)break;n.childLanes|=t}else e.childLanes|=t,null!==n&&(n.childLanes|=t);e=e.return}}function el(e,t){Ka=e,Xa=Ya=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!=(e.lanes&t)&&(Oo=!0),e.firstContext=null)}function tl(e,t){if(Xa!==e&&!1!==t&&0!==t)if("number"==typeof t&&1073741823!==t||(Xa=e,t=1073741823),t={context:e,observedBits:t,next:null},null===Ya){if(null===Ka)throw Error(o(308));Ya=t,Ka.dependencies={lanes:0,firstContext:t,responders:null}}else Ya=Ya.next=t;return e._currentValue}var nl=!1;function rl(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null},effects:null}}function al(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function ll(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function ol(e,t){if(null!==(e=e.updateQueue)){var n=(e=e.shared).pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}}function il(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var a=null,l=null;if(null!==(n=n.firstBaseUpdate)){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===l?a=l=o:l=l.next=o,n=n.next}while(null!==n);null===l?a=l=t:l=l.next=t}else a=l=t;return n={baseState:r.baseState,firstBaseUpdate:a,lastBaseUpdate:l,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function ul(e,t,n,r){var l=e.updateQueue;nl=!1;var o=l.firstBaseUpdate,i=l.lastBaseUpdate,u=l.shared.pending;if(null!==u){l.shared.pending=null;var s=u,c=s.next;s.next=null,null===i?o=c:i.next=c,i=s;var f=e.alternate;if(null!==f){var d=(f=f.updateQueue).lastBaseUpdate;d!==i&&(null===d?f.firstBaseUpdate=c:d.next=c,f.lastBaseUpdate=s)}}if(null!==o){for(d=l.baseState,i=0,f=c=s=null;;){u=o.lane;var p=o.eventTime;if((r&u)===u){null!==f&&(f=f.next={eventTime:p,lane:0,tag:o.tag,payload:o.payload,callback:o.callback,next:null});e:{var m=e,h=o;switch(u=t,p=n,h.tag){case 1:if("function"==typeof(m=h.payload)){d=m.call(p,d,u);break e}d=m;break e;case 3:m.flags=-4097&m.flags|64;case 0:if(null==(u="function"==typeof(m=h.payload)?m.call(p,d,u):m))break e;d=a({},d,u);break e;case 2:nl=!0}}null!==o.callback&&(e.flags|=32,null===(u=l.effects)?l.effects=[o]:u.push(o))}else p={eventTime:p,lane:u,tag:o.tag,payload:o.payload,callback:o.callback,next:null},null===f?(c=f=p,s=d):f=f.next=p,i|=u;if(null===(o=o.next)){if(null===(u=l.shared.pending))break;o=u.next,u.next=null,l.lastBaseUpdate=u,l.shared.pending=null}}null===f&&(s=d),l.baseState=s,l.firstBaseUpdate=c,l.lastBaseUpdate=f,Mi|=i,e.lanes=i,e.memoizedState=d}}function sl(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],a=r.callback;if(null!==a){if(r.callback=null,r=n,"function"!=typeof a)throw Error(o(191,a));a.call(r)}}}var cl=(new r.Component).refs;function fl(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:a({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var dl={isMounted:function(e){return!!(e=e._reactInternals)&&Ye(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=lu(),a=ou(e),l=ll(r,a);l.payload=t,null!=n&&(l.callback=n),ol(e,l),iu(e,a,r)},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=lu(),a=ou(e),l=ll(r,a);l.tag=1,l.payload=t,null!=n&&(l.callback=n),ol(e,l),iu(e,a,r)},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=lu(),r=ou(e),a=ll(n,r);a.tag=2,null!=t&&(a.callback=t),ol(e,a),iu(e,r,n)}};function pl(e,t,n,r,a,l,o){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,l,o):!t.prototype||!t.prototype.isPureReactComponent||(!ur(n,r)||!ur(a,l))}function ml(e,t,n){var r=!1,a=ia,l=t.contextType;return"object"==typeof l&&null!==l?l=tl(l):(a=da(t)?ca:ua.current,l=(r=null!=(r=t.contextTypes))?fa(e,a):ia),t=new t(n,l),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=dl,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=a,e.__reactInternalMemoizedMaskedChildContext=l),t}function hl(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&dl.enqueueReplaceState(t,t.state,null)}function gl(e,t,n,r){var a=e.stateNode;a.props=n,a.state=e.memoizedState,a.refs=cl,rl(e);var l=t.contextType;"object"==typeof l&&null!==l?a.context=tl(l):(l=da(t)?ca:ua.current,a.context=fa(e,l)),ul(e,n,a,r),a.state=e.memoizedState,"function"==typeof(l=t.getDerivedStateFromProps)&&(fl(e,t,l,n),a.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof a.getSnapshotBeforeUpdate||"function"!=typeof a.UNSAFE_componentWillMount&&"function"!=typeof a.componentWillMount||(t=a.state,"function"==typeof a.componentWillMount&&a.componentWillMount(),"function"==typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount(),t!==a.state&&dl.enqueueReplaceState(a,a.state,null),ul(e,n,a,r),a.state=e.memoizedState),"function"==typeof a.componentDidMount&&(e.flags|=4)}var yl=Array.isArray;function vl(e,t,n){if(null!==(e=n.ref)&&"function"!=typeof e&&"object"!=typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(o(309));var r=n.stateNode}if(!r)throw Error(o(147,e));var a=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===a?t.ref:((t=function(e){var t=r.refs;t===cl&&(t=r.refs={}),null===e?delete t[a]:t[a]=e})._stringRef=a,t)}if("string"!=typeof e)throw Error(o(284));if(!n._owner)throw Error(o(290,e))}return e}function bl(e,t){if("textarea"!==e.type)throw Error(o(31,"[object Object]"===Object.prototype.toString.call(t)?"object with keys {"+Object.keys(t).join(", ")+"}":t))}function wl(e){function t(t,n){if(e){var r=t.lastEffect;null!==r?(r.nextEffect=n,t.lastEffect=n):t.firstEffect=t.lastEffect=n,n.nextEffect=null,n.flags=8}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function a(e,t){return(e=ju(e,t)).index=0,e.sibling=null,e}function l(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags=2,n):r:(t.flags=2,n):n}function i(t){return e&&null===t.alternate&&(t.flags=2),t}function u(e,t,n,r){return null===t||6!==t.tag?((t=Hu(n,e.mode,r)).return=e,t):((t=a(t,n)).return=e,t)}function s(e,t,n,r){return null!==t&&t.elementType===n.type?((r=a(t,n.props)).ref=vl(e,t,n),r.return=e,r):((r=Au(n.type,n.key,n.props,null,e.mode,r)).ref=vl(e,t,n),r.return=e,r)}function c(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Qu(n,e.mode,r)).return=e,t):((t=a(t,n.children||[])).return=e,t)}function f(e,t,n,r,l){return null===t||7!==t.tag?((t=Bu(n,e.mode,r,l)).return=e,t):((t=a(t,n)).return=e,t)}function d(e,t,n){if("string"==typeof t||"number"==typeof t)return(t=Hu(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case E:return(n=Au(t.type,t.key,t.props,null,e.mode,n)).ref=vl(e,null,t),n.return=e,n;case S:return(t=Qu(t,e.mode,n)).return=e,t}if(yl(t)||V(t))return(t=Bu(t,e.mode,n,null)).return=e,t;bl(e,t)}return null}function p(e,t,n,r){var a=null!==t?t.key:null;if("string"==typeof n||"number"==typeof n)return null!==a?null:u(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case E:return n.key===a?n.type===_?f(e,t,n.props.children,r,a):s(e,t,n,r):null;case S:return n.key===a?c(e,t,n,r):null}if(yl(n)||V(n))return null!==a?null:f(e,t,n,r,null);bl(e,n)}return null}function m(e,t,n,r,a){if("string"==typeof r||"number"==typeof r)return u(t,e=e.get(n)||null,""+r,a);if("object"==typeof r&&null!==r){switch(r.$$typeof){case E:return e=e.get(null===r.key?n:r.key)||null,r.type===_?f(t,e,r.props.children,a,r.key):s(t,e,r,a);case S:return c(t,e=e.get(null===r.key?n:r.key)||null,r,a)}if(yl(r)||V(r))return f(t,e=e.get(n)||null,r,a,null);bl(t,r)}return null}function h(a,o,i,u){for(var s=null,c=null,f=o,h=o=0,g=null;null!==f&&h<i.length;h++){f.index>h?(g=f,f=null):g=f.sibling;var y=p(a,f,i[h],u);if(null===y){null===f&&(f=g);break}e&&f&&null===y.alternate&&t(a,f),o=l(y,o,h),null===c?s=y:c.sibling=y,c=y,f=g}if(h===i.length)return n(a,f),s;if(null===f){for(;h<i.length;h++)null!==(f=d(a,i[h],u))&&(o=l(f,o,h),null===c?s=f:c.sibling=f,c=f);return s}for(f=r(a,f);h<i.length;h++)null!==(g=m(f,a,h,i[h],u))&&(e&&null!==g.alternate&&f.delete(null===g.key?h:g.key),o=l(g,o,h),null===c?s=g:c.sibling=g,c=g);return e&&f.forEach((function(e){return t(a,e)})),s}function g(a,i,u,s){var c=V(u);if("function"!=typeof c)throw Error(o(150));if(null==(u=c.call(u)))throw Error(o(151));for(var f=c=null,h=i,g=i=0,y=null,v=u.next();null!==h&&!v.done;g++,v=u.next()){h.index>g?(y=h,h=null):y=h.sibling;var b=p(a,h,v.value,s);if(null===b){null===h&&(h=y);break}e&&h&&null===b.alternate&&t(a,h),i=l(b,i,g),null===f?c=b:f.sibling=b,f=b,h=y}if(v.done)return n(a,h),c;if(null===h){for(;!v.done;g++,v=u.next())null!==(v=d(a,v.value,s))&&(i=l(v,i,g),null===f?c=v:f.sibling=v,f=v);return c}for(h=r(a,h);!v.done;g++,v=u.next())null!==(v=m(h,a,g,v.value,s))&&(e&&null!==v.alternate&&h.delete(null===v.key?g:v.key),i=l(v,i,g),null===f?c=v:f.sibling=v,f=v);return e&&h.forEach((function(e){return t(a,e)})),c}return function(e,r,l,u){var s="object"==typeof l&&null!==l&&l.type===_&&null===l.key;s&&(l=l.props.children);var c="object"==typeof l&&null!==l;if(c)switch(l.$$typeof){case E:e:{for(c=l.key,s=r;null!==s;){if(s.key===c){switch(s.tag){case 7:if(l.type===_){n(e,s.sibling),(r=a(s,l.props.children)).return=e,e=r;break e}break;default:if(s.elementType===l.type){n(e,s.sibling),(r=a(s,l.props)).ref=vl(e,s,l),r.return=e,e=r;break e}}n(e,s);break}t(e,s),s=s.sibling}l.type===_?((r=Bu(l.props.children,e.mode,u,l.key)).return=e,e=r):((u=Au(l.type,l.key,l.props,null,e.mode,u)).ref=vl(e,r,l),u.return=e,e=u)}return i(e);case S:e:{for(s=l.key;null!==r;){if(r.key===s){if(4===r.tag&&r.stateNode.containerInfo===l.containerInfo&&r.stateNode.implementation===l.implementation){n(e,r.sibling),(r=a(r,l.children||[])).return=e,e=r;break e}n(e,r);break}t(e,r),r=r.sibling}(r=Qu(l,e.mode,u)).return=e,e=r}return i(e)}if("string"==typeof l||"number"==typeof l)return l=""+l,null!==r&&6===r.tag?(n(e,r.sibling),(r=a(r,l)).return=e,e=r):(n(e,r),(r=Hu(l,e.mode,u)).return=e,e=r),i(e);if(yl(l))return h(e,r,l,u);if(V(l))return g(e,r,l,u);if(c&&bl(e,l),void 0===l&&!s)switch(e.tag){case 1:case 22:case 0:case 11:case 15:throw Error(o(152,q(e.type)||"Component"))}return n(e,r)}}var kl=wl(!0),El=wl(!1),Sl={},_l=aa(Sl),xl=aa(Sl),Cl=aa(Sl);function Pl(e){if(e===Sl)throw Error(o(174));return e}function Tl(e,t){switch(oa(Cl,t),oa(xl,e),oa(_l,Sl),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:me(null,"");break;default:t=me(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}la(_l),oa(_l,t)}function Nl(){la(_l),la(xl),la(Cl)}function Ll(e){Pl(Cl.current);var t=Pl(_l.current),n=me(t,e.type);t!==n&&(oa(xl,e),oa(_l,n))}function zl(e){xl.current===e&&(la(_l),la(xl))}var Ol=aa(0);function Il(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!=(64&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Ml=null,Rl=null,Dl=!1;function Fl(e,t){var n=Fu(5,null,null,0);n.elementType="DELETED",n.type="DELETED",n.stateNode=t,n.return=e,n.flags=8,null!==e.lastEffect?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n}function Ul(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,!0);case 13:default:return!1}}function jl(e){if(Dl){var t=Rl;if(t){var n=t;if(!Ul(e,t)){if(!(t=Hr(n.nextSibling))||!Ul(e,t))return e.flags=-1025&e.flags|2,Dl=!1,void(Ml=e);Fl(Ml,n)}Ml=e,Rl=Hr(t.firstChild)}else e.flags=-1025&e.flags|2,Dl=!1,Ml=e}}function Al(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;Ml=e}function Bl(e){if(e!==Ml)return!1;if(!Dl)return Al(e),Dl=!0,!1;var t=e.type;if(5!==e.tag||"head"!==t&&"body"!==t&&!jr(t,e.memoizedProps))for(t=Rl;t;)Fl(e,t),t=Hr(t.nextSibling);if(Al(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(o(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){Rl=Hr(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}Rl=null}}else Rl=Ml?Hr(e.stateNode.nextSibling):null;return!0}function Vl(){Rl=Ml=null,Dl=!1}var Hl=[];function Ql(){for(var e=0;e<Hl.length;e++)Hl[e]._workInProgressVersionPrimary=null;Hl.length=0}var $l=k.ReactCurrentDispatcher,Wl=k.ReactCurrentBatchConfig,ql=0,Kl=null,Yl=null,Xl=null,Gl=!1,Jl=!1;function Zl(){throw Error(o(321))}function eo(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!or(e[n],t[n]))return!1;return!0}function to(e,t,n,r,a,l){if(ql=l,Kl=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,$l.current=null===e||null===e.memoizedState?To:No,e=n(r,a),Jl){l=0;do{if(Jl=!1,!(25>l))throw Error(o(301));l+=1,Xl=Yl=null,t.updateQueue=null,$l.current=Lo,e=n(r,a)}while(Jl)}if($l.current=Po,t=null!==Yl&&null!==Yl.next,ql=0,Xl=Yl=Kl=null,Gl=!1,t)throw Error(o(300));return e}function no(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===Xl?Kl.memoizedState=Xl=e:Xl=Xl.next=e,Xl}function ro(){if(null===Yl){var e=Kl.alternate;e=null!==e?e.memoizedState:null}else e=Yl.next;var t=null===Xl?Kl.memoizedState:Xl.next;if(null!==t)Xl=t,Yl=e;else{if(null===e)throw Error(o(310));e={memoizedState:(Yl=e).memoizedState,baseState:Yl.baseState,baseQueue:Yl.baseQueue,queue:Yl.queue,next:null},null===Xl?Kl.memoizedState=Xl=e:Xl=Xl.next=e}return Xl}function ao(e,t){return"function"==typeof t?t(e):t}function lo(e){var t=ro(),n=t.queue;if(null===n)throw Error(o(311));n.lastRenderedReducer=e;var r=Yl,a=r.baseQueue,l=n.pending;if(null!==l){if(null!==a){var i=a.next;a.next=l.next,l.next=i}r.baseQueue=a=l,n.pending=null}if(null!==a){a=a.next,r=r.baseState;var u=i=l=null,s=a;do{var c=s.lane;if((ql&c)===c)null!==u&&(u=u.next={lane:0,action:s.action,eagerReducer:s.eagerReducer,eagerState:s.eagerState,next:null}),r=s.eagerReducer===e?s.eagerState:e(r,s.action);else{var f={lane:c,action:s.action,eagerReducer:s.eagerReducer,eagerState:s.eagerState,next:null};null===u?(i=u=f,l=r):u=u.next=f,Kl.lanes|=c,Mi|=c}s=s.next}while(null!==s&&s!==a);null===u?l=r:u.next=i,or(r,t.memoizedState)||(Oo=!0),t.memoizedState=r,t.baseState=l,t.baseQueue=u,n.lastRenderedState=r}return[t.memoizedState,n.dispatch]}function oo(e){var t=ro(),n=t.queue;if(null===n)throw Error(o(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,l=t.memoizedState;if(null!==a){n.pending=null;var i=a=a.next;do{l=e(l,i.action),i=i.next}while(i!==a);or(l,t.memoizedState)||(Oo=!0),t.memoizedState=l,null===t.baseQueue&&(t.baseState=l),n.lastRenderedState=l}return[l,r]}function io(e,t,n){var r=t._getVersion;r=r(t._source);var a=t._workInProgressVersionPrimary;if(null!==a?e=a===r:(e=e.mutableReadLanes,(e=(ql&e)===e)&&(t._workInProgressVersionPrimary=r,Hl.push(t))),e)return n(t._source);throw Hl.push(t),Error(o(350))}function uo(e,t,n,r){var a=Ci;if(null===a)throw Error(o(349));var l=t._getVersion,i=l(t._source),u=$l.current,s=u.useState((function(){return io(a,t,n)})),c=s[1],f=s[0];s=Xl;var d=e.memoizedState,p=d.refs,m=p.getSnapshot,h=d.source;d=d.subscribe;var g=Kl;return e.memoizedState={refs:p,source:t,subscribe:r},u.useEffect((function(){p.getSnapshot=n,p.setSnapshot=c;var e=l(t._source);if(!or(i,e)){e=n(t._source),or(f,e)||(c(e),e=ou(g),a.mutableReadLanes|=e&a.pendingLanes),e=a.mutableReadLanes,a.entangledLanes|=e;for(var r=a.entanglements,o=e;0<o;){var u=31-Ht(o),s=1<<u;r[u]|=e,o&=~s}}}),[n,t,r]),u.useEffect((function(){return r(t._source,(function(){var e=p.getSnapshot,n=p.setSnapshot;try{n(e(t._source));var r=ou(g);a.mutableReadLanes|=r&a.pendingLanes}catch(e){n((function(){throw e}))}}))}),[t,r]),or(m,n)&&or(h,t)&&or(d,r)||((e={pending:null,dispatch:null,lastRenderedReducer:ao,lastRenderedState:f}).dispatch=c=Co.bind(null,Kl,e),s.queue=e,s.baseQueue=null,f=io(a,t,n),s.memoizedState=s.baseState=f),f}function so(e,t,n){return uo(ro(),e,t,n)}function co(e){var t=no();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e=(e=t.queue={pending:null,dispatch:null,lastRenderedReducer:ao,lastRenderedState:e}).dispatch=Co.bind(null,Kl,e),[t.memoizedState,e]}function fo(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=Kl.updateQueue)?(t={lastEffect:null},Kl.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function po(e){return e={current:e},no().memoizedState=e}function mo(){return ro().memoizedState}function ho(e,t,n,r){var a=no();Kl.flags|=e,a.memoizedState=fo(1|t,n,void 0,void 0===r?null:r)}function go(e,t,n,r){var a=ro();r=void 0===r?null:r;var l=void 0;if(null!==Yl){var o=Yl.memoizedState;if(l=o.destroy,null!==r&&eo(r,o.deps))return void fo(t,n,l,r)}Kl.flags|=e,a.memoizedState=fo(1|t,n,l,r)}function yo(e,t){return ho(516,4,e,t)}function vo(e,t){return go(516,4,e,t)}function bo(e,t){return go(4,2,e,t)}function wo(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!=t?(e=e(),t.current=e,function(){t.current=null}):void 0}function ko(e,t,n){return n=null!=n?n.concat([e]):null,go(4,2,wo.bind(null,t,e),n)}function Eo(){}function So(e,t){var n=ro();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&eo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function _o(e,t){var n=ro();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&eo(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function xo(e,t){var n=ja();Ba(98>n?98:n,(function(){e(!0)})),Ba(97<n?97:n,(function(){var n=Wl.transition;Wl.transition=1;try{e(!1),t()}finally{Wl.transition=n}}))}function Co(e,t,n){var r=lu(),a=ou(e),l={lane:a,action:n,eagerReducer:null,eagerState:null,next:null},o=t.pending;if(null===o?l.next=l:(l.next=o.next,o.next=l),t.pending=l,o=e.alternate,e===Kl||null!==o&&o===Kl)Jl=Gl=!0;else{if(0===e.lanes&&(null===o||0===o.lanes)&&null!==(o=t.lastRenderedReducer))try{var i=t.lastRenderedState,u=o(i,n);if(l.eagerReducer=o,l.eagerState=u,or(u,i))return}catch(e){}iu(e,a,r)}}var Po={readContext:tl,useCallback:Zl,useContext:Zl,useEffect:Zl,useImperativeHandle:Zl,useLayoutEffect:Zl,useMemo:Zl,useReducer:Zl,useRef:Zl,useState:Zl,useDebugValue:Zl,useDeferredValue:Zl,useTransition:Zl,useMutableSource:Zl,useOpaqueIdentifier:Zl,unstable_isNewReconciler:!1},To={readContext:tl,useCallback:function(e,t){return no().memoizedState=[e,void 0===t?null:t],e},useContext:tl,useEffect:yo,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,ho(4,2,wo.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ho(4,2,e,t)},useMemo:function(e,t){var n=no();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=no();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e=(e=r.queue={pending:null,dispatch:null,lastRenderedReducer:e,lastRenderedState:t}).dispatch=Co.bind(null,Kl,e),[r.memoizedState,e]},useRef:po,useState:co,useDebugValue:Eo,useDeferredValue:function(e){var t=co(e),n=t[0],r=t[1];return yo((function(){var t=Wl.transition;Wl.transition=1;try{r(e)}finally{Wl.transition=t}}),[e]),n},useTransition:function(){var e=co(!1),t=e[0];return po(e=xo.bind(null,e[1])),[e,t]},useMutableSource:function(e,t,n){var r=no();return r.memoizedState={refs:{getSnapshot:t,setSnapshot:null},source:e,subscribe:n},uo(r,e,t,n)},useOpaqueIdentifier:function(){if(Dl){var e=!1,t=function(e){return{$$typeof:R,toString:e,valueOf:e}}((function(){throw e||(e=!0,n("r:"+($r++).toString(36))),Error(o(355))})),n=co(t)[1];return 0==(2&Kl.mode)&&(Kl.flags|=516,fo(5,(function(){n("r:"+($r++).toString(36))}),void 0,null)),t}return co(t="r:"+($r++).toString(36)),t},unstable_isNewReconciler:!1},No={readContext:tl,useCallback:So,useContext:tl,useEffect:vo,useImperativeHandle:ko,useLayoutEffect:bo,useMemo:_o,useReducer:lo,useRef:mo,useState:function(){return lo(ao)},useDebugValue:Eo,useDeferredValue:function(e){var t=lo(ao),n=t[0],r=t[1];return vo((function(){var t=Wl.transition;Wl.transition=1;try{r(e)}finally{Wl.transition=t}}),[e]),n},useTransition:function(){var e=lo(ao)[0];return[mo().current,e]},useMutableSource:so,useOpaqueIdentifier:function(){return lo(ao)[0]},unstable_isNewReconciler:!1},Lo={readContext:tl,useCallback:So,useContext:tl,useEffect:vo,useImperativeHandle:ko,useLayoutEffect:bo,useMemo:_o,useReducer:oo,useRef:mo,useState:function(){return oo(ao)},useDebugValue:Eo,useDeferredValue:function(e){var t=oo(ao),n=t[0],r=t[1];return vo((function(){var t=Wl.transition;Wl.transition=1;try{r(e)}finally{Wl.transition=t}}),[e]),n},useTransition:function(){var e=oo(ao)[0];return[mo().current,e]},useMutableSource:so,useOpaqueIdentifier:function(){return oo(ao)[0]},unstable_isNewReconciler:!1},zo=k.ReactCurrentOwner,Oo=!1;function Io(e,t,n,r){t.child=null===e?El(t,null,n,r):kl(t,e.child,n,r)}function Mo(e,t,n,r,a){n=n.render;var l=t.ref;return el(t,a),r=to(e,t,n,r,l,a),null===e||Oo?(t.flags|=1,Io(e,t,r,a),t.child):(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~a,ei(e,t,a))}function Ro(e,t,n,r,a,l){if(null===e){var o=n.type;return"function"!=typeof o||Uu(o)||void 0!==o.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Au(n.type,null,r,t,t.mode,l)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=o,Do(e,t,o,r,a,l))}return o=e.child,0==(a&l)&&(a=o.memoizedProps,(n=null!==(n=n.compare)?n:ur)(a,r)&&e.ref===t.ref)?ei(e,t,l):(t.flags|=1,(e=ju(o,r)).ref=t.ref,e.return=t,t.child=e)}function Do(e,t,n,r,a,l){if(null!==e&&ur(e.memoizedProps,r)&&e.ref===t.ref){if(Oo=!1,0==(l&a))return t.lanes=e.lanes,ei(e,t,l);0!=(16384&e.flags)&&(Oo=!0)}return jo(e,t,n,r,l)}function Fo(e,t,n){var r=t.pendingProps,a=r.children,l=null!==e?e.memoizedState:null;if("hidden"===r.mode||"unstable-defer-without-hiding"===r.mode)if(0==(4&t.mode))t.memoizedState={baseLanes:0},hu(t,n);else{if(0==(1073741824&n))return e=null!==l?l.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e},hu(t,e),null;t.memoizedState={baseLanes:0},hu(t,null!==l?l.baseLanes:n)}else null!==l?(r=l.baseLanes|n,t.memoizedState=null):r=n,hu(t,r);return Io(e,t,a,n),t.child}function Uo(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=128)}function jo(e,t,n,r,a){var l=da(n)?ca:ua.current;return l=fa(t,l),el(t,a),n=to(e,t,n,r,l,a),null===e||Oo?(t.flags|=1,Io(e,t,n,a),t.child):(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~a,ei(e,t,a))}function Ao(e,t,n,r,a){if(da(n)){var l=!0;ga(t)}else l=!1;if(el(t,a),null===t.stateNode)null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),ml(t,n,r),gl(t,n,r,a),r=!0;else if(null===e){var o=t.stateNode,i=t.memoizedProps;o.props=i;var u=o.context,s=n.contextType;"object"==typeof s&&null!==s?s=tl(s):s=fa(t,s=da(n)?ca:ua.current);var c=n.getDerivedStateFromProps,f="function"==typeof c||"function"==typeof o.getSnapshotBeforeUpdate;f||"function"!=typeof o.UNSAFE_componentWillReceiveProps&&"function"!=typeof o.componentWillReceiveProps||(i!==r||u!==s)&&hl(t,o,r,s),nl=!1;var d=t.memoizedState;o.state=d,ul(t,r,o,a),u=t.memoizedState,i!==r||d!==u||sa.current||nl?("function"==typeof c&&(fl(t,n,c,r),u=t.memoizedState),(i=nl||pl(t,n,i,r,d,u,s))?(f||"function"!=typeof o.UNSAFE_componentWillMount&&"function"!=typeof o.componentWillMount||("function"==typeof o.componentWillMount&&o.componentWillMount(),"function"==typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount()),"function"==typeof o.componentDidMount&&(t.flags|=4)):("function"==typeof o.componentDidMount&&(t.flags|=4),t.memoizedProps=r,t.memoizedState=u),o.props=r,o.state=u,o.context=s,r=i):("function"==typeof o.componentDidMount&&(t.flags|=4),r=!1)}else{o=t.stateNode,al(e,t),i=t.memoizedProps,s=t.type===t.elementType?i:Wa(t.type,i),o.props=s,f=t.pendingProps,d=o.context,"object"==typeof(u=n.contextType)&&null!==u?u=tl(u):u=fa(t,u=da(n)?ca:ua.current);var p=n.getDerivedStateFromProps;(c="function"==typeof p||"function"==typeof o.getSnapshotBeforeUpdate)||"function"!=typeof o.UNSAFE_componentWillReceiveProps&&"function"!=typeof o.componentWillReceiveProps||(i!==f||d!==u)&&hl(t,o,r,u),nl=!1,d=t.memoizedState,o.state=d,ul(t,r,o,a);var m=t.memoizedState;i!==f||d!==m||sa.current||nl?("function"==typeof p&&(fl(t,n,p,r),m=t.memoizedState),(s=nl||pl(t,n,s,r,d,m,u))?(c||"function"!=typeof o.UNSAFE_componentWillUpdate&&"function"!=typeof o.componentWillUpdate||("function"==typeof o.componentWillUpdate&&o.componentWillUpdate(r,m,u),"function"==typeof o.UNSAFE_componentWillUpdate&&o.UNSAFE_componentWillUpdate(r,m,u)),"function"==typeof o.componentDidUpdate&&(t.flags|=4),"function"==typeof o.getSnapshotBeforeUpdate&&(t.flags|=256)):("function"!=typeof o.componentDidUpdate||i===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),"function"!=typeof o.getSnapshotBeforeUpdate||i===e.memoizedProps&&d===e.memoizedState||(t.flags|=256),t.memoizedProps=r,t.memoizedState=m),o.props=r,o.state=m,o.context=u,r=s):("function"!=typeof o.componentDidUpdate||i===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),"function"!=typeof o.getSnapshotBeforeUpdate||i===e.memoizedProps&&d===e.memoizedState||(t.flags|=256),r=!1)}return Bo(e,t,n,r,l,a)}function Bo(e,t,n,r,a,l){Uo(e,t);var o=0!=(64&t.flags);if(!r&&!o)return a&&ya(t,n,!1),ei(e,t,l);r=t.stateNode,zo.current=t;var i=o&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&o?(t.child=kl(t,e.child,null,l),t.child=kl(t,null,i,l)):Io(e,t,i,l),t.memoizedState=r.state,a&&ya(t,n,!0),t.child}function Vo(e){var t=e.stateNode;t.pendingContext?ma(0,t.pendingContext,t.pendingContext!==t.context):t.context&&ma(0,t.context,!1),Tl(e,t.containerInfo)}var Ho,Qo,$o,Wo={dehydrated:null,retryLane:0};function qo(e,t,n){var r,a=t.pendingProps,l=Ol.current,o=!1;return(r=0!=(64&t.flags))||(r=(null===e||null!==e.memoizedState)&&0!=(2&l)),r?(o=!0,t.flags&=-65):null!==e&&null===e.memoizedState||void 0===a.fallback||!0===a.unstable_avoidThisFallback||(l|=1),oa(Ol,1&l),null===e?(void 0!==a.fallback&&jl(t),e=a.children,l=a.fallback,o?(e=Ko(t,e,l,n),t.child.memoizedState={baseLanes:n},t.memoizedState=Wo,e):"number"==typeof a.unstable_expectedLoadTime?(e=Ko(t,e,l,n),t.child.memoizedState={baseLanes:n},t.memoizedState=Wo,t.lanes=33554432,e):((n=Vu({mode:"visible",children:e},t.mode,n,null)).return=t,t.child=n)):(e.memoizedState,o?(a=Xo(e,t,a.children,a.fallback,n),o=t.child,l=e.child.memoizedState,o.memoizedState=null===l?{baseLanes:n}:{baseLanes:l.baseLanes|n},o.childLanes=e.childLanes&~n,t.memoizedState=Wo,a):(n=Yo(e,t,a.children,n),t.memoizedState=null,n))}function Ko(e,t,n,r){var a=e.mode,l=e.child;return t={mode:"hidden",children:t},0==(2&a)&&null!==l?(l.childLanes=0,l.pendingProps=t):l=Vu(t,a,0,null),n=Bu(n,a,r,null),l.return=e,n.return=e,l.sibling=n,e.child=l,n}function Yo(e,t,n,r){var a=e.child;return e=a.sibling,n=ju(a,{mode:"visible",children:n}),0==(2&t.mode)&&(n.lanes=r),n.return=t,n.sibling=null,null!==e&&(e.nextEffect=null,e.flags=8,t.firstEffect=t.lastEffect=e),t.child=n}function Xo(e,t,n,r,a){var l=t.mode,o=e.child;e=o.sibling;var i={mode:"hidden",children:n};return 0==(2&l)&&t.child!==o?((n=t.child).childLanes=0,n.pendingProps=i,null!==(o=n.lastEffect)?(t.firstEffect=n.firstEffect,t.lastEffect=o,o.nextEffect=null):t.firstEffect=t.lastEffect=null):n=ju(o,i),null!==e?r=ju(e,r):(r=Bu(r,l,a,null)).flags|=2,r.return=t,n.return=t,n.sibling=r,t.child=n,r}function Go(e,t){e.lanes|=t;var n=e.alternate;null!==n&&(n.lanes|=t),Za(e.return,t)}function Jo(e,t,n,r,a,l){var o=e.memoizedState;null===o?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:a,lastEffect:l}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=a,o.lastEffect=l)}function Zo(e,t,n){var r=t.pendingProps,a=r.revealOrder,l=r.tail;if(Io(e,t,r.children,n),0!=(2&(r=Ol.current)))r=1&r|2,t.flags|=64;else{if(null!==e&&0!=(64&e.flags))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&Go(e,n);else if(19===e.tag)Go(e,n);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(oa(Ol,r),0==(2&t.mode))t.memoizedState=null;else switch(a){case"forwards":for(n=t.child,a=null;null!==n;)null!==(e=n.alternate)&&null===Il(e)&&(a=n),n=n.sibling;null===(n=a)?(a=t.child,t.child=null):(a=n.sibling,n.sibling=null),Jo(t,!1,a,n,l,t.lastEffect);break;case"backwards":for(n=null,a=t.child,t.child=null;null!==a;){if(null!==(e=a.alternate)&&null===Il(e)){t.child=a;break}e=a.sibling,a.sibling=n,n=a,a=e}Jo(t,!0,n,null,l,t.lastEffect);break;case"together":Jo(t,!1,null,null,void 0,t.lastEffect);break;default:t.memoizedState=null}return t.child}function ei(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),Mi|=t.lanes,0!=(n&t.childLanes)){if(null!==e&&t.child!==e.child)throw Error(o(153));if(null!==t.child){for(n=ju(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=ju(e,e.pendingProps)).return=t;n.sibling=null}return t.child}return null}function ti(e,t){if(!Dl)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function ni(e,t,n){var r=t.pendingProps;switch(t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;case 1:return da(t.type)&&pa(),null;case 3:return Nl(),la(sa),la(ua),Ql(),(r=t.stateNode).pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(Bl(t)?t.flags|=4:r.hydrate||(t.flags|=256)),null;case 5:zl(t);var l=Pl(Cl.current);if(n=t.type,null!==e&&null!=t.stateNode)Qo(e,t,n,r),e.ref!==t.ref&&(t.flags|=128);else{if(!r){if(null===t.stateNode)throw Error(o(166));return null}if(e=Pl(_l.current),Bl(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[qr]=t,r[Kr]=i,n){case"dialog":xr("cancel",r),xr("close",r);break;case"iframe":case"object":case"embed":xr("load",r);break;case"video":case"audio":for(e=0;e<kr.length;e++)xr(kr[e],r);break;case"source":xr("error",r);break;case"img":case"image":case"link":xr("error",r),xr("load",r);break;case"details":xr("toggle",r);break;case"input":ee(r,i),xr("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},xr("invalid",r);break;case"textarea":ue(r,i),xr("invalid",r)}for(var s in Se(n,i),e=null,i)i.hasOwnProperty(s)&&(l=i[s],"children"===s?"string"==typeof l?r.textContent!==l&&(e=["children",l]):"number"==typeof l&&r.textContent!==""+l&&(e=["children",""+l]):u.hasOwnProperty(s)&&null!=l&&"onScroll"===s&&xr("scroll",r));switch(n){case"input":X(r),re(r,i,!0);break;case"textarea":X(r),ce(r);break;case"select":case"option":break;default:"function"==typeof i.onClick&&(r.onclick=Rr)}r=e,t.updateQueue=r,null!==r&&(t.flags|=4)}else{switch(s=9===l.nodeType?l:l.ownerDocument,e===fe&&(e=pe(n)),e===fe?"script"===n?((e=s.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"==typeof r.is?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),"select"===n&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[qr]=t,e[Kr]=r,Ho(e,t),t.stateNode=e,s=_e(n,r),n){case"dialog":xr("cancel",e),xr("close",e),l=r;break;case"iframe":case"object":case"embed":xr("load",e),l=r;break;case"video":case"audio":for(l=0;l<kr.length;l++)xr(kr[l],e);l=r;break;case"source":xr("error",e),l=r;break;case"img":case"image":case"link":xr("error",e),xr("load",e),l=r;break;case"details":xr("toggle",e),l=r;break;case"input":ee(e,r),l=Z(e,r),xr("invalid",e);break;case"option":l=le(e,r);break;case"select":e._wrapperState={wasMultiple:!!r.multiple},l=a({},r,{value:void 0}),xr("invalid",e);break;case"textarea":ue(e,r),l=ie(e,r),xr("invalid",e);break;default:l=r}Se(n,l);var c=l;for(i in c)if(c.hasOwnProperty(i)){var f=c[i];"style"===i?ke(e,f):"dangerouslySetInnerHTML"===i?null!=(f=f?f.__html:void 0)&&ge(e,f):"children"===i?"string"==typeof f?("textarea"!==n||""!==f)&&ye(e,f):"number"==typeof f&&ye(e,""+f):"suppressContentEditableWarning"!==i&&"suppressHydrationWarning"!==i&&"autoFocus"!==i&&(u.hasOwnProperty(i)?null!=f&&"onScroll"===i&&xr("scroll",e):null!=f&&w(e,i,f,s))}switch(n){case"input":X(e),re(e,r,!1);break;case"textarea":X(e),ce(e);break;case"option":null!=r.value&&e.setAttribute("value",""+K(r.value));break;case"select":e.multiple=!!r.multiple,null!=(i=r.value)?oe(e,!!r.multiple,i,!1):null!=r.defaultValue&&oe(e,!!r.multiple,r.defaultValue,!0);break;default:"function"==typeof l.onClick&&(e.onclick=Rr)}Ur(n,r)&&(t.flags|=4)}null!==t.ref&&(t.flags|=128)}return null;case 6:if(e&&null!=t.stateNode)$o(0,t,e.memoizedProps,r);else{if("string"!=typeof r&&null===t.stateNode)throw Error(o(166));n=Pl(Cl.current),Pl(_l.current),Bl(t)?(r=t.stateNode,n=t.memoizedProps,r[qr]=t,r.nodeValue!==n&&(t.flags|=4)):((r=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[qr]=t,t.stateNode=r)}return null;case 13:return la(Ol),r=t.memoizedState,0!=(64&t.flags)?(t.lanes=n,t):(r=null!==r,n=!1,null===e?void 0!==t.memoizedProps.fallback&&Bl(t):n=null!==e.memoizedState,r&&!n&&0!=(2&t.mode)&&(null===e&&!0!==t.memoizedProps.unstable_avoidThisFallback||0!=(1&Ol.current)?0===zi&&(zi=3):(0!==zi&&3!==zi||(zi=4),null===Ci||0==(134217727&Mi)&&0==(134217727&Ri)||fu(Ci,Ti))),(r||n)&&(t.flags|=4),null);case 4:return Nl(),null===e&&Pr(t.stateNode.containerInfo),null;case 10:return Ja(t),null;case 17:return da(t.type)&&pa(),null;case 19:if(la(Ol),null===(r=t.memoizedState))return null;if(i=0!=(64&t.flags),null===(s=r.rendering))if(i)ti(r,!1);else{if(0!==zi||null!==e&&0!=(64&e.flags))for(e=t.child;null!==e;){if(null!==(s=Il(e))){for(t.flags|=64,ti(r,!1),null!==(i=s.updateQueue)&&(t.updateQueue=i,t.flags|=4),null===r.lastEffect&&(t.firstEffect=null),t.lastEffect=r.lastEffect,r=n,n=t.child;null!==n;)e=r,(i=n).flags&=2,i.nextEffect=null,i.firstEffect=null,i.lastEffect=null,null===(s=i.alternate)?(i.childLanes=0,i.lanes=e,i.child=null,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=s.childLanes,i.lanes=s.lanes,i.child=s.child,i.memoizedProps=s.memoizedProps,i.memoizedState=s.memoizedState,i.updateQueue=s.updateQueue,i.type=s.type,e=s.dependencies,i.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return oa(Ol,1&Ol.current|2),t.child}e=e.sibling}null!==r.tail&&Ua()>ji&&(t.flags|=64,i=!0,ti(r,!1),t.lanes=33554432)}else{if(!i)if(null!==(e=Il(s))){if(t.flags|=64,i=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),ti(r,!0),null===r.tail&&"hidden"===r.tailMode&&!s.alternate&&!Dl)return null!==(t=t.lastEffect=r.lastEffect)&&(t.nextEffect=null),null}else 2*Ua()-r.renderingStartTime>ji&&1073741824!==n&&(t.flags|=64,i=!0,ti(r,!1),t.lanes=33554432);r.isBackwards?(s.sibling=t.child,t.child=s):(null!==(n=r.last)?n.sibling=s:t.child=s,r.last=s)}return null!==r.tail?(n=r.tail,r.rendering=n,r.tail=n.sibling,r.lastEffect=t.lastEffect,r.renderingStartTime=Ua(),n.sibling=null,t=Ol.current,oa(Ol,i?1&t|2:1&t),n):null;case 23:case 24:return gu(),null!==e&&null!==e.memoizedState!=(null!==t.memoizedState)&&"unstable-defer-without-hiding"!==r.mode&&(t.flags|=4),null}throw Error(o(156,t.tag))}function ri(e){switch(e.tag){case 1:da(e.type)&&pa();var t=e.flags;return 4096&t?(e.flags=-4097&t|64,e):null;case 3:if(Nl(),la(sa),la(ua),Ql(),0!=(64&(t=e.flags)))throw Error(o(285));return e.flags=-4097&t|64,e;case 5:return zl(e),null;case 13:return la(Ol),4096&(t=e.flags)?(e.flags=-4097&t|64,e):null;case 19:return la(Ol),null;case 4:return Nl(),null;case 10:return Ja(e),null;case 23:case 24:return gu(),null;default:return null}}function ai(e,t){try{var n="",r=t;do{n+=W(r),r=r.return}while(r);var a=n}catch(e){a="\nError generating stack: "+e.message+"\n"+e.stack}return{value:e,source:t,stack:a}}function li(e,t){try{console.error(t.value)}catch(e){setTimeout((function(){throw e}))}}Ho=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Qo=function(e,t,n,r){var l=e.memoizedProps;if(l!==r){e=t.stateNode,Pl(_l.current);var o,i=null;switch(n){case"input":l=Z(e,l),r=Z(e,r),i=[];break;case"option":l=le(e,l),r=le(e,r),i=[];break;case"select":l=a({},l,{value:void 0}),r=a({},r,{value:void 0}),i=[];break;case"textarea":l=ie(e,l),r=ie(e,r),i=[];break;default:"function"!=typeof l.onClick&&"function"==typeof r.onClick&&(e.onclick=Rr)}for(f in Se(n,r),n=null,l)if(!r.hasOwnProperty(f)&&l.hasOwnProperty(f)&&null!=l[f])if("style"===f){var s=l[f];for(o in s)s.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else"dangerouslySetInnerHTML"!==f&&"children"!==f&&"suppressContentEditableWarning"!==f&&"suppressHydrationWarning"!==f&&"autoFocus"!==f&&(u.hasOwnProperty(f)?i||(i=[]):(i=i||[]).push(f,null));for(f in r){var c=r[f];if(s=null!=l?l[f]:void 0,r.hasOwnProperty(f)&&c!==s&&(null!=c||null!=s))if("style"===f)if(s){for(o in s)!s.hasOwnProperty(o)||c&&c.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in c)c.hasOwnProperty(o)&&s[o]!==c[o]&&(n||(n={}),n[o]=c[o])}else n||(i||(i=[]),i.push(f,n)),n=c;else"dangerouslySetInnerHTML"===f?(c=c?c.__html:void 0,s=s?s.__html:void 0,null!=c&&s!==c&&(i=i||[]).push(f,c)):"children"===f?"string"!=typeof c&&"number"!=typeof c||(i=i||[]).push(f,""+c):"suppressContentEditableWarning"!==f&&"suppressHydrationWarning"!==f&&(u.hasOwnProperty(f)?(null!=c&&"onScroll"===f&&xr("scroll",e),i||s===c||(i=[])):"object"==typeof c&&null!==c&&c.$$typeof===R?c.toString():(i=i||[]).push(f,c))}n&&(i=i||[]).push("style",n);var f=i;(t.updateQueue=f)&&(t.flags|=4)}},$o=function(e,t,n,r){n!==r&&(t.flags|=4)};var oi="function"==typeof WeakMap?WeakMap:Map;function ii(e,t,n){(n=ll(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Hi||(Hi=!0,Qi=r),li(0,t)},n}function ui(e,t,n){(n=ll(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var a=t.value;n.payload=function(){return li(0,t),r(a)}}var l=e.stateNode;return null!==l&&"function"==typeof l.componentDidCatch&&(n.callback=function(){"function"!=typeof r&&(null===$i?$i=new Set([this]):$i.add(this),li(0,t));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}var si="function"==typeof WeakSet?WeakSet:Set;function ci(e){var t=e.ref;if(null!==t)if("function"==typeof t)try{t(null)}catch(t){Iu(e,t)}else t.current=null}function fi(e,t){switch(t.tag){case 0:case 11:case 15:case 22:return;case 1:if(256&t.flags&&null!==e){var n=e.memoizedProps,r=e.memoizedState;t=(e=t.stateNode).getSnapshotBeforeUpdate(t.elementType===t.type?n:Wa(t.type,n),r),e.__reactInternalSnapshotBeforeUpdate=t}return;case 3:return void(256&t.flags&&Vr(t.stateNode.containerInfo));case 5:case 6:case 4:case 17:return}throw Error(o(163))}function di(e,t,n){switch(n.tag){case 0:case 11:case 15:case 22:if(null!==(t=null!==(t=n.updateQueue)?t.lastEffect:null)){e=t=t.next;do{if(3==(3&e.tag)){var r=e.create;e.destroy=r()}e=e.next}while(e!==t)}if(null!==(t=null!==(t=n.updateQueue)?t.lastEffect:null)){e=t=t.next;do{var a=e;r=a.next,0!=(4&(a=a.tag))&&0!=(1&a)&&(Lu(n,e),Nu(n,e)),e=r}while(e!==t)}return;case 1:return e=n.stateNode,4&n.flags&&(null===t?e.componentDidMount():(r=n.elementType===n.type?t.memoizedProps:Wa(n.type,t.memoizedProps),e.componentDidUpdate(r,t.memoizedState,e.__reactInternalSnapshotBeforeUpdate))),void(null!==(t=n.updateQueue)&&sl(n,t,e));case 3:if(null!==(t=n.updateQueue)){if(e=null,null!==n.child)switch(n.child.tag){case 5:e=n.child.stateNode;break;case 1:e=n.child.stateNode}sl(n,t,e)}return;case 5:return e=n.stateNode,void(null===t&&4&n.flags&&Ur(n.type,n.memoizedProps)&&e.focus());case 6:case 4:case 12:return;case 13:return void(null===n.memoizedState&&(n=n.alternate,null!==n&&(n=n.memoizedState,null!==n&&(n=n.dehydrated,null!==n&&kt(n)))));case 19:case 17:case 20:case 21:case 23:case 24:return}throw Error(o(163))}function pi(e,t){for(var n=e;;){if(5===n.tag){var r=n.stateNode;if(t)"function"==typeof(r=r.style).setProperty?r.setProperty("display","none","important"):r.display="none";else{r=n.stateNode;var a=n.memoizedProps.style;a=null!=a&&a.hasOwnProperty("display")?a.display:null,r.style.display=we("display",a)}}else if(6===n.tag)n.stateNode.nodeValue=t?"":n.memoizedProps;else if((23!==n.tag&&24!==n.tag||null===n.memoizedState||n===e)&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===e)break;for(;null===n.sibling;){if(null===n.return||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}}function mi(e,t){if(ba&&"function"==typeof ba.onCommitFiberUnmount)try{ba.onCommitFiberUnmount(va,t)}catch(e){}switch(t.tag){case 0:case 11:case 14:case 15:case 22:if(null!==(e=t.updateQueue)&&null!==(e=e.lastEffect)){var n=e=e.next;do{var r=n,a=r.destroy;if(r=r.tag,void 0!==a)if(0!=(4&r))Lu(t,n);else{r=t;try{a()}catch(e){Iu(r,e)}}n=n.next}while(n!==e)}break;case 1:if(ci(t),"function"==typeof(e=t.stateNode).componentWillUnmount)try{e.props=t.memoizedProps,e.state=t.memoizedState,e.componentWillUnmount()}catch(e){Iu(t,e)}break;case 5:ci(t);break;case 4:vi(e,t)}}function hi(e){e.alternate=null,e.child=null,e.dependencies=null,e.firstEffect=null,e.lastEffect=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.return=null,e.updateQueue=null}function gi(e){return 5===e.tag||3===e.tag||4===e.tag}function yi(e){e:{for(var t=e.return;null!==t;){if(gi(t))break e;t=t.return}throw Error(o(160))}var n=t;switch(t=n.stateNode,n.tag){case 5:var r=!1;break;case 3:case 4:t=t.containerInfo,r=!0;break;default:throw Error(o(161))}16&n.flags&&(ye(t,""),n.flags&=-17);e:t:for(n=e;;){for(;null===n.sibling;){if(null===n.return||gi(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;5!==n.tag&&6!==n.tag&&18!==n.tag;){if(2&n.flags)continue t;if(null===n.child||4===n.tag)continue t;n.child.return=n,n=n.child}if(!(2&n.flags)){n=n.stateNode;break e}}r?function e(t,n,r){var a=t.tag,l=5===a||6===a;if(l)t=l?t.stateNode:t.stateNode.instance,n?8===r.nodeType?r.parentNode.insertBefore(t,n):r.insertBefore(t,n):(8===r.nodeType?(n=r.parentNode).insertBefore(t,r):(n=r).appendChild(t),null!==(r=r._reactRootContainer)&&void 0!==r||null!==n.onclick||(n.onclick=Rr));else if(4!==a&&null!==(t=t.child))for(e(t,n,r),t=t.sibling;null!==t;)e(t,n,r),t=t.sibling}(e,n,t):function e(t,n,r){var a=t.tag,l=5===a||6===a;if(l)t=l?t.stateNode:t.stateNode.instance,n?r.insertBefore(t,n):r.appendChild(t);else if(4!==a&&null!==(t=t.child))for(e(t,n,r),t=t.sibling;null!==t;)e(t,n,r),t=t.sibling}(e,n,t)}function vi(e,t){for(var n,r,a=t,l=!1;;){if(!l){l=a.return;e:for(;;){if(null===l)throw Error(o(160));switch(n=l.stateNode,l.tag){case 5:r=!1;break e;case 3:case 4:n=n.containerInfo,r=!0;break e}l=l.return}l=!0}if(5===a.tag||6===a.tag){e:for(var i=e,u=a,s=u;;)if(mi(i,s),null!==s.child&&4!==s.tag)s.child.return=s,s=s.child;else{if(s===u)break e;for(;null===s.sibling;){if(null===s.return||s.return===u)break e;s=s.return}s.sibling.return=s.return,s=s.sibling}r?(i=n,u=a.stateNode,8===i.nodeType?i.parentNode.removeChild(u):i.removeChild(u)):n.removeChild(a.stateNode)}else if(4===a.tag){if(null!==a.child){n=a.stateNode.containerInfo,r=!0,a.child.return=a,a=a.child;continue}}else if(mi(e,a),null!==a.child){a.child.return=a,a=a.child;continue}if(a===t)break;for(;null===a.sibling;){if(null===a.return||a.return===t)return;4===(a=a.return).tag&&(l=!1)}a.sibling.return=a.return,a=a.sibling}}function bi(e,t){switch(t.tag){case 0:case 11:case 14:case 15:case 22:var n=t.updateQueue;if(null!==(n=null!==n?n.lastEffect:null)){var r=n=n.next;do{3==(3&r.tag)&&(e=r.destroy,r.destroy=void 0,void 0!==e&&e()),r=r.next}while(r!==n)}return;case 1:return;case 5:if(null!=(n=t.stateNode)){r=t.memoizedProps;var a=null!==e?e.memoizedProps:r;e=t.type;var l=t.updateQueue;if(t.updateQueue=null,null!==l){for(n[Kr]=r,"input"===e&&"radio"===r.type&&null!=r.name&&te(n,r),_e(e,a),t=_e(e,r),a=0;a<l.length;a+=2){var i=l[a],u=l[a+1];"style"===i?ke(n,u):"dangerouslySetInnerHTML"===i?ge(n,u):"children"===i?ye(n,u):w(n,i,u,t)}switch(e){case"input":ne(n,r);break;case"textarea":se(n,r);break;case"select":e=n._wrapperState.wasMultiple,n._wrapperState.wasMultiple=!!r.multiple,null!=(l=r.value)?oe(n,!!r.multiple,l,!1):e!==!!r.multiple&&(null!=r.defaultValue?oe(n,!!r.multiple,r.defaultValue,!0):oe(n,!!r.multiple,r.multiple?[]:"",!1))}}}return;case 6:if(null===t.stateNode)throw Error(o(162));return void(t.stateNode.nodeValue=t.memoizedProps);case 3:return void((n=t.stateNode).hydrate&&(n.hydrate=!1,kt(n.containerInfo)));case 12:return;case 13:return null!==t.memoizedState&&(Ui=Ua(),pi(t.child,!0)),void wi(t);case 19:return void wi(t);case 17:return;case 23:case 24:return void pi(t,null!==t.memoizedState)}throw Error(o(163))}function wi(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new si),t.forEach((function(t){var r=Ru.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function ki(e,t){return null!==e&&(null===(e=e.memoizedState)||null!==e.dehydrated)&&(null!==(t=t.memoizedState)&&null===t.dehydrated)}var Ei=Math.ceil,Si=k.ReactCurrentDispatcher,_i=k.ReactCurrentOwner,xi=0,Ci=null,Pi=null,Ti=0,Ni=0,Li=aa(0),zi=0,Oi=null,Ii=0,Mi=0,Ri=0,Di=0,Fi=null,Ui=0,ji=1/0;function Ai(){ji=Ua()+500}var Bi,Vi=null,Hi=!1,Qi=null,$i=null,Wi=!1,qi=null,Ki=90,Yi=[],Xi=[],Gi=null,Ji=0,Zi=null,eu=-1,tu=0,nu=0,ru=null,au=!1;function lu(){return 0!=(48&xi)?Ua():-1!==eu?eu:eu=Ua()}function ou(e){if(0==(2&(e=e.mode)))return 1;if(0==(4&e))return 99===ja()?1:2;if(0===tu&&(tu=Ii),0!==$a.transition){0!==nu&&(nu=null!==Fi?Fi.pendingLanes:0),e=tu;var t=4186112&~nu;return 0===(t&=-t)&&(0===(t=(e=4186112&~e)&-e)&&(t=8192)),t}return e=ja(),0!=(4&xi)&&98===e?e=jt(12,tu):e=jt(e=function(e){switch(e){case 99:return 15;case 98:return 10;case 97:case 96:return 8;case 95:return 2;default:return 0}}(e),tu),e}function iu(e,t,n){if(50<Ji)throw Ji=0,Zi=null,Error(o(185));if(null===(e=uu(e,t)))return null;Vt(e,t,n),e===Ci&&(Ri|=t,4===zi&&fu(e,Ti));var r=ja();1===t?0!=(8&xi)&&0==(48&xi)?du(e):(su(e,n),0===xi&&(Ai(),Ha())):(0==(4&xi)||98!==r&&99!==r||(null===Gi?Gi=new Set([e]):Gi.add(e)),su(e,n)),Fi=e}function uu(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}function su(e,t){for(var n=e.callbackNode,r=e.suspendedLanes,a=e.pingedLanes,l=e.expirationTimes,i=e.pendingLanes;0<i;){var u=31-Ht(i),s=1<<u,c=l[u];if(-1===c){if(0==(s&r)||0!=(s&a)){c=t,Dt(s);var f=Rt;l[u]=10<=f?c+250:6<=f?c+5e3:-1}}else c<=t&&(e.expiredLanes|=s);i&=~s}if(r=Ft(e,e===Ci?Ti:0),t=Rt,0===r)null!==n&&(n!==Oa&&Ea(n),e.callbackNode=null,e.callbackPriority=0);else{if(null!==n){if(e.callbackPriority===t)return;n!==Oa&&Ea(n)}15===t?(n=du.bind(null,e),null===Ma?(Ma=[n],Ra=ka(Pa,Qa)):Ma.push(n),n=Oa):14===t?n=Va(99,du.bind(null,e)):n=Va(n=function(e){switch(e){case 15:case 14:return 99;case 13:case 12:case 11:case 10:return 98;case 9:case 8:case 7:case 6:case 4:case 5:return 97;case 3:case 2:case 1:return 95;case 0:return 90;default:throw Error(o(358,e))}}(t),cu.bind(null,e)),e.callbackPriority=t,e.callbackNode=n}}function cu(e){if(eu=-1,nu=tu=0,0!=(48&xi))throw Error(o(327));var t=e.callbackNode;if(Tu()&&e.callbackNode!==t)return null;var n=Ft(e,e===Ci?Ti:0);if(0===n)return null;var r=n,a=xi;xi|=16;var l=bu();for(Ci===e&&Ti===r||(Ai(),yu(e,r));;)try{Eu();break}catch(t){vu(e,t)}if(Ga(),Si.current=l,xi=a,null!==Pi?r=0:(Ci=null,Ti=0,r=zi),0!=(Ii&Ri))yu(e,0);else if(0!==r){if(2===r&&(xi|=64,e.hydrate&&(e.hydrate=!1,Vr(e.containerInfo)),0!==(n=Ut(e))&&(r=wu(e,n))),1===r)throw t=Oi,yu(e,0),fu(e,n),su(e,Ua()),t;switch(e.finishedWork=e.current.alternate,e.finishedLanes=n,r){case 0:case 1:throw Error(o(345));case 2:xu(e);break;case 3:if(fu(e,n),(62914560&n)===n&&10<(r=Ui+500-Ua())){if(0!==Ft(e,0))break;if(((a=e.suspendedLanes)&n)!==n){lu(),e.pingedLanes|=e.suspendedLanes&a;break}e.timeoutHandle=Ar(xu.bind(null,e),r);break}xu(e);break;case 4:if(fu(e,n),(4186112&n)===n)break;for(r=e.eventTimes,a=-1;0<n;){var i=31-Ht(n);l=1<<i,(i=r[i])>a&&(a=i),n&=~l}if(n=a,10<(n=(120>(n=Ua()-n)?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*Ei(n/1960))-n)){e.timeoutHandle=Ar(xu.bind(null,e),n);break}xu(e);break;case 5:xu(e);break;default:throw Error(o(329))}}return su(e,Ua()),e.callbackNode===t?cu.bind(null,e):null}function fu(e,t){for(t&=~Di,t&=~Ri,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Ht(t),r=1<<n;e[n]=-1,t&=~r}}function du(e){if(0!=(48&xi))throw Error(o(327));if(Tu(),e===Ci&&0!=(e.expiredLanes&Ti)){var t=Ti,n=wu(e,t);0!=(Ii&Ri)&&(n=wu(e,t=Ft(e,t)))}else n=wu(e,t=Ft(e,0));if(0!==e.tag&&2===n&&(xi|=64,e.hydrate&&(e.hydrate=!1,Vr(e.containerInfo)),0!==(t=Ut(e))&&(n=wu(e,t))),1===n)throw n=Oi,yu(e,0),fu(e,t),su(e,Ua()),n;return e.finishedWork=e.current.alternate,e.finishedLanes=t,xu(e),su(e,Ua()),null}function pu(e,t){var n=xi;xi|=1;try{return e(t)}finally{0===(xi=n)&&(Ai(),Ha())}}function mu(e,t){var n=xi;xi&=-2,xi|=8;try{return e(t)}finally{0===(xi=n)&&(Ai(),Ha())}}function hu(e,t){oa(Li,Ni),Ni|=t,Ii|=t}function gu(){Ni=Li.current,la(Li)}function yu(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,Br(n)),null!==Pi)for(n=Pi.return;null!==n;){var r=n;switch(r.tag){case 1:null!=(r=r.type.childContextTypes)&&pa();break;case 3:Nl(),la(sa),la(ua),Ql();break;case 5:zl(r);break;case 4:Nl();break;case 13:case 19:la(Ol);break;case 10:Ja(r);break;case 23:case 24:gu()}n=n.return}Ci=e,Pi=ju(e.current,null),Ti=Ni=Ii=t,zi=0,Oi=null,Di=Ri=Mi=0}function vu(e,t){for(;;){var n=Pi;try{if(Ga(),$l.current=Po,Gl){for(var r=Kl.memoizedState;null!==r;){var a=r.queue;null!==a&&(a.pending=null),r=r.next}Gl=!1}if(ql=0,Xl=Yl=Kl=null,Jl=!1,_i.current=null,null===n||null===n.return){zi=1,Oi=t,Pi=null;break}e:{var l=e,o=n.return,i=n,u=t;if(t=Ti,i.flags|=2048,i.firstEffect=i.lastEffect=null,null!==u&&"object"==typeof u&&"function"==typeof u.then){var s=u;if(0==(2&i.mode)){var c=i.alternate;c?(i.updateQueue=c.updateQueue,i.memoizedState=c.memoizedState,i.lanes=c.lanes):(i.updateQueue=null,i.memoizedState=null)}var f=0!=(1&Ol.current),d=o;do{var p;if(p=13===d.tag){var m=d.memoizedState;if(null!==m)p=null!==m.dehydrated;else{var h=d.memoizedProps;p=void 0!==h.fallback&&(!0!==h.unstable_avoidThisFallback||!f)}}if(p){var g=d.updateQueue;if(null===g){var y=new Set;y.add(s),d.updateQueue=y}else g.add(s);if(0==(2&d.mode)){if(d.flags|=64,i.flags|=16384,i.flags&=-2981,1===i.tag)if(null===i.alternate)i.tag=17;else{var v=ll(-1,1);v.tag=2,ol(i,v)}i.lanes|=1;break e}u=void 0,i=t;var b=l.pingCache;if(null===b?(b=l.pingCache=new oi,u=new Set,b.set(s,u)):void 0===(u=b.get(s))&&(u=new Set,b.set(s,u)),!u.has(i)){u.add(i);var w=Mu.bind(null,l,s,i);s.then(w,w)}d.flags|=4096,d.lanes=t;break e}d=d.return}while(null!==d);u=Error((q(i.type)||"A React component")+" suspended while rendering, but no fallback UI was specified.\n\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.")}5!==zi&&(zi=2),u=ai(u,i),d=o;do{switch(d.tag){case 3:l=u,d.flags|=4096,t&=-t,d.lanes|=t,il(d,ii(0,l,t));break e;case 1:l=u;var k=d.type,E=d.stateNode;if(0==(64&d.flags)&&("function"==typeof k.getDerivedStateFromError||null!==E&&"function"==typeof E.componentDidCatch&&(null===$i||!$i.has(E)))){d.flags|=4096,t&=-t,d.lanes|=t,il(d,ui(d,l,t));break e}}d=d.return}while(null!==d)}_u(n)}catch(e){t=e,Pi===n&&null!==n&&(Pi=n=n.return);continue}break}}function bu(){var e=Si.current;return Si.current=Po,null===e?Po:e}function wu(e,t){var n=xi;xi|=16;var r=bu();for(Ci===e&&Ti===t||yu(e,t);;)try{ku();break}catch(t){vu(e,t)}if(Ga(),xi=n,Si.current=r,null!==Pi)throw Error(o(261));return Ci=null,Ti=0,zi}function ku(){for(;null!==Pi;)Su(Pi)}function Eu(){for(;null!==Pi&&!Sa();)Su(Pi)}function Su(e){var t=Bi(e.alternate,e,Ni);e.memoizedProps=e.pendingProps,null===t?_u(e):Pi=t,_i.current=null}function _u(e){var t=e;do{var n=t.alternate;if(e=t.return,0==(2048&t.flags)){if(null!==(n=ni(n,t,Ni)))return void(Pi=n);if(24!==(n=t).tag&&23!==n.tag||null===n.memoizedState||0!=(1073741824&Ni)||0==(4&n.mode)){for(var r=0,a=n.child;null!==a;)r|=a.lanes|a.childLanes,a=a.sibling;n.childLanes=r}null!==e&&0==(2048&e.flags)&&(null===e.firstEffect&&(e.firstEffect=t.firstEffect),null!==t.lastEffect&&(null!==e.lastEffect&&(e.lastEffect.nextEffect=t.firstEffect),e.lastEffect=t.lastEffect),1<t.flags&&(null!==e.lastEffect?e.lastEffect.nextEffect=t:e.firstEffect=t,e.lastEffect=t))}else{if(null!==(n=ri(t)))return n.flags&=2047,void(Pi=n);null!==e&&(e.firstEffect=e.lastEffect=null,e.flags|=2048)}if(null!==(t=t.sibling))return void(Pi=t);Pi=t=e}while(null!==t);0===zi&&(zi=5)}function xu(e){var t=ja();return Ba(99,Cu.bind(null,e,t)),null}function Cu(e,t){do{Tu()}while(null!==qi);if(0!=(48&xi))throw Error(o(327));var n=e.finishedWork;if(null===n)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(o(177));e.callbackNode=null;var r=n.lanes|n.childLanes,a=r,l=e.pendingLanes&~a;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=a,e.mutableReadLanes&=a,e.entangledLanes&=a,a=e.entanglements;for(var i=e.eventTimes,u=e.expirationTimes;0<l;){var s=31-Ht(l),c=1<<s;a[s]=0,i[s]=-1,u[s]=-1,l&=~c}if(null!==Gi&&0==(24&r)&&Gi.has(e)&&Gi.delete(e),e===Ci&&(Pi=Ci=null,Ti=0),1<n.flags?null!==n.lastEffect?(n.lastEffect.nextEffect=n,r=n.firstEffect):r=n:r=n.firstEffect,null!==r){if(a=xi,xi|=32,_i.current=null,Dr=Kt,dr(i=fr())){if("selectionStart"in i)u={start:i.selectionStart,end:i.selectionEnd};else e:if(u=(u=i.ownerDocument)&&u.defaultView||window,(c=u.getSelection&&u.getSelection())&&0!==c.rangeCount){u=c.anchorNode,l=c.anchorOffset,s=c.focusNode,c=c.focusOffset;try{u.nodeType,s.nodeType}catch(e){u=null;break e}var f=0,d=-1,p=-1,m=0,h=0,g=i,y=null;t:for(;;){for(var v;g!==u||0!==l&&3!==g.nodeType||(d=f+l),g!==s||0!==c&&3!==g.nodeType||(p=f+c),3===g.nodeType&&(f+=g.nodeValue.length),null!==(v=g.firstChild);)y=g,g=v;for(;;){if(g===i)break t;if(y===u&&++m===l&&(d=f),y===s&&++h===c&&(p=f),null!==(v=g.nextSibling))break;y=(g=y).parentNode}g=v}u=-1===d||-1===p?null:{start:d,end:p}}else u=null;u=u||{start:0,end:0}}else u=null;Fr={focusedElem:i,selectionRange:u},Kt=!1,ru=null,au=!1,Vi=r;do{try{Pu()}catch(e){if(null===Vi)throw Error(o(330));Iu(Vi,e),Vi=Vi.nextEffect}}while(null!==Vi);ru=null,Vi=r;do{try{for(i=e;null!==Vi;){var b=Vi.flags;if(16&b&&ye(Vi.stateNode,""),128&b){var w=Vi.alternate;if(null!==w){var k=w.ref;null!==k&&("function"==typeof k?k(null):k.current=null)}}switch(1038&b){case 2:yi(Vi),Vi.flags&=-3;break;case 6:yi(Vi),Vi.flags&=-3,bi(Vi.alternate,Vi);break;case 1024:Vi.flags&=-1025;break;case 1028:Vi.flags&=-1025,bi(Vi.alternate,Vi);break;case 4:bi(Vi.alternate,Vi);break;case 8:vi(i,u=Vi);var E=u.alternate;hi(u),null!==E&&hi(E)}Vi=Vi.nextEffect}}catch(e){if(null===Vi)throw Error(o(330));Iu(Vi,e),Vi=Vi.nextEffect}}while(null!==Vi);if(k=Fr,w=fr(),b=k.focusedElem,i=k.selectionRange,w!==b&&b&&b.ownerDocument&&function e(t,n){return!(!t||!n)&&(t===n||(!t||3!==t.nodeType)&&(n&&3===n.nodeType?e(t,n.parentNode):"contains"in t?t.contains(n):!!t.compareDocumentPosition&&!!(16&t.compareDocumentPosition(n))))}(b.ownerDocument.documentElement,b)){null!==i&&dr(b)&&(w=i.start,void 0===(k=i.end)&&(k=w),"selectionStart"in b?(b.selectionStart=w,b.selectionEnd=Math.min(k,b.value.length)):(k=(w=b.ownerDocument||document)&&w.defaultView||window).getSelection&&(k=k.getSelection(),u=b.textContent.length,E=Math.min(i.start,u),i=void 0===i.end?E:Math.min(i.end,u),!k.extend&&E>i&&(u=i,i=E,E=u),u=cr(b,E),l=cr(b,i),u&&l&&(1!==k.rangeCount||k.anchorNode!==u.node||k.anchorOffset!==u.offset||k.focusNode!==l.node||k.focusOffset!==l.offset)&&((w=w.createRange()).setStart(u.node,u.offset),k.removeAllRanges(),E>i?(k.addRange(w),k.extend(l.node,l.offset)):(w.setEnd(l.node,l.offset),k.addRange(w))))),w=[];for(k=b;k=k.parentNode;)1===k.nodeType&&w.push({element:k,left:k.scrollLeft,top:k.scrollTop});for("function"==typeof b.focus&&b.focus(),b=0;b<w.length;b++)(k=w[b]).element.scrollLeft=k.left,k.element.scrollTop=k.top}Kt=!!Dr,Fr=Dr=null,e.current=n,Vi=r;do{try{for(b=e;null!==Vi;){var S=Vi.flags;if(36&S&&di(b,Vi.alternate,Vi),128&S){w=void 0;var _=Vi.ref;if(null!==_){var x=Vi.stateNode;switch(Vi.tag){case 5:w=x;break;default:w=x}"function"==typeof _?_(w):_.current=w}}Vi=Vi.nextEffect}}catch(e){if(null===Vi)throw Error(o(330));Iu(Vi,e),Vi=Vi.nextEffect}}while(null!==Vi);Vi=null,Ia(),xi=a}else e.current=n;if(Wi)Wi=!1,qi=e,Ki=t;else for(Vi=r;null!==Vi;)t=Vi.nextEffect,Vi.nextEffect=null,8&Vi.flags&&((S=Vi).sibling=null,S.stateNode=null),Vi=t;if(0===(r=e.pendingLanes)&&($i=null),1===r?e===Zi?Ji++:(Ji=0,Zi=e):Ji=0,n=n.stateNode,ba&&"function"==typeof ba.onCommitFiberRoot)try{ba.onCommitFiberRoot(va,n,void 0,64==(64&n.current.flags))}catch(e){}if(su(e,Ua()),Hi)throw Hi=!1,e=Qi,Qi=null,e;return 0!=(8&xi)||Ha(),null}function Pu(){for(;null!==Vi;){var e=Vi.alternate;au||null===ru||(0!=(8&Vi.flags)?Ze(Vi,ru)&&(au=!0):13===Vi.tag&&ki(e,Vi)&&Ze(Vi,ru)&&(au=!0));var t=Vi.flags;0!=(256&t)&&fi(e,Vi),0==(512&t)||Wi||(Wi=!0,Va(97,(function(){return Tu(),null}))),Vi=Vi.nextEffect}}function Tu(){if(90!==Ki){var e=97<Ki?97:Ki;return Ki=90,Ba(e,zu)}return!1}function Nu(e,t){Yi.push(t,e),Wi||(Wi=!0,Va(97,(function(){return Tu(),null})))}function Lu(e,t){Xi.push(t,e),Wi||(Wi=!0,Va(97,(function(){return Tu(),null})))}function zu(){if(null===qi)return!1;var e=qi;if(qi=null,0!=(48&xi))throw Error(o(331));var t=xi;xi|=32;var n=Xi;Xi=[];for(var r=0;r<n.length;r+=2){var a=n[r],l=n[r+1],i=a.destroy;if(a.destroy=void 0,"function"==typeof i)try{i()}catch(e){if(null===l)throw Error(o(330));Iu(l,e)}}for(n=Yi,Yi=[],r=0;r<n.length;r+=2){a=n[r],l=n[r+1];try{var u=a.create;a.destroy=u()}catch(e){if(null===l)throw Error(o(330));Iu(l,e)}}for(u=e.current.firstEffect;null!==u;)e=u.nextEffect,u.nextEffect=null,8&u.flags&&(u.sibling=null,u.stateNode=null),u=e;return xi=t,Ha(),!0}function Ou(e,t,n){ol(e,t=ii(0,t=ai(n,t),1)),t=lu(),null!==(e=uu(e,1))&&(Vt(e,1,t),su(e,t))}function Iu(e,t){if(3===e.tag)Ou(e,e,t);else for(var n=e.return;null!==n;){if(3===n.tag){Ou(n,e,t);break}if(1===n.tag){var r=n.stateNode;if("function"==typeof n.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===$i||!$i.has(r))){var a=ui(n,e=ai(t,e),1);if(ol(n,a),a=lu(),null!==(n=uu(n,1)))Vt(n,1,a),su(n,a);else if("function"==typeof r.componentDidCatch&&(null===$i||!$i.has(r)))try{r.componentDidCatch(t,e)}catch(e){}break}}n=n.return}}function Mu(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=lu(),e.pingedLanes|=e.suspendedLanes&n,Ci===e&&(Ti&n)===n&&(4===zi||3===zi&&(62914560&Ti)===Ti&&500>Ua()-Ui?yu(e,0):Di|=n),su(e,t)}function Ru(e,t){var n=e.stateNode;null!==n&&n.delete(t),0===(t=0)&&(0==(2&(t=e.mode))?t=1:0==(4&t)?t=99===ja()?1:2:(0===tu&&(tu=Ii),0===(t=At(62914560&~tu))&&(t=4194304))),n=lu(),null!==(e=uu(e,t))&&(Vt(e,t,n),su(e,n))}function Du(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.flags=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childLanes=this.lanes=0,this.alternate=null}function Fu(e,t,n,r){return new Du(e,t,n,r)}function Uu(e){return!(!(e=e.prototype)||!e.isReactComponent)}function ju(e,t){var n=e.alternate;return null===n?((n=Fu(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.nextEffect=null,n.firstEffect=null,n.lastEffect=null),n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Au(e,t,n,r,a,l){var i=2;if(r=e,"function"==typeof e)Uu(e)&&(i=1);else if("string"==typeof e)i=5;else e:switch(e){case _:return Bu(n.children,a,l,t);case D:i=8,a|=16;break;case x:i=8,a|=1;break;case C:return(e=Fu(12,n,t,8|a)).elementType=C,e.type=C,e.lanes=l,e;case L:return(e=Fu(13,n,t,a)).type=L,e.elementType=L,e.lanes=l,e;case z:return(e=Fu(19,n,t,a)).elementType=z,e.lanes=l,e;case F:return Vu(n,a,l,t);case U:return(e=Fu(24,n,t,a)).elementType=U,e.lanes=l,e;default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case P:i=10;break e;case T:i=9;break e;case N:i=11;break e;case O:i=14;break e;case I:i=16,r=null;break e;case M:i=22;break e}throw Error(o(130,null==e?e:typeof e,""))}return(t=Fu(i,n,t,a)).elementType=e,t.type=r,t.lanes=l,t}function Bu(e,t,n,r){return(e=Fu(7,e,r,t)).lanes=n,e}function Vu(e,t,n,r){return(e=Fu(23,e,r,t)).elementType=F,e.lanes=n,e}function Hu(e,t,n){return(e=Fu(6,e,null,t)).lanes=n,e}function Qu(e,t,n){return(t=Fu(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function $u(e,t,n){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.pendingContext=this.context=null,this.hydrate=n,this.callbackNode=null,this.callbackPriority=0,this.eventTimes=Bt(0),this.expirationTimes=Bt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Bt(0),this.mutableSourceEagerHydrationData=null}function Wu(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:S,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}function qu(e,t,n,r){var a=t.current,l=lu(),i=ou(a);e:if(n){t:{if(Ye(n=n._reactInternals)!==n||1!==n.tag)throw Error(o(170));var u=n;do{switch(u.tag){case 3:u=u.stateNode.context;break t;case 1:if(da(u.type)){u=u.stateNode.__reactInternalMemoizedMergedChildContext;break t}}u=u.return}while(null!==u);throw Error(o(171))}if(1===n.tag){var s=n.type;if(da(s)){n=ha(n,s,u);break e}}n=u}else n=ia;return null===t.context?t.context=n:t.pendingContext=n,(t=ll(l,i)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),ol(a,t),iu(a,i,l),i}function Ku(e){if(!(e=e.current).child)return null;switch(e.child.tag){case 5:default:return e.child.stateNode}}function Yu(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function Xu(e,t){Yu(e,t),(e=e.alternate)&&Yu(e,t)}function Gu(e,t,n){var r=null!=n&&null!=n.hydrationOptions&&n.hydrationOptions.mutableSources||null;if(n=new $u(e,t,null!=n&&!0===n.hydrate),t=Fu(3,null,null,2===t?7:1===t?3:0),n.current=t,t.stateNode=n,rl(t),e[Yr]=n.current,Pr(8===e.nodeType?e.parentNode:e),r)for(e=0;e<r.length;e++){var a=(t=r[e])._getVersion;a=a(t._source),null==n.mutableSourceEagerHydrationData?n.mutableSourceEagerHydrationData=[t,a]:n.mutableSourceEagerHydrationData.push(t,a)}this._internalRoot=n}function Ju(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function Zu(e,t,n,r,a){var l=n._reactRootContainer;if(l){var o=l._internalRoot;if("function"==typeof a){var i=a;a=function(){var e=Ku(o);i.call(e)}}qu(t,o,e,a)}else{if(l=n._reactRootContainer=function(e,t){if(t||(t=!(!(t=e?9===e.nodeType?e.documentElement:e.firstChild:null)||1!==t.nodeType||!t.hasAttribute("data-reactroot"))),!t)for(var n;n=e.lastChild;)e.removeChild(n);return new Gu(e,0,t?{hydrate:!0}:void 0)}(n,r),o=l._internalRoot,"function"==typeof a){var u=a;a=function(){var e=Ku(o);u.call(e)}}mu((function(){qu(t,o,e,a)}))}return Ku(o)}function es(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!Ju(t))throw Error(o(200));return Wu(e,t,null,n)}Bi=function(e,t,n){var r=t.lanes;if(null!==e)if(e.memoizedProps!==t.pendingProps||sa.current)Oo=!0;else{if(0==(n&r)){switch(Oo=!1,t.tag){case 3:Vo(t),Vl();break;case 5:Ll(t);break;case 1:da(t.type)&&ga(t);break;case 4:Tl(t,t.stateNode.containerInfo);break;case 10:r=t.memoizedProps.value;var a=t.type._context;oa(qa,a._currentValue),a._currentValue=r;break;case 13:if(null!==t.memoizedState)return 0!=(n&t.child.childLanes)?qo(e,t,n):(oa(Ol,1&Ol.current),null!==(t=ei(e,t,n))?t.sibling:null);oa(Ol,1&Ol.current);break;case 19:if(r=0!=(n&t.childLanes),0!=(64&e.flags)){if(r)return Zo(e,t,n);t.flags|=64}if(null!==(a=t.memoizedState)&&(a.rendering=null,a.tail=null,a.lastEffect=null),oa(Ol,Ol.current),r)break;return null;case 23:case 24:return t.lanes=0,Fo(e,t,n)}return ei(e,t,n)}Oo=0!=(16384&e.flags)}else Oo=!1;switch(t.lanes=0,t.tag){case 2:if(r=t.type,null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,a=fa(t,ua.current),el(t,n),a=to(null,t,r,e,a,n),t.flags|=1,"object"==typeof a&&null!==a&&"function"==typeof a.render&&void 0===a.$$typeof){if(t.tag=1,t.memoizedState=null,t.updateQueue=null,da(r)){var l=!0;ga(t)}else l=!1;t.memoizedState=null!==a.state&&void 0!==a.state?a.state:null,rl(t);var i=r.getDerivedStateFromProps;"function"==typeof i&&fl(t,r,i,e),a.updater=dl,t.stateNode=a,a._reactInternals=t,gl(t,r,e,n),t=Bo(null,t,r,!0,l,n)}else t.tag=0,Io(null,t,a,n),t=t.child;return t;case 16:a=t.elementType;e:{switch(null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,a=(l=a._init)(a._payload),t.type=a,l=t.tag=function(e){if("function"==typeof e)return Uu(e)?1:0;if(null!=e){if((e=e.$$typeof)===N)return 11;if(e===O)return 14}return 2}(a),e=Wa(a,e),l){case 0:t=jo(null,t,a,e,n);break e;case 1:t=Ao(null,t,a,e,n);break e;case 11:t=Mo(null,t,a,e,n);break e;case 14:t=Ro(null,t,a,Wa(a.type,e),r,n);break e}throw Error(o(306,a,""))}return t;case 0:return r=t.type,a=t.pendingProps,jo(e,t,r,a=t.elementType===r?a:Wa(r,a),n);case 1:return r=t.type,a=t.pendingProps,Ao(e,t,r,a=t.elementType===r?a:Wa(r,a),n);case 3:if(Vo(t),r=t.updateQueue,null===e||null===r)throw Error(o(282));if(r=t.pendingProps,a=null!==(a=t.memoizedState)?a.element:null,al(e,t),ul(t,r,null,n),(r=t.memoizedState.element)===a)Vl(),t=ei(e,t,n);else{if((l=(a=t.stateNode).hydrate)&&(Rl=Hr(t.stateNode.containerInfo.firstChild),Ml=t,l=Dl=!0),l){if(null!=(e=a.mutableSourceEagerHydrationData))for(a=0;a<e.length;a+=2)(l=e[a])._workInProgressVersionPrimary=e[a+1],Hl.push(l);for(n=El(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|1024,n=n.sibling}else Io(e,t,r,n),Vl();t=t.child}return t;case 5:return Ll(t),null===e&&jl(t),r=t.type,a=t.pendingProps,l=null!==e?e.memoizedProps:null,i=a.children,jr(r,a)?i=null:null!==l&&jr(r,l)&&(t.flags|=16),Uo(e,t),Io(e,t,i,n),t.child;case 6:return null===e&&jl(t),null;case 13:return qo(e,t,n);case 4:return Tl(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=kl(t,null,r,n):Io(e,t,r,n),t.child;case 11:return r=t.type,a=t.pendingProps,Mo(e,t,r,a=t.elementType===r?a:Wa(r,a),n);case 7:return Io(e,t,t.pendingProps,n),t.child;case 8:case 12:return Io(e,t,t.pendingProps.children,n),t.child;case 10:e:{r=t.type._context,a=t.pendingProps,i=t.memoizedProps,l=a.value;var u=t.type._context;if(oa(qa,u._currentValue),u._currentValue=l,null!==i)if(u=i.value,0===(l=or(u,l)?0:0|("function"==typeof r._calculateChangedBits?r._calculateChangedBits(u,l):1073741823))){if(i.children===a.children&&!sa.current){t=ei(e,t,n);break e}}else for(null!==(u=t.child)&&(u.return=t);null!==u;){var s=u.dependencies;if(null!==s){i=u.child;for(var c=s.firstContext;null!==c;){if(c.context===r&&0!=(c.observedBits&l)){1===u.tag&&((c=ll(-1,n&-n)).tag=2,ol(u,c)),u.lanes|=n,null!==(c=u.alternate)&&(c.lanes|=n),Za(u.return,n),s.lanes|=n;break}c=c.next}}else i=10===u.tag&&u.type===t.type?null:u.child;if(null!==i)i.return=u;else for(i=u;null!==i;){if(i===t){i=null;break}if(null!==(u=i.sibling)){u.return=i.return,i=u;break}i=i.return}u=i}Io(e,t,a.children,n),t=t.child}return t;case 9:return a=t.type,r=(l=t.pendingProps).children,el(t,n),r=r(a=tl(a,l.unstable_observedBits)),t.flags|=1,Io(e,t,r,n),t.child;case 14:return l=Wa(a=t.type,t.pendingProps),Ro(e,t,a,l=Wa(a.type,l),r,n);case 15:return Do(e,t,t.type,t.pendingProps,r,n);case 17:return r=t.type,a=t.pendingProps,a=t.elementType===r?a:Wa(r,a),null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),t.tag=1,da(r)?(e=!0,ga(t)):e=!1,el(t,n),ml(t,r,a),gl(t,r,a,n),Bo(null,t,r,!0,e,n);case 19:return Zo(e,t,n);case 23:case 24:return Fo(e,t,n)}throw Error(o(156,t.tag))},Gu.prototype.render=function(e){qu(e,this._internalRoot,null,null)},Gu.prototype.unmount=function(){var e=this._internalRoot,t=e.containerInfo;qu(null,e,null,(function(){t[Yr]=null}))},et=function(e){13===e.tag&&(iu(e,4,lu()),Xu(e,4))},tt=function(e){13===e.tag&&(iu(e,67108864,lu()),Xu(e,67108864))},nt=function(e){if(13===e.tag){var t=lu(),n=ou(e);iu(e,n,t),Xu(e,n)}},rt=function(e,t){return t()},Ce=function(e,t,n){switch(t){case"input":if(ne(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=ea(r);if(!a)throw Error(o(90));G(r),ne(r,a)}}}break;case"textarea":se(e,n);break;case"select":null!=(t=n.value)&&oe(e,!!n.multiple,t,!1)}},Oe=pu,Ie=function(e,t,n,r,a){var l=xi;xi|=4;try{return Ba(98,e.bind(null,t,n,r,a))}finally{0===(xi=l)&&(Ai(),Ha())}},Me=function(){0==(49&xi)&&(function(){if(null!==Gi){var e=Gi;Gi=null,e.forEach((function(e){e.expiredLanes|=24&e.pendingLanes,su(e,Ua())}))}Ha()}(),Tu())},Re=function(e,t){var n=xi;xi|=2;try{return e(t)}finally{0===(xi=n)&&(Ai(),Ha())}};var ts={Events:[Jr,Zr,ea,Le,ze,Tu,{current:!1}]},ns={findFiberByHostInstance:Gr,bundleType:0,version:"17.0.1",rendererPackageName:"react-dom"},rs={bundleType:ns.bundleType,version:ns.version,rendererPackageName:ns.rendererPackageName,rendererConfig:ns.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:k.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=Je(e))?null:e.stateNode},findFiberByHostInstance:ns.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null};if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var as=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!as.isDisabled&&as.supportsFiber)try{va=as.inject(rs),ba=as}catch(e){}}t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ts,t.createPortal=es,t.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"==typeof e.render)throw Error(o(188));throw Error(o(268,Object.keys(e)))}return e=null===(e=Je(t))?null:e.stateNode},t.flushSync=function(e,t){var n=xi;if(0!=(48&n))return e(t);xi|=1;try{if(e)return Ba(99,e.bind(null,t))}finally{xi=n,Ha()}},t.hydrate=function(e,t,n){if(!Ju(t))throw Error(o(200));return Zu(null,e,t,!0,n)},t.render=function(e,t,n){if(!Ju(t))throw Error(o(200));return Zu(null,e,t,!1,n)},t.unmountComponentAtNode=function(e){if(!Ju(e))throw Error(o(40));return!!e._reactRootContainer&&(mu((function(){Zu(null,null,e,!1,(function(){e._reactRootContainer=null,e[Yr]=null}))})),!0)},t.unstable_batchedUpdates=pu,t.unstable_createPortal=function(e,t){return es(e,t,2<arguments.length&&void 0!==arguments[2]?arguments[2]:null)},t.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Ju(n))throw Error(o(200));if(null==e||void 0===e._reactInternals)throw Error(o(38));return Zu(e,t,n,!1,r)},t.version="17.0.1"},function(e,t,n){"use strict";e.exports=n(7)},function(e,t,n){"use strict";
|
23 |
/** @license React v0.20.1
|
24 |
* scheduler.production.min.js
|
25 |
*
|
27 |
*
|
28 |
* This source code is licensed under the MIT license found in the
|
29 |
* LICENSE file in the root directory of this source tree.
|
30 |
+
*/var r,a,l,o;if("object"==typeof performance&&"function"==typeof performance.now){var i=performance;t.unstable_now=function(){return i.now()}}else{var u=Date,s=u.now();t.unstable_now=function(){return u.now()-s}}if("undefined"==typeof window||"function"!=typeof MessageChannel){var c=null,f=null,d=function(){if(null!==c)try{var e=t.unstable_now();c(!0,e),c=null}catch(e){throw setTimeout(d,0),e}};r=function(e){null!==c?setTimeout(r,0,e):(c=e,setTimeout(d,0))},a=function(e,t){f=setTimeout(e,t)},l=function(){clearTimeout(f)},t.unstable_shouldYield=function(){return!1},o=t.unstable_forceFrameRate=function(){}}else{var p=window.setTimeout,m=window.clearTimeout;if("undefined"!=typeof console){var h=window.cancelAnimationFrame;"function"!=typeof window.requestAnimationFrame&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),"function"!=typeof h&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills")}var g=!1,y=null,v=-1,b=5,w=0;t.unstable_shouldYield=function(){return t.unstable_now()>=w},o=function(){},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):b=0<e?Math.floor(1e3/e):5};var k=new MessageChannel,E=k.port2;k.port1.onmessage=function(){if(null!==y){var e=t.unstable_now();w=e+b;try{y(!0,e)?E.postMessage(null):(g=!1,y=null)}catch(e){throw E.postMessage(null),e}}else g=!1},r=function(e){y=e,g||(g=!0,E.postMessage(null))},a=function(e,n){v=p((function(){e(t.unstable_now())}),n)},l=function(){m(v),v=-1}}function S(e,t){var n=e.length;e.push(t);e:for(;;){var r=n-1>>>1,a=e[r];if(!(void 0!==a&&0<C(a,t)))break e;e[r]=t,e[n]=a,n=r}}function _(e){return void 0===(e=e[0])?null:e}function x(e){var t=e[0];if(void 0!==t){var n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,a=e.length;r<a;){var l=2*(r+1)-1,o=e[l],i=l+1,u=e[i];if(void 0!==o&&0>C(o,n))void 0!==u&&0>C(u,o)?(e[r]=u,e[i]=n,r=i):(e[r]=o,e[l]=n,r=l);else{if(!(void 0!==u&&0>C(u,n)))break e;e[r]=u,e[i]=n,r=i}}}return t}return null}function C(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}var P=[],T=[],N=1,L=null,z=3,O=!1,I=!1,M=!1;function R(e){for(var t=_(T);null!==t;){if(null===t.callback)x(T);else{if(!(t.startTime<=e))break;x(T),t.sortIndex=t.expirationTime,S(P,t)}t=_(T)}}function D(e){if(M=!1,R(e),!I)if(null!==_(P))I=!0,r(F);else{var t=_(T);null!==t&&a(D,t.startTime-e)}}function F(e,n){I=!1,M&&(M=!1,l()),O=!0;var r=z;try{for(R(n),L=_(P);null!==L&&(!(L.expirationTime>n)||e&&!t.unstable_shouldYield());){var o=L.callback;if("function"==typeof o){L.callback=null,z=L.priorityLevel;var i=o(L.expirationTime<=n);n=t.unstable_now(),"function"==typeof i?L.callback=i:L===_(P)&&x(P),R(n)}else x(P);L=_(P)}if(null!==L)var u=!0;else{var s=_(T);null!==s&&a(D,s.startTime-n),u=!1}return u}finally{L=null,z=r,O=!1}}var U=o;t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){I||O||(I=!0,r(F))},t.unstable_getCurrentPriorityLevel=function(){return z},t.unstable_getFirstCallbackNode=function(){return _(P)},t.unstable_next=function(e){switch(z){case 1:case 2:case 3:var t=3;break;default:t=z}var n=z;z=t;try{return e()}finally{z=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=U,t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=z;z=e;try{return t()}finally{z=n}},t.unstable_scheduleCallback=function(e,n,o){var i=t.unstable_now();switch("object"==typeof o&&null!==o?o="number"==typeof(o=o.delay)&&0<o?i+o:i:o=i,e){case 1:var u=-1;break;case 2:u=250;break;case 5:u=1073741823;break;case 4:u=1e4;break;default:u=5e3}return e={id:N++,callback:n,priorityLevel:e,startTime:o,expirationTime:u=o+u,sortIndex:-1},o>i?(e.sortIndex=o,S(T,e),null===_(P)&&e===_(T)&&(M?l():M=!0,a(D,o-i))):(e.sortIndex=u,S(P,e),I||O||(I=!0,r(F))),e},t.unstable_wrapCallback=function(e){var t=z;return function(){var n=z;z=t;try{return e.apply(this,arguments)}finally{z=n}}}},function(e,t,n){"use strict";n.r(t),n.d(t,"yasrSearchStarsDom",(function(){return M}));var r,a=n(0),l=n.n(a),o=n(2),i=n.n(o);var u="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto),s=new Uint8Array(16);function c(){if(!u)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return u(s)}var f=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;for(var d=function(e){return"string"==typeof e&&f.test(e)},p=[],m=0;m<256;++m)p.push((m+256).toString(16).substr(1));var h=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(p[e[t+0]]+p[e[t+1]]+p[e[t+2]]+p[e[t+3]]+"-"+p[e[t+4]]+p[e[t+5]]+"-"+p[e[t+6]]+p[e[t+7]]+"-"+p[e[t+8]]+p[e[t+9]]+"-"+p[e[t+10]]+p[e[t+11]]+p[e[t+12]]+p[e[t+13]]+p[e[t+14]]+p[e[t+15]]).toLowerCase();if(!d(n))throw TypeError("Stringified UUID is invalid");return n};var g=function(e,t,n){var r=(e=e||{}).random||(e.rng||c)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var a=0;a<16;++a)t[n+a]=r[a];return t}return h(r)};function y(e){return(y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function v(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function b(e,t){return(b=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function w(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=E(e);if(t){var a=E(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return k(this,n)}}function k(e,t){return!t||"object"!==y(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function E(e){return(E=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var S=wp.i18n.__;function _(e){var t="yasr-ranking-element-"+g(),n=document.getElementById(e.tableId).dataset.rankingSize;return l.a.createElement("div",{id:t,ref:function(){return raterJs({starSize:n,step:.1,showToolTip:!1,rating:e.rating,readOnly:!0,element:document.getElementById(t)})}})}function x(e){if(void 0!==e.post.number_of_votes)return l.a.createElement("span",{className:"yasr-most-rated-text"},"[",S("Total:","yet-another-stars-rating")," ",e.post.number_of_votes," ",S("Average:","yet-another-stars-rating")," ",e.post.rating,"]");var t=e.text;return l.a.createElement("span",{className:"yasr-highest-rated-text"},t," ",e.post.rating)}function C(e){return l.a.createElement("td",{className:e.colClass},l.a.createElement("a",{href:e.post.link},function(e){if("string"!=typeof e||-1===e.indexOf("&"))return e;void 0===r&&(r=document.implementation&&document.implementation.createHTMLDocument?document.implementation.createHTMLDocument("").createElement("textarea"):document.createElement("textarea")),r.innerHTML=e;var t=r.textContent;return r.innerHTML="",t}(e.post.title)))}function P(e){var t="after",n=S("Rating:","yet-another-stars-rating"),r=new URLSearchParams(e.rankingParams);return null!==r.get("text_position")&&(t=r.get("text_position")),null!==r.get("custom_txt")&&(n=r.get("custom_txt")),"before"===t?l.a.createElement("td",{className:e.colClass},l.a.createElement(x,{post:e.post,tableId:e.tableId,text:n}),l.a.createElement(_,{rating:e.post.rating,tableId:e.tableId})):l.a.createElement("td",{className:e.colClass},l.a.createElement(_,{rating:e.post.rating,tableId:e.tableId}),l.a.createElement(x,{post:e.post,tableId:e.tableId,text:n}))}function T(e){var t="",n="";return"overall_rating"===e.source?(t="yasr-top-10-overall-left",n="yasr-top-10-overall-right"):"visitor_votes"===e.source&&(t="yasr-top-10-most-highest-left",n="yasr-top-10-most-highest-right"),l.a.createElement("tr",{className:e.trClass},l.a.createElement(C,{colClass:t,post:e.post}),l.a.createElement(P,{colClass:n,post:e.post,tableId:e.tableId,rankingParams:e.rankingParams}))}function N(e){return l.a.createElement("tbody",{id:e.tBodyId,style:{display:e.show}},e.data.map((function(t,n){var r="yasr-rankings-td-colored";return"overall_rating"===e.source&&(r="yasr-rankings-td-white"),n%2==0&&(r="yasr-rankings-td-white","overall_rating"===e.source&&(r="yasr-rankings-td-colored")),l.a.createElement(T,{key:t.post_id,source:e.source,tableId:e.tableId,rankingParams:e.rankingParams,post:t,trClass:r})})))}var L=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&b(e,t)}(o,e);var t,n,r,a=w(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=a.call(this,e)).state={error:null,isLoaded:!1,data:[],tableId:e.tableId,source:e.source,rankingParams:e.params},t}return t=o,(n=[{key:"componentDidMount",value:function(){var e=this,t=JSON.parse(document.getElementById(this.state.tableId).dataset.rankingData),n={};if("yes"!==yasrCommonData.ajaxEnabled)console.info(S("Ajax Disabled, getting data from source","yet-another-stars-rating")),this.setState({isLoaded:!0,data:t});else if(!1!==this.state.source){var r=this.returnRestUrl();Promise.all(r.map((function(e){return fetch(e).then((function(e){return!0===e.ok?e.json():(console.info(S("Ajax Call Failed. Getting data from source")),"KO")})).then((function(e){"KO"===e?n=t:("overall_rating"===e.source&&(n=e),"visitor_votes"===e.source&&(n[e.show]=e.data_vv))})).catch((function(e){n=t,console.info(S(e))}))}))).then((function(t){e.setState({isLoaded:!0,data:n})})).catch((function(t){console.info(S(t)),e.setState({isLoaded:!0,data:n})}))}else this.setState({error:S("Invalid Data Source","yet-another-stars-rating")})}},{key:"returnRestUrl",value:function(){var e=""!==this.state.rankingParams?this.state.rankingParams:"",t=this.state.source,n=!1,r="yet-another-stars-rating/v1/yasr-rankings/",a="";if(""!==e&&!1!==e){var l=new URLSearchParams(e);null!==l.get("order_by")&&(a+="order_by="+l.get("order_by")),null!==l.get("limit")&&(a+="&limit="+l.get("limit")),null!==l.get("ctg")?a+="&ctg="+l.get("ctg"):null!==l.get("cpt")&&(a+="&cpt="+l.get("cpt")),""!==a&&(a="&"+(a=a.replace(/\s+/g,"")))}else a="";if("overall_rating"===t&&(n=[yasrCommonData.restEndpoint+r+"?source="+t+a]),"visitor_votes"===t){var o="",i="";if(""!==e){var u=new URLSearchParams(e);null!==u.get("required_votes[most]")&&(o="&required_votes="+u.get("required_votes[most]")),null!==u.get("required_votes[highest]")&&(i="&required_votes="+u.get("required_votes[highest]"))}n=[yasrCommonData.restEndpoint+r+"?show=most&source="+t+a+o,yasrCommonData.restEndpoint+r+"?show=highest&source="+t+a+i]}return n}},{key:"rankingTableHead",value:function(e,t){var n=this.state.tableId,r="link-most-rated-posts-"+n,a="link-highest-rated-posts-"+n;if("visitor_votes"===e){var o=l.a.createElement("span",null,l.a.createElement("span",{id:r},S("Most Rated","yet-another-stars-rating"))," | ",l.a.createElement("a",{href:"#",id:a,onClick:this.switchTBody.bind(this)},S("Highest Rated","yet-another-stars-rating")));return"highest"===t&&(o=l.a.createElement("span",null,l.a.createElement("span",{id:a},S("Highest Rated","yet-another-stars-rating"))," | ",l.a.createElement("a",{href:"#",id:r,onClick:this.switchTBody.bind(this)},S("Most Rated","yet-another-stars-rating")))),l.a.createElement("thead",null,l.a.createElement("tr",{className:"yasr-rankings-td-colored yasr-rankings-heading"},l.a.createElement("th",null,"Post"),l.a.createElement("th",null,S("Order By","yet-another-stars-rating-pro"),": ",o)))}return l.a.createElement(l.a.Fragment,null)}},{key:"switchTBody",value:function(e){e.preventDefault();var t=e.target.id,n=this.state.tableId,r="link-most-rated-posts-"+n,a="link-highest-rated-posts-"+n,l="most-rated-posts-"+n,o="highest-rated-posts-"+n,i=document.getElementById(t),u=document.createElement("span");u.innerHTML=i.innerHTML,u.id=i.id,i.parentNode.replaceChild(u,i),t===r&&(document.getElementById(o).style.display="none",document.getElementById(l).style.display="",u=document.getElementById(a),i.innerHTML=u.innerHTML,i.id=u.id,u.parentNode.replaceChild(i,u)),t===a&&(document.getElementById(l).style.display="none",document.getElementById(o).style.display="",u=document.getElementById(r),i.innerHTML=u.innerHTML,i.id=u.id,u.parentNode.replaceChild(i,u))}},{key:"rankingTableBody",value:function(){var e=this.state,t=e.data,n=e.source,r=e.rankingParams;if("overall_rating"===n)return l.a.createElement(N,{data:t.data_overall,tableId:this.state.tableId,tBodyId:"overall_"+this.state.tableId,rankingParams:r,show:"table-row-group",source:n});if("visitor_votes"===n){var a=t.most,o=t.highest,i="most",u="table-row-group",s="none",c=new URLSearchParams(r);return null!==c.get("view")&&(i=c.get("view")),"highest"===i&&(u="none",s="table-row-group"),l.a.createElement(l.a.Fragment,null,this.rankingTableHead(n,i),l.a.createElement(N,{data:a,tableId:this.state.tableId,tBodyId:"most-rated-posts-"+this.state.tableId,rankingParams:r,show:u,source:n}),l.a.createElement(N,{data:o,tableId:this.state.tableId,tBodyId:"highest-rated-posts-"+this.state.tableId,rankingParams:r,show:s,source:n}))}}},{key:"render",value:function(){var e=this.state,t=e.error,n=e.isLoaded;return t?l.a.createElement("tbody",null,l.a.createElement("tr",null,l.a.createElement("td",null,console.log(t),"Error"))):!1===n?l.a.createElement("tbody",null,l.a.createElement("tr",null,l.a.createElement("td",null,S("Loading Charts","yet-another-stars-rating")))):l.a.createElement(l.a.Fragment,null,this.rankingTableBody())}}])&&v(t.prototype,n),r&&v(t,r),o}(l.a.Component);for(var z=wp.i18n.__,O=["yasr-rater-stars","yasr-rater-stars-vv","yasr-multiset-visitors-rater"],I=0;I<O.length;I++)M(O[I]);function M(e){var t=document.getElementsByClassName(e);if(t.length>0){if("yasr-rater-stars"!==e&&"yasr-ranking-stars"!==e||function(e){for(var t=0;t<e.length;t++)if(!1===e.item(t).classList.contains("yasr-star-rating")){var n=e.item(t).id;R(e.item(t).getAttribute("data-rater-starsize"),n)}}(t),"yasr-rater-stars-vv"===e&&(function(e){for(var t=0;t<e.length;t++)!function(t){if(!1===e.item(t).classList.contains("yasr-star-rating")){var n=e.item(t).getAttribute("data-rating"),r=e.item(t).getAttribute("data-readonly-attribute"),a=e.item(t).getAttribute("data-rater-readonly");null===r&&(r=!1),r=F(r),a=F(a),!0===r&&(a=!0);var l=e.item(t).getAttribute("data-rater-postid"),o=e.item(t).id,i=o.replace("yasr-visitor-votes-rater-",""),u=parseInt(e.item(t).getAttribute("data-rater-starsize")),s=e.item(t).getAttribute("data-rater-nonce"),c=e.item(t).getAttribute("data-issingular"),f="yasr-vv-votes-number-container-"+i,d="yasr-vv-average-container-"+i,p=document.getElementById(f),m=document.getElementById(d),h="yasr-vv-loader-"+i,g=!1;if("yes"===yasrCommonData.ajaxEnabled){var y=e.item(t).getAttribute("data-cpt");""===y&&(y="posts");var v="wp/v2/"+y+"/"+l+"?_fields=yasr_visitor_votes&_wpnonce="+yasrCommonData.nonce;jQuery.get(yasrCommonData.restEndpoint+v).done((function(e){var t;(t=!0===r||e.yasr_visitor_votes.stars_attributes.read_only,n=(n=e.yasr_visitor_votes.number_of_votes>0?e.yasr_visitor_votes.sum_votes/e.yasr_visitor_votes.number_of_votes:0).toFixed(1),n=parseFloat(n),D(u,n,l,t,o,i,s,c,p,m,h),!0!==r)&&(null!==p&&(p.innerHTML=e.yasr_visitor_votes.number_of_votes),null!==m&&(m.innerHTML=n),!1!==e.yasr_visitor_votes.stars_attributes.span_bottom&&(g=e.yasr_visitor_votes.stars_attributes.span_bottom,document.getElementById(h).innerHTML=g))})).fail((function(e,t,f,d){console.info(z("YASR ajax call failed. Showing ratings from html","yet-another-stars-rating")),D(u,n,l,a,o,i,s,c,p,m,h),!0!==r&&(document.getElementById("yasr-below-stars-hidden-"+i).style.display="")}))}else D(u,n,l,a,o,i,s,c,p,m,h)}}(t)}(t),"yes"===yasrCommonData.visitorStatsEnabled)){var n=document.getElementsByClassName("yasr-dashicons-visitor-stats");n&&function(e){for(var t=!1,n=0;n<e.length;n++)!function(n){var r="#"+e.item(n).id,a={action:"yasr_stats_visitors_votes",post_id:e.item(n).getAttribute("data-postid")};tippy(r,{content:'<span style="color: #0a0a0a">Loading...</span>',theme:"yasr",arrow:"true",arrowType:"round",onShow:function(e){r!==t&&jQuery.post(yasrCommonData.ajaxurl,a,(function(t){t=JSON.parse(t),e.setContent(t)}))},onHidden:function(){t=r}})}(n)}(n)}"yasr-multiset-visitors-rater"===e&&function(e){for(var t="",n=[],r=0;r<e.length;r++)!function(r){if(!1===e.item(r).classList.contains("yasr-star-rating")){var a=e.item(r).id,l=e.item(r).getAttribute("data-rater-readonly");l=F(l);var o=document.querySelector("#"+a);raterJs({starSize:16,step:1,showToolTip:!1,readOnly:l,element:o,rateCallback:function(e,r){var a=o.getAttribute("data-rater-postid"),l=o.getAttribute("data-rater-setid"),i=o.getAttribute("data-rater-set-field-id");e=e.toFixed(1);var u=parseInt(e);this.setRating(u),t={postid:a,setid:l,field:i,rating:u},n.push(t),r()}})}}(r);jQuery(".yasr-send-visitor-multiset").on("click",(function(){var e=this.getAttribute("data-postid"),t=this.getAttribute("data-setid"),r=this.getAttribute("data-nonce");jQuery("#yasr-send-visitor-multiset-"+e+"-"+t).hide(),jQuery("#yasr-loader-multiset-visitor-"+e+"-"+t).show();var a={action:"yasr_visitor_multiset_field_vote",nonce:r,post_id:e,rating:n,set_type:t};jQuery.post(yasrCommonData.ajaxurl,a,(function(n){jQuery("#yasr-loader-multiset-visitor-"+e+"-"+t).text(n)}))}))}(t)}}function R(e,t){e=parseInt(e),raterJs({starSize:e,step:.1,showToolTip:!1,readOnly:!0,element:document.getElementById(t)})}function D(e,t,n,r,a,l,o,i,u,s,c){t=parseFloat(t),r=F(r),raterJs({starSize:e,rating:t,step:1,showToolTip:!1,readOnly:r,element:document.getElementById(a),rateCallback:function(e,t){document.getElementById(c).innerHTML=yasrCommonData.loaderHtml;var r={action:"yasr_send_visitor_rating",rating:e,post_id:n,nonce_visitor:o,is_singular:i};this.setRating(e),this.disable(),jQuery.post(yasrCommonData.ajaxurl,r,(function(e){e=JSON.parse(e),null!==u&&(u.innerHTML=e.number_of_votes),null!==s&&(s.innerHTML=e.average_rating),document.getElementById(c).innerHTML=e.rating_saved_text})),t()}})}function F(e){return null!=e&&""!==e||(e=!0),"true"!==e&&"1"!==e||(e=!0),"false"!==e&&"0"!==e||(e=!1),e}!function(){var e=document.getElementsByClassName("yasr-stars-rankings");if(e.length>0)for(var t=0;t<e.length;t++){var n=e.item(t).id,r=e.item(t).dataset.rankingSource,a=JSON.parse(e.item(t).dataset.rankingParams),o=document.getElementById(n),u=!1;"overall_rating"!==r&&"visitor_votes"!==r||(u=r),i.a.render(l.a.createElement(L,{source:u,tableId:n,params:a}),o)}}()}]);
|
includes/shortcodes/classes/YasrNoStarsRankings.php
CHANGED
@@ -30,131 +30,120 @@ class YasrNoStarsRankings extends YasrShortcode {
|
|
30 |
* @return string
|
31 |
*/
|
32 |
public function returnTopReviewers($atts) {
|
33 |
-
global $wpdb;
|
34 |
|
35 |
-
$
|
36 |
-
"SELECT COUNT(pm.post_id) AS total_count,
|
37 |
-
p.post_author AS reviewer
|
38 |
-
FROM $wpdb->posts AS p,
|
39 |
-
$wpdb->postmeta AS pm
|
40 |
-
WHERE pm.post_id = p.ID
|
41 |
-
AND pm.meta_key = 'yasr_overall_rating'
|
42 |
-
AND p.post_status = 'publish'
|
43 |
-
GROUP BY reviewer
|
44 |
-
ORDER BY (total_count) DESC
|
45 |
-
LIMIT 5");
|
46 |
|
|
|
|
|
47 |
|
48 |
if ($query_result) {
|
49 |
-
$this->shortcode_html =
|
50 |
-
|
51 |
-
$this->shortcode_html .= '
|
52 |
-
|
53 |
-
|
54 |
-
<th>'. __('Reviews', 'yet-another-stars-rating') .'</th>
|
55 |
-
</tr>';
|
56 |
-
|
57 |
-
$i = 0;
|
58 |
-
foreach ($query_result as $result) {
|
59 |
-
$user_data = get_userdata($result->reviewer);
|
60 |
-
|
61 |
-
if ($user_data) {
|
62 |
-
$user_profile = get_author_posts_url($result->reviewer);
|
63 |
-
} else {
|
64 |
-
$user_profile = '#';
|
65 |
-
$user_data = new stdClass;
|
66 |
-
$user_data->user_login = 'Anonymous';
|
67 |
-
}
|
68 |
-
|
69 |
-
if ($i % 2 === 0) {
|
70 |
-
$tr_class = 'yasr-rankings-td-white';
|
71 |
-
} else {
|
72 |
-
$tr_class = 'yasr-rankings-td-colored';
|
73 |
-
}
|
74 |
|
75 |
-
|
76 |
-
<td><a href='$user_profile'>$user_data->user_login</a></td>
|
77 |
-
<td>$result->total_count</td>
|
78 |
-
</tr>";
|
79 |
|
80 |
-
|
81 |
|
82 |
-
|
83 |
|
84 |
-
|
|
|
|
|
|
|
|
|
|
|
85 |
|
86 |
-
|
87 |
|
88 |
-
|
|
|
89 |
|
|
|
|
|
|
|
|
|
|
|
90 |
}
|
91 |
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
);
|
96 |
|
97 |
}
|
98 |
|
99 |
/**
|
|
|
|
|
100 |
* @return string
|
101 |
*/
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
AND p.post_status = 'publish'
|
111 |
-
GROUP BY user_id
|
112 |
-
ORDER BY ( total_count ) DESC
|
113 |
-
LIMIT 10");
|
114 |
-
|
115 |
-
if ($query_result) {
|
116 |
-
$shortcode_html = '<!-- Yasr Top 10 Active Users Shortcode-->';
|
117 |
|
118 |
-
|
|
|
119 |
<tr class="yasr-rankings-td-colored">
|
120 |
-
|
121 |
-
|
122 |
-
</tr>
|
|
|
|
|
123 |
|
124 |
-
|
125 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
126 |
$user_data = get_userdata($result->user);
|
127 |
-
|
128 |
if ($user_data) {
|
129 |
-
$
|
130 |
-
|
131 |
-
$user_profile = '#';
|
132 |
-
$user_data = new stdClass;
|
133 |
-
$user_data->user_login = __('Anonymous', 'yet-another-stars-rating');
|
134 |
}
|
135 |
-
|
136 |
-
|
137 |
-
$
|
138 |
-
} else {
|
139 |
-
$tr_class = 'yasr-rankings-td-colored';
|
140 |
}
|
|
|
141 |
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
$i++;
|
148 |
-
|
149 |
}
|
150 |
|
151 |
-
$shortcode_html .= '
|
152 |
-
|
|
|
|
|
|
|
|
|
153 |
|
154 |
-
return $shortcode_html;
|
155 |
}
|
156 |
|
157 |
-
|
158 |
-
|
|
|
159 |
}
|
160 |
}
|
30 |
* @return string
|
31 |
*/
|
32 |
public function returnTopReviewers($atts) {
|
|
|
33 |
|
34 |
+
$this->shortcode_html = '<!-- Yasr '.$this->shorcode_name.' Shortcode-->';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
|
36 |
+
$sql_atts = apply_filters('yasr_tr_rankings_atts', false, $atts);
|
37 |
+
$query_result = YasrRankingData::rankingTopReviewers($sql_atts);
|
38 |
|
39 |
if ($query_result) {
|
40 |
+
$this->shortcode_html = $this->returnTableContent($query_result, $sql_atts);
|
41 |
+
} else {
|
42 |
+
$this->shortcode_html .= __('Problem while retrieving the top 5 most active reviewers. Did you publish any review?',
|
43 |
+
'yet-another-stars-rating');
|
44 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
45 |
|
46 |
+
$this->shortcode_html .= '<!-- Yasr '.$this->shorcode_name.' Shortcode-->';
|
|
|
|
|
|
|
47 |
|
48 |
+
return $this->shortcode_html;
|
49 |
|
50 |
+
}
|
51 |
|
52 |
+
/**
|
53 |
+
* @param $atts
|
54 |
+
*
|
55 |
+
* @return string
|
56 |
+
*/
|
57 |
+
public function returnTopUsers($atts) {
|
58 |
|
59 |
+
$this->shortcode_html = '<!-- Yasr '.$this->shorcode_name.' Shortcode-->';
|
60 |
|
61 |
+
$sql_atts = apply_filters('yasr_tu_rankings_atts', false, $atts);
|
62 |
+
$query_result = YasrRankingData::rankingTopUsers($sql_atts);
|
63 |
|
64 |
+
if ($query_result) {
|
65 |
+
$this->shortcode_html = $this->returnTableContent($query_result, $sql_atts);
|
66 |
+
} else {
|
67 |
+
$this->shortcode_html = __('Problem while retrieving the top 10 active users chart. Are you sure you have votes to show?',
|
68 |
+
'yet-another-stars-rating');
|
69 |
}
|
70 |
|
71 |
+
$this->shortcode_html .= '<!-- Yasr '.$this->shorcode_name.' Shortcode-->';
|
72 |
+
|
73 |
+
return $this->shortcode_html;
|
|
|
74 |
|
75 |
}
|
76 |
|
77 |
/**
|
78 |
+
* @author Dario Curvino <@dudo>
|
79 |
+
* @since 2.6.2
|
80 |
* @return string
|
81 |
*/
|
82 |
+
private function returnTableHeader() {
|
83 |
+
if($this->shorcode_name === 'yasr_most_active_users' || 'yasr_top_ten_active_users') {
|
84 |
+
$first_header = 'User';
|
85 |
+
$second_header = 'Number of votes';
|
86 |
+
} else {
|
87 |
+
$first_header = 'Author';
|
88 |
+
$second_header = 'Reviews';
|
89 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
90 |
|
91 |
+
return '<table class="yasr-rankings">
|
92 |
+
<thead>
|
93 |
<tr class="yasr-rankings-td-colored">
|
94 |
+
<th>' . sprintf(__('%s', 'yet-another-stars-rating'),$first_header) . '</th>
|
95 |
+
<th>' . sprintf(__('%s', 'yet-another-stars-rating'),$second_header) . '</th>
|
96 |
+
</tr>
|
97 |
+
</thead>';
|
98 |
+
}
|
99 |
|
100 |
+
/**
|
101 |
+
* @author Dario Curvino <@dudo>
|
102 |
+
* @since 2.6.3
|
103 |
+
* @param object $query_result //the query ruslt to loop
|
104 |
+
*
|
105 |
+
* @return string
|
106 |
+
*/
|
107 |
+
private function returnTableContent($query_result, $sql_atts){
|
108 |
+
$shortcode_html = $this->returnTableHeader();
|
109 |
+
$i = 0;
|
110 |
+
|
111 |
+
foreach ($query_result as $result) {
|
112 |
+
$user_id = (int)$result->user;
|
113 |
+
|
114 |
+
//If user is 0 means is anonumous
|
115 |
+
if($user_id === 0) {
|
116 |
+
$user_link = '#';
|
117 |
+
$username = __('Anonymous', 'yet-another-stars-rating');
|
118 |
+
} else {
|
119 |
$user_data = get_userdata($result->user);
|
|
|
120 |
if ($user_data) {
|
121 |
+
$user_link = get_author_posts_url($result->user);
|
122 |
+
$username = apply_filters('yasr_tu_rankings_display', $user_data->user_login, $user_data);
|
|
|
|
|
|
|
123 |
}
|
124 |
+
//If user_id is not 0, but user_data is false, means that account doesn't exists anymore
|
125 |
+
else {
|
126 |
+
$username = __('Account deleted', 'yet-another-stars-rating');
|
|
|
|
|
127 |
}
|
128 |
+
}
|
129 |
|
130 |
+
if ($i % 2 === 0) {
|
131 |
+
$tr_class = 'yasr-rankings-td-white';
|
132 |
+
} else {
|
133 |
+
$tr_class = 'yasr-rankings-td-colored';
|
|
|
|
|
|
|
134 |
}
|
135 |
|
136 |
+
$shortcode_html .= "<tr class='$tr_class'>
|
137 |
+
<td><a href='$user_link'>$username</a></td>
|
138 |
+
<td>$result->total_count</td>
|
139 |
+
</tr>";
|
140 |
+
|
141 |
+
$i++;
|
142 |
|
|
|
143 |
}
|
144 |
|
145 |
+
$shortcode_html .= '</table>';
|
146 |
+
|
147 |
+
return $shortcode_html;
|
148 |
}
|
149 |
}
|
includes/shortcodes/classes/YasrRankings.php
CHANGED
@@ -40,15 +40,15 @@ class YasrRankings extends YasrShortcode {
|
|
40 |
public function returnHighestRatedOverall ($atts) {
|
41 |
$this->shortcode_html = '<!-- Yasr Highest Rated Shortcode-->';
|
42 |
|
43 |
-
//hook in this filter to get
|
44 |
-
//false is the default value to assign to
|
45 |
-
$
|
46 |
-
$this->query_highest_rated_overall = YasrRankingData::rankingOverallGetResults($
|
47 |
|
48 |
-
//hook in this filter to making $
|
49 |
-
$
|
50 |
|
51 |
-
$this->returnTableOverall($
|
52 |
$this->shortcode_html .= '<!--End Yasr Top 10 highest Rated Shortcode-->';
|
53 |
|
54 |
return $this->shortcode_html;
|
@@ -64,31 +64,27 @@ class YasrRankings extends YasrShortcode {
|
|
64 |
* @param $sql_params array|string - params that can be used in REST API
|
65 |
*
|
66 |
*/
|
67 |
-
protected function returnTableOverall($sql_params=
|
68 |
if ($this->query_highest_rated_overall) {
|
69 |
-
$table_attributes = $this->sanitizeParams($sql_params);
|
70 |
|
71 |
$table_id = 'yasr_overall_ranking_'.str_shuffle(uniqid());
|
|
|
72 |
|
73 |
-
$
|
74 |
|
75 |
-
$
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
'params' => $table_attributes['sql_params'],
|
84 |
-
'text_position' => $table_attributes['text_position'],
|
85 |
-
'custom_text' => $table_attributes['custom_text']
|
86 |
-
));
|
87 |
|
88 |
$this->shortcode_html .= "</table>";
|
89 |
}
|
90 |
else {
|
91 |
-
|
92 |
}
|
93 |
|
94 |
}
|
@@ -119,9 +115,9 @@ class YasrRankings extends YasrShortcode {
|
|
119 |
$this->query_result_highest_rated_visitor = YasrRankingData::rankingVVGetResults($sql_atts, 'highest', $required_votes_highest);
|
120 |
|
121 |
//hook in this filter to making $sql_atts ready for wp_localize_script
|
122 |
-
$
|
123 |
|
124 |
-
$this->returnTableVV($
|
125 |
$this->shortcode_html .= '<!--End Yasr TMost Or Highest Rated Shortcode -->';
|
126 |
|
127 |
return $this->shortcode_html;
|
@@ -136,31 +132,25 @@ class YasrRankings extends YasrShortcode {
|
|
136 |
public function returnTableVV($sql_params=null) {
|
137 |
if($this->query_result_most_rated_visitor && $this->query_result_highest_rated_visitor) {
|
138 |
|
139 |
-
$table_attributes =
|
140 |
|
141 |
-
$
|
142 |
-
$
|
143 |
|
144 |
$table_id = 'yasr_vv_ranking_' . str_shuffle(uniqid());
|
145 |
|
146 |
-
$this->shortcode_html .= "<table
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
'source' => 'visitor_votes',
|
155 |
-
'size' => $this->starSize(),
|
156 |
-
'params' => $table_attributes['sql_params'],
|
157 |
-
'view' => $table_attributes['view'],
|
158 |
-
'required_votes' => $table_attributes['required_votes']
|
159 |
-
)
|
160 |
-
);
|
161 |
$this->shortcode_html .= '</table>';
|
|
|
162 |
} else {
|
163 |
-
|
164 |
}
|
165 |
|
166 |
}
|
@@ -196,32 +186,4 @@ class YasrRankings extends YasrShortcode {
|
|
196 |
return $data_array;
|
197 |
}
|
198 |
|
199 |
-
|
200 |
-
/**
|
201 |
-
* @author Dario Curvino <@dudo>
|
202 |
-
* @since 2.5.7
|
203 |
-
* @param $sql_params array|string - params that can be used in REST API
|
204 |
-
*
|
205 |
-
* @return array
|
206 |
-
*/
|
207 |
-
private function sanitizeParams($sql_params=null) {
|
208 |
-
|
209 |
-
$array_to_return['sql_params'] = false;
|
210 |
-
$array_to_return['custom_text'] = __('Rating:', 'yet-another-stars-rating');
|
211 |
-
$array_to_return['text_position'] = 'after';
|
212 |
-
$array_to_return['view'] = 'most';
|
213 |
-
$array_to_return['required_votes'] = false;
|
214 |
-
|
215 |
-
if(is_array($sql_params)) {
|
216 |
-
$array_to_return['sql_params'] = $sql_params['sql_params'];
|
217 |
-
$array_to_return['custom_text'] = $sql_params['custom_text'];
|
218 |
-
$array_to_return['text_position'] = $sql_params['text_position'];
|
219 |
-
$array_to_return['view'] = $sql_params['view'];
|
220 |
-
$array_to_return['required_votes'] = $sql_params['required_votes'];
|
221 |
-
}
|
222 |
-
|
223 |
-
return $array_to_return;
|
224 |
-
|
225 |
-
}
|
226 |
-
|
227 |
}
|
40 |
public function returnHighestRatedOverall ($atts) {
|
41 |
$this->shortcode_html = '<!-- Yasr Highest Rated Shortcode-->';
|
42 |
|
43 |
+
//hook in this filter to get cleaned_atts to use in yasr_ov_ranking
|
44 |
+
//false is the default value to assign to cleaned_atts
|
45 |
+
$cleaned_atts = apply_filters('yasr_ov_rankings_atts', false, $atts);
|
46 |
+
$this->query_highest_rated_overall = YasrRankingData::rankingOverallGetResults($cleaned_atts);
|
47 |
|
48 |
+
//hook in this filter to making $cleaned_atts ready to be printed in shortcode
|
49 |
+
$cleaned_params = apply_filters('yasr_ov_rankings_cleaned_atts', $cleaned_atts);
|
50 |
|
51 |
+
$this->returnTableOverall($cleaned_params);
|
52 |
$this->shortcode_html .= '<!--End Yasr Top 10 highest Rated Shortcode-->';
|
53 |
|
54 |
return $this->shortcode_html;
|
64 |
* @param $sql_params array|string - params that can be used in REST API
|
65 |
*
|
66 |
*/
|
67 |
+
protected function returnTableOverall($sql_params=false) {
|
68 |
if ($this->query_highest_rated_overall) {
|
|
|
69 |
|
70 |
$table_id = 'yasr_overall_ranking_'.str_shuffle(uniqid());
|
71 |
+
$array_with_title['data_overall'] = self::rankingData($this->query_highest_rated_overall);
|
72 |
|
73 |
+
$table_attributes = json_encode($sql_params);
|
74 |
|
75 |
+
$this->shortcode_html .= "<table
|
76 |
+
class='yasr-rankings yasr-stars-rankings'
|
77 |
+
id=$table_id
|
78 |
+
data-ranking-data='".json_encode($array_with_title)."'
|
79 |
+
data-ranking-source='overall_rating'
|
80 |
+
data-ranking-params='$table_attributes'
|
81 |
+
data-ranking-size='".$this->starSize()."'
|
82 |
+
>";
|
|
|
|
|
|
|
|
|
83 |
|
84 |
$this->shortcode_html .= "</table>";
|
85 |
}
|
86 |
else {
|
87 |
+
$this->shortcode_html .= __("No data found", 'yet-another-stars-rating');
|
88 |
}
|
89 |
|
90 |
}
|
115 |
$this->query_result_highest_rated_visitor = YasrRankingData::rankingVVGetResults($sql_atts, 'highest', $required_votes_highest);
|
116 |
|
117 |
//hook in this filter to making $sql_atts ready for wp_localize_script
|
118 |
+
$cleaned_params = apply_filters('yasr_vv_rankings_cleaned_atts', $sql_atts);
|
119 |
|
120 |
+
$this->returnTableVV($cleaned_params);
|
121 |
$this->shortcode_html .= '<!--End Yasr TMost Or Highest Rated Shortcode -->';
|
122 |
|
123 |
return $this->shortcode_html;
|
132 |
public function returnTableVV($sql_params=null) {
|
133 |
if($this->query_result_most_rated_visitor && $this->query_result_highest_rated_visitor) {
|
134 |
|
135 |
+
$table_attributes = json_encode($sql_params);
|
136 |
|
137 |
+
$array_with_title['most'] = self::rankingData($this->query_result_most_rated_visitor);
|
138 |
+
$array_with_title['highest'] = self::rankingData($this->query_result_highest_rated_visitor);
|
139 |
|
140 |
$table_id = 'yasr_vv_ranking_' . str_shuffle(uniqid());
|
141 |
|
142 |
+
$this->shortcode_html .= "<table
|
143 |
+
class='yasr-rankings yasr-stars-rankings'
|
144 |
+
id=$table_id
|
145 |
+
data-ranking-data='".json_encode($array_with_title)."'
|
146 |
+
data-ranking-source='visitor_votes'
|
147 |
+
data-ranking-params='$table_attributes'
|
148 |
+
data-ranking-size='".$this->starSize()."'
|
149 |
+
>";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
150 |
$this->shortcode_html .= '</table>';
|
151 |
+
|
152 |
} else {
|
153 |
+
$this->shortcode_html .= __("No data found", 'yet-another-stars-rating');
|
154 |
}
|
155 |
|
156 |
}
|
186 |
return $data_array;
|
187 |
}
|
188 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
189 |
}
|
includes/shortcodes/classes/YasrVisitorVotes.php
CHANGED
@@ -411,10 +411,10 @@ class YasrVisitorVotes extends YasrShortcode {
|
|
411 |
* @return string
|
412 |
*/
|
413 |
protected function returnYasrVisitorVotes ($cookie_value, $post_id) {
|
414 |
-
$
|
415 |
class='yasr-vv-container-loader'>";
|
416 |
|
417 |
-
$this->shortcode_html .= $
|
418 |
|
419 |
if(YASR_ENABLE_AJAX === 'yes') {
|
420 |
$id_name = 'yasr-below-stars-hidden-' . $this->unique_id;
|
411 |
* @return string
|
412 |
*/
|
413 |
protected function returnYasrVisitorVotes ($cookie_value, $post_id) {
|
414 |
+
$div_container_loader = "<div id='yasr-vv-loader-$this->unique_id'
|
415 |
class='yasr-vv-container-loader'>";
|
416 |
|
417 |
+
$this->shortcode_html .= $div_container_loader;
|
418 |
|
419 |
if(YASR_ENABLE_AJAX === 'yes') {
|
420 |
$id_name = 'yasr-below-stars-hidden-' . $this->unique_id;
|
includes/shortcodes/yasr-shortcode-functions.php
CHANGED
@@ -54,16 +54,16 @@ add_shortcode('yasr_overall_rating', 'shortcode_overall_rating_callback');
|
|
54 |
|
55 |
/**
|
56 |
* @param $atts
|
|
|
|
|
57 |
*
|
58 |
* @return string|void|null
|
59 |
*/
|
60 |
-
function shortcode_overall_rating_callback ($atts) {
|
61 |
if (YASR_SHOW_OVERALL_IN_LOOP === 'disabled' && !is_singular() && is_main_query()) {
|
62 |
return;
|
63 |
}
|
64 |
-
|
65 |
-
$shortcode_name = 'yasr_overall_rating';
|
66 |
-
$overall_rating = new YasrOverallRating($atts, $shortcode_name);
|
67 |
|
68 |
return $overall_rating->returnShortcode();
|
69 |
} //end function
|
@@ -74,17 +74,18 @@ function shortcode_overall_rating_callback ($atts) {
|
|
74 |
add_shortcode('yasr_visitor_votes', 'shortcode_visitor_votes_callback');
|
75 |
|
76 |
/**
|
77 |
-
* @param
|
|
|
|
|
78 |
*
|
79 |
* @return string|void|null
|
80 |
*/
|
81 |
-
function shortcode_visitor_votes_callback($atts) {
|
82 |
if (YASR_SHOW_VISITOR_VOTES_IN_LOOP === 'disabled' && !is_singular() && is_main_query()) {
|
83 |
return;
|
84 |
}
|
85 |
|
86 |
-
$
|
87 |
-
$visitor_votes = new YasrVisitorVotes($atts, $shortcode_name);
|
88 |
|
89 |
return $visitor_votes->returnShortcode();
|
90 |
|
@@ -95,13 +96,14 @@ function shortcode_visitor_votes_callback($atts) {
|
|
95 |
add_shortcode ('yasr_multiset', 'yasr_multiset_callback');
|
96 |
|
97 |
/**
|
98 |
-
* @param
|
|
|
|
|
99 |
*
|
100 |
* @return string|void|null
|
101 |
*/
|
102 |
-
function yasr_multiset_callback($atts) {
|
103 |
-
$
|
104 |
-
$multiset = new YasrMultiSet($atts, $shortcode_name);
|
105 |
|
106 |
return $multiset->printMultiset();
|
107 |
}
|
@@ -111,12 +113,14 @@ function yasr_multiset_callback($atts) {
|
|
111 |
add_shortcode ('yasr_visitor_multiset', 'yasr_visitor_multiset_callback');
|
112 |
|
113 |
/**
|
114 |
-
* @param
|
|
|
|
|
115 |
*
|
116 |
* @return string|void|null
|
117 |
*/
|
118 |
-
function yasr_visitor_multiset_callback($atts) {
|
119 |
-
$multiset = new YasrVisitorMultiSet($atts,
|
120 |
return $multiset->printVisitorMultiSet();
|
121 |
}
|
122 |
|
@@ -167,46 +171,43 @@ function yasr_most_or_highest_rated_posts_callback($atts, $content, $shortcode_t
|
|
167 |
* @deprecated deprecated since version 2.6.2
|
168 |
* @todo remove DEC 2023
|
169 |
*/
|
170 |
-
add_shortcode ('yasr_top_5_reviewers', '
|
171 |
|
172 |
/*
|
173 |
* Shortcode to display most active reviewers
|
174 |
* @since 2.6.2
|
175 |
*/
|
176 |
-
add_shortcode ('yasr_top_reviewers', '
|
177 |
-
|
178 |
-
/**
|
179 |
-
* @author Dario Curvino <@dudo>
|
180 |
-
*
|
181 |
-
* @param $atts
|
182 |
-
* @param $content
|
183 |
-
* @param $shortcode_tag
|
184 |
-
*
|
185 |
-
* @return string
|
186 |
-
*/
|
187 |
-
function yasr_top_reviewers_callback ($atts, $content, $shortcode_tag) {
|
188 |
-
$top_5_reviewers_obj = new YasrNoStarsRankings(false, $shortcode_tag);
|
189 |
-
|
190 |
-
return $top_5_reviewers_obj->returnTopReviewers($atts);
|
191 |
-
} //End top 5 reviewers function
|
192 |
-
|
193 |
|
194 |
/*
|
195 |
* @deprecated deprecated since version 2.6.2
|
196 |
* @todo remove DEC 2023
|
197 |
*/
|
198 |
-
add_shortcode ('yasr_top_ten_active_users', '
|
199 |
|
200 |
/*
|
201 |
* Shortcode to display most active reviewers
|
202 |
* @since 2.6.2
|
203 |
*/
|
204 |
-
add_shortcode ('yasr_most_active_users', '
|
205 |
|
206 |
-
|
207 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
208 |
|
209 |
-
return $most_active_users_obj->returnTopUsers($atts);
|
210 |
-
} //End function
|
211 |
|
|
|
|
|
|
|
|
|
|
|
|
|
212 |
|
54 |
|
55 |
/**
|
56 |
* @param $atts
|
57 |
+
* @param $content
|
58 |
+
* @param $shortcode_tag
|
59 |
*
|
60 |
* @return string|void|null
|
61 |
*/
|
62 |
+
function shortcode_overall_rating_callback ($atts, $content=false, $shortcode_tag=false) {
|
63 |
if (YASR_SHOW_OVERALL_IN_LOOP === 'disabled' && !is_singular() && is_main_query()) {
|
64 |
return;
|
65 |
}
|
66 |
+
$overall_rating = new YasrOverallRating($atts, $shortcode_tag);
|
|
|
|
|
67 |
|
68 |
return $overall_rating->returnShortcode();
|
69 |
} //end function
|
74 |
add_shortcode('yasr_visitor_votes', 'shortcode_visitor_votes_callback');
|
75 |
|
76 |
/**
|
77 |
+
* @param $atts
|
78 |
+
* @param bool $content
|
79 |
+
* @param bool $shortcode_tag
|
80 |
*
|
81 |
* @return string|void|null
|
82 |
*/
|
83 |
+
function shortcode_visitor_votes_callback($atts, $content=false, $shortcode_tag=false) {
|
84 |
if (YASR_SHOW_VISITOR_VOTES_IN_LOOP === 'disabled' && !is_singular() && is_main_query()) {
|
85 |
return;
|
86 |
}
|
87 |
|
88 |
+
$visitor_votes = new YasrVisitorVotes($atts, $shortcode_tag);
|
|
|
89 |
|
90 |
return $visitor_votes->returnShortcode();
|
91 |
|
96 |
add_shortcode ('yasr_multiset', 'yasr_multiset_callback');
|
97 |
|
98 |
/**
|
99 |
+
* @param $atts
|
100 |
+
* @param bool $content
|
101 |
+
* @param bool $shortcode_tag
|
102 |
*
|
103 |
* @return string|void|null
|
104 |
*/
|
105 |
+
function yasr_multiset_callback($atts, $content=false, $shortcode_tag=false) {
|
106 |
+
$multiset = new YasrMultiSet($atts, $shortcode_tag);
|
|
|
107 |
|
108 |
return $multiset->printMultiset();
|
109 |
}
|
113 |
add_shortcode ('yasr_visitor_multiset', 'yasr_visitor_multiset_callback');
|
114 |
|
115 |
/**
|
116 |
+
* @param $atts
|
117 |
+
* @param bool $content
|
118 |
+
* @param bool $shortcode_tag
|
119 |
*
|
120 |
* @return string|void|null
|
121 |
*/
|
122 |
+
function yasr_visitor_multiset_callback($atts, $content=false, $shortcode_tag=false) {
|
123 |
+
$multiset = new YasrVisitorMultiSet($atts, $shortcode_tag);
|
124 |
return $multiset->printVisitorMultiSet();
|
125 |
}
|
126 |
|
171 |
* @deprecated deprecated since version 2.6.2
|
172 |
* @todo remove DEC 2023
|
173 |
*/
|
174 |
+
add_shortcode ('yasr_top_5_reviewers', 'yasr_ranking_users_callback');
|
175 |
|
176 |
/*
|
177 |
* Shortcode to display most active reviewers
|
178 |
* @since 2.6.2
|
179 |
*/
|
180 |
+
add_shortcode ('yasr_top_reviewers', 'yasr_ranking_users_callback');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
181 |
|
182 |
/*
|
183 |
* @deprecated deprecated since version 2.6.2
|
184 |
* @todo remove DEC 2023
|
185 |
*/
|
186 |
+
add_shortcode ('yasr_top_ten_active_users', 'yasr_ranking_users_callback');
|
187 |
|
188 |
/*
|
189 |
* Shortcode to display most active reviewers
|
190 |
* @since 2.6.2
|
191 |
*/
|
192 |
+
add_shortcode ('yasr_most_active_users', 'yasr_ranking_users_callback');
|
193 |
|
194 |
+
/**
|
195 |
+
* @author Dario Curvino <@dudo>
|
196 |
+
*
|
197 |
+
* @param $atts
|
198 |
+
* @param $content
|
199 |
+
* @param $shortcode_tag
|
200 |
+
*
|
201 |
+
* @return string
|
202 |
+
*/
|
203 |
+
function yasr_ranking_users_callback ($atts, $content, $shortcode_tag) {
|
204 |
+
$ranking_users_obj = new YasrNoStarsRankings(false, $shortcode_tag);
|
205 |
|
|
|
|
|
206 |
|
207 |
+
if($shortcode_tag === 'yasr_top_reviewers' || $shortcode_tag === 'yasr_top_5_reviewers') {
|
208 |
+
return $ranking_users_obj->returnTopReviewers($atts);
|
209 |
+
}
|
210 |
+
|
211 |
+
return $ranking_users_obj->returnTopUsers($atts);
|
212 |
+
} //End users rankings
|
213 |
|
includes/yasr-includes-functions.php
CHANGED
@@ -23,8 +23,8 @@ if (!defined('ABSPATH')) {
|
|
23 |
} // Exit if accessed directly
|
24 |
|
25 |
/***** Adding javascript and css needed on both admin and public *****/
|
26 |
-
add_action('wp_enqueue_scripts', 'yasr_add_scripts_includes');
|
27 |
-
add_action('admin_enqueue_scripts', 'yasr_add_scripts_includes');
|
28 |
|
29 |
function yasr_add_scripts_includes() {
|
30 |
$rater_file_to_include = 'rater-js.js';
|
@@ -52,6 +52,43 @@ function yasr_add_scripts_includes() {
|
|
52 |
true
|
53 |
);
|
54 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
55 |
}
|
56 |
|
57 |
/*** Css rules for stars set, from version 1.2.7
|
23 |
} // Exit if accessed directly
|
24 |
|
25 |
/***** Adding javascript and css needed on both admin and public *****/
|
26 |
+
add_action('wp_enqueue_scripts', 'yasr_add_scripts_includes', 11);
|
27 |
+
add_action('admin_enqueue_scripts', 'yasr_add_scripts_includes', 11);
|
28 |
|
29 |
function yasr_add_scripts_includes() {
|
30 |
$rater_file_to_include = 'rater-js.js';
|
52 |
true
|
53 |
);
|
54 |
|
55 |
+
$yasr_visitor_votes_loader = '<div id="loader-visitor-rating" style="display: inline"> '.
|
56 |
+
' <img src=' . YASR_IMG_DIR . 'loader.gif title="yasr-loader" alt="yasr-loader">
|
57 |
+
</div>';
|
58 |
+
|
59 |
+
if(is_admin()) {
|
60 |
+
define ('YASR_HANDLE_SCRIPT', 'yasradmin');
|
61 |
+
} else {
|
62 |
+
define ('YASR_HANDLE_SCRIPT', 'yasrfront');
|
63 |
+
}
|
64 |
+
|
65 |
+
wp_localize_script(YASR_HANDLE_SCRIPT, 'yasrCommonData',
|
66 |
+
array(
|
67 |
+
'restEndpoint' => esc_url_raw(rest_url()),
|
68 |
+
'ajaxurl' => admin_url('admin-ajax.php'),
|
69 |
+
'visitorStatsEnabled' => YASR_VISITORS_STATS,
|
70 |
+
'ajaxEnabled' => YASR_ENABLE_AJAX,
|
71 |
+
'loaderHtml' => $yasr_visitor_votes_loader,
|
72 |
+
'nonce' => wp_create_nonce('wp_rest')
|
73 |
+
)
|
74 |
+
);
|
75 |
+
|
76 |
+
$yasr_multiset_theme_handle = 'yasrcsslightscheme';
|
77 |
+
$yasr_multiset_theme = 'yasr-table-light.css';
|
78 |
+
|
79 |
+
//default css is the light one
|
80 |
+
if (YASR_SCHEME_COLOR === 'dark') {
|
81 |
+
$yasr_multiset_theme_handle = 'yasrcssdarkscheme';
|
82 |
+
$yasr_multiset_theme = 'yasr-table-dark.css';
|
83 |
+
}
|
84 |
+
|
85 |
+
wp_enqueue_style(
|
86 |
+
$yasr_multiset_theme_handle,
|
87 |
+
YASR_CSS_DIR_INCLUDES . $yasr_multiset_theme,
|
88 |
+
array('yasrcss'),
|
89 |
+
YASR_VERSION_NUM, 'all'
|
90 |
+
);
|
91 |
+
|
92 |
}
|
93 |
|
94 |
/*** Css rules for stars set, from version 1.2.7
|
public/classes/YasrPublicFilters.php
CHANGED
@@ -166,7 +166,7 @@ class YasrPublicFilters {
|
|
166 |
|
167 |
$post_id = get_the_ID();
|
168 |
$overall_rating = YasrDatabaseRatings::getOverallRating();
|
169 |
-
$visitor_votes = YasrDatabaseRatings::getVisitorVotes(
|
170 |
|
171 |
if (!$overall_rating && !$visitor_votes['number_of_votes'] && !$visitor_votes['sum_votes']) {
|
172 |
return $content;
|
166 |
|
167 |
$post_id = get_the_ID();
|
168 |
$overall_rating = YasrDatabaseRatings::getOverallRating();
|
169 |
+
$visitor_votes = YasrDatabaseRatings::getVisitorVotes();
|
170 |
|
171 |
if (!$overall_rating && !$visitor_votes['number_of_votes'] && !$visitor_votes['sum_votes']) {
|
172 |
return $content;
|
public/yasr-public-actions.php
CHANGED
@@ -38,22 +38,6 @@ function yasr_add_scripts() {
|
|
38 |
//Run after default css are loaded
|
39 |
do_action('yasr_add_front_script_css');
|
40 |
|
41 |
-
$yasr_multiset_theme_handle = 'yasrcsslightscheme';
|
42 |
-
$yasr_multiset_theme = 'yasr-table-light.css';
|
43 |
-
|
44 |
-
//default css is the light one
|
45 |
-
if (YASR_SCHEME_COLOR === 'dark') {
|
46 |
-
$yasr_multiset_theme_handle = 'yasrcssdarkscheme';
|
47 |
-
$yasr_multiset_theme = 'yasr-table-dark.css';
|
48 |
-
}
|
49 |
-
|
50 |
-
wp_enqueue_style(
|
51 |
-
$yasr_multiset_theme_handle,
|
52 |
-
YASR_CSS_DIR_INCLUDES . $yasr_multiset_theme,
|
53 |
-
array('yasrcss'),
|
54 |
-
YASR_VERSION_NUM, 'all'
|
55 |
-
);
|
56 |
-
|
57 |
if (YASR_CUSTOM_CSS_RULES) {
|
58 |
wp_add_inline_style(
|
59 |
'yasrcss',
|
@@ -64,27 +48,13 @@ function yasr_add_scripts() {
|
|
64 |
wp_enqueue_script(
|
65 |
'yasrfront',
|
66 |
YASR_JS_DIR_INCLUDES . 'yasr-front.js',
|
67 |
-
array('jquery', 'rater', 'wp-i18n'),
|
68 |
YASR_VERSION_NUM,
|
69 |
true
|
70 |
);
|
71 |
|
72 |
do_action('yasr_add_front_script_js');
|
73 |
|
74 |
-
$yasr_visitor_votes_loader = '<div id="loader-visitor-rating" style="display: inline"> '.
|
75 |
-
' <img src=' . YASR_IMG_DIR . 'loader.gif title="yasr-loader" alt="yasr-loader">
|
76 |
-
</div>';
|
77 |
-
|
78 |
-
wp_localize_script('yasrfront', 'yasrCommonData',
|
79 |
-
array(
|
80 |
-
'restEndpoint' => esc_url_raw(rest_url()),
|
81 |
-
'ajaxurl' => admin_url('admin-ajax.php'),
|
82 |
-
'visitorStatsEnabled' => YASR_VISITORS_STATS,
|
83 |
-
'ajaxEnabled' => YASR_ENABLE_AJAX,
|
84 |
-
'loaderHtml' => $yasr_visitor_votes_loader,
|
85 |
-
'nonce' => wp_create_nonce('wp_rest')
|
86 |
-
)
|
87 |
-
);
|
88 |
}
|
89 |
|
90 |
//Delete caches for supported plugins
|
38 |
//Run after default css are loaded
|
39 |
do_action('yasr_add_front_script_css');
|
40 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
41 |
if (YASR_CUSTOM_CSS_RULES) {
|
42 |
wp_add_inline_style(
|
43 |
'yasrcss',
|
48 |
wp_enqueue_script(
|
49 |
'yasrfront',
|
50 |
YASR_JS_DIR_INCLUDES . 'yasr-front.js',
|
51 |
+
array('jquery', 'rater', 'tippy', 'wp-i18n'),
|
52 |
YASR_VERSION_NUM,
|
53 |
true
|
54 |
);
|
55 |
|
56 |
do_action('yasr_add_front_script_js');
|
57 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
58 |
}
|
59 |
|
60 |
//Delete caches for supported plugins
|
public/yasr-public-filters.php
DELETED
@@ -1,334 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/*
|
3 |
-
|
4 |
-
Copyright 2014 Dario Curvino (email : d.curvino@tiscali.it)
|
5 |
-
|
6 |
-
This program is free software: you can redistribute it and/or modify
|
7 |
-
it under the terms of the GNU General Public License as published by
|
8 |
-
the Free Software Foundation, either version 2 of the License, or
|
9 |
-
(at your option) any later version.
|
10 |
-
|
11 |
-
This program is distributed in the hope that it will be useful,
|
12 |
-
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13 |
-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
14 |
-
GNU General Public License for more details.
|
15 |
-
|
16 |
-
You should have received a copy of the GNU General Public License
|
17 |
-
along with this program. If not, see <http://www.gnu.org/licenses/>
|
18 |
-
*/
|
19 |
-
|
20 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
21 |
-
exit( 'You\'re not allowed to see this page' );
|
22 |
-
} // Exit if accessed directly
|
23 |
-
|
24 |
-
/****** Auto insert overall rating and visitor rating ******/
|
25 |
-
add_filter('the_content', 'yasr_auto_insert_shortcode_callback');
|
26 |
-
/**
|
27 |
-
* @param $content
|
28 |
-
*
|
29 |
-
* @return bool|string|void
|
30 |
-
*/
|
31 |
-
function yasr_auto_insert_shortcode_callback($content) {
|
32 |
-
|
33 |
-
if (YASR_AUTO_INSERT_ENABLED !== 1) {
|
34 |
-
return $content;
|
35 |
-
}
|
36 |
-
|
37 |
-
$post_id = get_the_ID();
|
38 |
-
|
39 |
-
//check if for this post or page auto insert is off
|
40 |
-
$post_excluded = get_post_meta($post_id, 'yasr_auto_insert_disabled', true);
|
41 |
-
|
42 |
-
if ($post_excluded === 'yes') {
|
43 |
-
return $content;
|
44 |
-
}
|
45 |
-
|
46 |
-
$shortcode_align = YASR_AUTO_INSERT_ALIGN;
|
47 |
-
|
48 |
-
//if it is not left, or right, default is center
|
49 |
-
if ($shortcode_align !== 'left' && $shortcode_align !== 'right') {
|
50 |
-
$shortcode_align = 'center';
|
51 |
-
}
|
52 |
-
|
53 |
-
$container_div_overall='<div style="text-align:'.$shortcode_align.'" class="yasr-auto-insert-overall">';
|
54 |
-
$container_div_visitor='<div style="text-align:'.$shortcode_align.'" class="yasr-auto-insert-visitor">';
|
55 |
-
$closing_div = '</div>';
|
56 |
-
|
57 |
-
$auto_insert_shortcode = null; //To avoid undefined variable notice outside the loop (if (is_singular) )
|
58 |
-
$overall_rating_code = $container_div_overall. '[yasr_overall_rating size="' . YASR_AUTO_INSERT_SIZE . '"]' . $closing_div;
|
59 |
-
$visitor_votes_code = $container_div_visitor. '[yasr_visitor_votes size="' . YASR_AUTO_INSERT_SIZE . '"]' . $closing_div;
|
60 |
-
|
61 |
-
//avoid undefined
|
62 |
-
$content_and_stars = false;
|
63 |
-
|
64 |
-
if (YASR_AUTO_INSERT_WHAT === 'overall_rating') {
|
65 |
-
switch (YASR_AUTO_INSERT_WHERE) {
|
66 |
-
case 'top':
|
67 |
-
$content_and_stars = $overall_rating_code . $content;
|
68 |
-
break;
|
69 |
-
|
70 |
-
case 'bottom':
|
71 |
-
$content_and_stars = $content . $overall_rating_code;
|
72 |
-
break;
|
73 |
-
} //End Switch
|
74 |
-
} elseif (YASR_AUTO_INSERT_WHAT === 'visitor_rating') {
|
75 |
-
switch (YASR_AUTO_INSERT_WHERE) {
|
76 |
-
case 'top':
|
77 |
-
$content_and_stars = $visitor_votes_code . $content;
|
78 |
-
break;
|
79 |
-
|
80 |
-
case 'bottom':
|
81 |
-
$content_and_stars = $content . $visitor_votes_code;
|
82 |
-
break;
|
83 |
-
} //End Switch
|
84 |
-
} elseif (YASR_AUTO_INSERT_WHAT === 'both') {
|
85 |
-
switch (YASR_AUTO_INSERT_WHERE) {
|
86 |
-
case 'top':
|
87 |
-
$content_and_stars = $overall_rating_code . $visitor_votes_code . $content;
|
88 |
-
break;
|
89 |
-
|
90 |
-
case 'bottom':
|
91 |
-
$content_and_stars = $content . $overall_rating_code . $visitor_votes_code;
|
92 |
-
break;
|
93 |
-
} //End Switch
|
94 |
-
}
|
95 |
-
|
96 |
-
//IF auto insert must work only in custom post type
|
97 |
-
if (YASR_AUTO_INSERT_CUSTOM_POST_ONLY === 'yes') {
|
98 |
-
$custom_post_types = YasrCustomPostTypes::getCustomPostTypes();
|
99 |
-
//If is a post type return content and stars
|
100 |
-
if (is_singular($custom_post_types)) {
|
101 |
-
return $content_and_stars;
|
102 |
-
} //else return just content
|
103 |
-
|
104 |
-
return $content;
|
105 |
-
}
|
106 |
-
|
107 |
-
//If page are not excluded
|
108 |
-
if (YASR_AUTO_INSERT_EXCLUDE_PAGES === 'no') {
|
109 |
-
return $content_and_stars;
|
110 |
-
}
|
111 |
-
|
112 |
-
if (YASR_AUTO_INSERT_EXCLUDE_PAGES === 'yes') {
|
113 |
-
if (is_page()) {
|
114 |
-
return $content;
|
115 |
-
} //If is a page return the content without stars
|
116 |
-
|
117 |
-
return $content_and_stars;
|
118 |
-
} //else return only if it is not a page
|
119 |
-
|
120 |
-
} //End function yasr_auto_insert_shortcode_callback
|
121 |
-
|
122 |
-
|
123 |
-
/****** Add review schema data at the end of the content *******/
|
124 |
-
add_filter('the_content', 'yasr_add_schema');
|
125 |
-
function yasr_add_schema($content) {
|
126 |
-
|
127 |
-
//Add buddypress compatibility
|
128 |
-
//If this is a page, return $content without adding schema.
|
129 |
-
if (function_exists('bp_is_active') && is_page()) {
|
130 |
-
return $content;
|
131 |
-
}
|
132 |
-
|
133 |
-
if (is_404() || did_action('get_footer') || (!is_singular() && is_main_query())) {
|
134 |
-
return $content;
|
135 |
-
}
|
136 |
-
|
137 |
-
$overall_rating = YasrDatabaseRatings::getOverallRating();
|
138 |
-
$visitor_votes = YasrDatabaseRatings::getVisitorVotes(false);
|
139 |
-
|
140 |
-
if (!$overall_rating && !$visitor_votes['number_of_votes'] && !$visitor_votes['sum_votes']) {
|
141 |
-
return $content;
|
142 |
-
}
|
143 |
-
|
144 |
-
//can't be between 0.1 and 1
|
145 |
-
if($overall_rating > 0 && $overall_rating < 1) {
|
146 |
-
$overall_rating = 1;
|
147 |
-
}
|
148 |
-
|
149 |
-
$is_post_a_review = get_post_meta(get_the_ID(), 'yasr_post_is_review', true);
|
150 |
-
|
151 |
-
$script_type = '<script type="application/ld+json">';
|
152 |
-
$end_script_type = '</script>';
|
153 |
-
|
154 |
-
$review_choosen = yasr_get_itemType();
|
155 |
-
|
156 |
-
//Use this hook to write your custom microdata from scratch
|
157 |
-
//if doesn't exists a filter for yasr_filter_schema_jsonld
|
158 |
-
// $review_chosen value is assigned to $filtered_schema.
|
159 |
-
$filtered_schema = apply_filters('yasr_filter_schema_jsonld', $review_choosen);
|
160 |
-
|
161 |
-
//So check here if $schema != $review_choosen
|
162 |
-
if ($filtered_schema !== $review_choosen) {
|
163 |
-
return $content . $script_type . $filtered_schema . $end_script_type;
|
164 |
-
}
|
165 |
-
|
166 |
-
//YASR adds microdata only if is_singular() && is_main_query() && !is_404()
|
167 |
-
if (is_singular() && is_main_query() && !is_404()) {
|
168 |
-
|
169 |
-
$rich_snippet['@context'] = 'http://schema.org/';
|
170 |
-
|
171 |
-
$author = get_the_author();
|
172 |
-
|
173 |
-
//use this hook to change the itemType name
|
174 |
-
$review_name = wp_strip_all_tags(apply_filters('yasr_filter_schema_title', get_the_title()));
|
175 |
-
|
176 |
-
$date = get_the_date('c');
|
177 |
-
$date_modified = get_the_modified_date('c');
|
178 |
-
|
179 |
-
$post_image_url = ''; //avoid undefined
|
180 |
-
$logo_image_url = ''; //avoid undefined
|
181 |
-
|
182 |
-
if (defined('YASR_PUBLISHER_LOGO')) {
|
183 |
-
$logo_image_url = YASR_PUBLISHER_LOGO;
|
184 |
-
$post_image_url = $logo_image_url; //this will be overwritten if has_post_thumbnail is true
|
185 |
-
|
186 |
-
$logo_image_url_absolute = $_SERVER['DOCUMENT_ROOT'] . parse_url(YASR_PUBLISHER_LOGO, PHP_URL_PATH);
|
187 |
-
|
188 |
-
$post_image_size = @getimagesize($logo_image_url_absolute); //the @ should be useless, just to be safe
|
189 |
-
$logo_image_size = @getimagesize($logo_image_url_absolute); //the @ should be useless, just to be safe
|
190 |
-
} else {
|
191 |
-
$post_image_size[0] = 0;
|
192 |
-
$post_image_size[1] = 0;
|
193 |
-
$logo_image_size[0] = 0;
|
194 |
-
$logo_image_size[1] = 0;
|
195 |
-
}
|
196 |
-
|
197 |
-
//if exists featuread image get the url and overwrite the variable
|
198 |
-
if (has_post_thumbnail()) {
|
199 |
-
$post_image_url = wp_get_attachment_url(get_post_thumbnail_id());
|
200 |
-
$post_image_url_absolute = $_SERVER['DOCUMENT_ROOT'] . parse_url($post_image_url, PHP_URL_PATH);
|
201 |
-
$post_image_size = @getimagesize($post_image_url_absolute); //the @ should be useless, just to be safe
|
202 |
-
}
|
203 |
-
|
204 |
-
$rich_snippet['@type'] = $review_choosen;
|
205 |
-
$rich_snippet['name'] = $review_name;
|
206 |
-
$cleaned_content = wp_strip_all_tags(strip_shortcodes($content));
|
207 |
-
|
208 |
-
$rich_snippet['description'] = wp_trim_words( $cleaned_content, 55, '...' );
|
209 |
-
|
210 |
-
$rich_snippet['image'] = array(
|
211 |
-
'@type' => 'ImageObject',
|
212 |
-
'url' => $post_image_url,
|
213 |
-
'width' => $post_image_size[0],
|
214 |
-
'height' => $post_image_size[1]
|
215 |
-
);
|
216 |
-
|
217 |
-
$publisher_image_index = 'logo';
|
218 |
-
if(YASR_PUBLISHER_TYPE === 'Person') {
|
219 |
-
$publisher_image_index = 'image';
|
220 |
-
}
|
221 |
-
|
222 |
-
if ($review_choosen === 'Place') {
|
223 |
-
$rich_snippet['@type'] = 'LocalBusiness';
|
224 |
-
}
|
225 |
-
|
226 |
-
elseif ($review_choosen === 'Other' || $review_choosen === 'BlogPosting') {
|
227 |
-
$rich_snippet['datePublished'] = $date;
|
228 |
-
$rich_snippet['headline'] = $review_name;
|
229 |
-
$rich_snippet['mainEntityOfPage'] = array(
|
230 |
-
'@type' => 'WebPage',
|
231 |
-
'@id' => get_permalink()
|
232 |
-
);
|
233 |
-
$rich_snippet['author'] = array(
|
234 |
-
'@type' => 'Person',
|
235 |
-
'name' => $author
|
236 |
-
);
|
237 |
-
$rich_snippet['publisher'] = array(
|
238 |
-
'@type' => 'Organization',
|
239 |
-
'name' => wp_strip_all_tags(YASR_PUBLISHER_NAME), //already sanitized in the settings, just to be safe
|
240 |
-
'logo' => array(
|
241 |
-
'@type' => 'ImageObject',
|
242 |
-
'url' => $logo_image_url,
|
243 |
-
'width' => $logo_image_size[0],
|
244 |
-
'height' => $logo_image_size[1]
|
245 |
-
),
|
246 |
-
);
|
247 |
-
|
248 |
-
$rich_snippet['dateModified'] = $date_modified;
|
249 |
-
|
250 |
-
$rich_snippet['image'] = array(
|
251 |
-
'@type' => 'ImageObject',
|
252 |
-
'url' => $post_image_url,
|
253 |
-
'width' => $post_image_size[0],
|
254 |
-
'height' => $post_image_size[1]
|
255 |
-
);
|
256 |
-
|
257 |
-
}
|
258 |
-
|
259 |
-
//Do not add rating if blogposting
|
260 |
-
if ($review_choosen !== 'Other' && $review_choosen !== 'BlogPosting') {
|
261 |
-
if ($overall_rating) {
|
262 |
-
$rich_snippet['Review'] = array(
|
263 |
-
'@type' => 'Review',
|
264 |
-
'name' => $review_name,
|
265 |
-
'reviewBody' => $cleaned_content,
|
266 |
-
'author' => array(
|
267 |
-
'@type' => 'Person',
|
268 |
-
'name' => $author
|
269 |
-
),
|
270 |
-
'datePublished' => $date,
|
271 |
-
'dateModified' => $date_modified,
|
272 |
-
'reviewRating' => array(
|
273 |
-
'@type' => 'Rating',
|
274 |
-
'ratingValue' => $overall_rating,
|
275 |
-
'bestRating' => 5,
|
276 |
-
'worstRating' => 1
|
277 |
-
),
|
278 |
-
);
|
279 |
-
}
|
280 |
-
|
281 |
-
//if both are included, google will index AggregateRating instead of Review.
|
282 |
-
//So, is post is selected as review, exclude AggregateRating
|
283 |
-
if($is_post_a_review !== 'yes') {
|
284 |
-
if ($visitor_votes) {
|
285 |
-
if ($visitor_votes['sum_votes'] !== 0 && $visitor_votes['number_of_votes'] !== 0) {
|
286 |
-
$average_rating = $visitor_votes['sum_votes'] / $visitor_votes['number_of_votes'];
|
287 |
-
$average_rating = round($average_rating, 1);
|
288 |
-
|
289 |
-
$rich_snippet['aggregateRating'] = array(
|
290 |
-
'@type' => 'AggregateRating',
|
291 |
-
'ratingValue' => $average_rating,
|
292 |
-
'ratingCount' => $visitor_votes['number_of_votes'],
|
293 |
-
'bestRating' => 5,
|
294 |
-
'worstRating' => 1,
|
295 |
-
);
|
296 |
-
}
|
297 |
-
}
|
298 |
-
}
|
299 |
-
}
|
300 |
-
|
301 |
-
if(isset($rich_snippet['Review']) || $review_choosen === 'Other' || $review_choosen === 'BlogPosting') {
|
302 |
-
$publisher = array(
|
303 |
-
'@type' => YASR_PUBLISHER_TYPE,
|
304 |
-
'name' => wp_strip_all_tags( YASR_PUBLISHER_NAME ),//already sanitized in the settings, just to be safe
|
305 |
-
$publisher_image_index => array(
|
306 |
-
'@type' => 'ImageObject',
|
307 |
-
'url' => $logo_image_url,
|
308 |
-
'width' => $logo_image_size[0],
|
309 |
-
'height' => $logo_image_size[1]
|
310 |
-
),
|
311 |
-
);
|
312 |
-
|
313 |
-
/** @noinspection NotOptimalIfConditionsInspection */
|
314 |
-
if(isset($rich_snippet['Review'])) {
|
315 |
-
$rich_snippet['Review']['publisher'] = $publisher;
|
316 |
-
} else {
|
317 |
-
$rich_snippet['publisher'] = $publisher;
|
318 |
-
}
|
319 |
-
}
|
320 |
-
|
321 |
-
//Use this hook to add additional schema
|
322 |
-
//if doesn't exists a filter for yasr_filter_existing_schema, put $rich_snippet into $more_rich_snippet
|
323 |
-
$more_rich_snippet = apply_filters('yasr_filter_existing_schema', $rich_snippet);
|
324 |
-
|
325 |
-
if ($more_rich_snippet !== $rich_snippet && is_array($more_rich_snippet)) {
|
326 |
-
$rich_snippet = $more_rich_snippet;
|
327 |
-
}
|
328 |
-
|
329 |
-
return $content . $script_type . json_encode($rich_snippet) . $end_script_type;
|
330 |
-
}
|
331 |
-
|
332 |
-
return $content;
|
333 |
-
|
334 |
-
} //End function
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
readme.txt
CHANGED
@@ -5,7 +5,7 @@ Requires at least: 4.9.0
|
|
5 |
Contributors: Dudo
|
6 |
Tested up to: 5.7
|
7 |
Requires PHP: 5.4
|
8 |
-
Stable tag: 2.6.
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
11 |
Boost the way people interact with your site with an easy WordPress stars rating system! With schema.org rich snippets YASR will improve your SEO
|
@@ -181,10 +181,14 @@ If doesn't, you should work on your seo reputation.
|
|
181 |
|
182 |
The full changelog can be found in the plugin's directory. Recent entries:
|
183 |
|
|
|
|
|
|
|
|
|
184 |
= 2.6.2 =
|
185 |
-
* TWEAK: yasr_top_ten_highest_rated is now
|
186 |
-
* TWEAK: yasr_top_5_reviewers is now
|
187 |
-
* TWEAK: yasr_top_ten_active_users is now
|
188 |
* FIX: yasr_visitor_votes didn't work on CPT if AJAX is enabled and CPT is registred without _base parameter
|
189 |
* FIX: Couldn't add new element in MultiSet if only one is used
|
190 |
* Updated freemius to version 2.4.2
|
5 |
Contributors: Dudo
|
6 |
Tested up to: 5.7
|
7 |
Requires PHP: 5.4
|
8 |
+
Stable tag: 2.6.3
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
11 |
Boost the way people interact with your site with an easy WordPress stars rating system! With schema.org rich snippets YASR will improve your SEO
|
181 |
|
182 |
The full changelog can be found in the plugin's directory. Recent entries:
|
183 |
|
184 |
+
= 2.6.3 =
|
185 |
+
* NEW feature: Now available the new "Rankings" tab in settings, here you can see a live preview of the rankings before adding it to you post
|
186 |
+
* TWEAKED: code cleanup
|
187 |
+
|
188 |
= 2.6.2 =
|
189 |
+
* TWEAK: yasr_top_ten_highest_rated is now depcrecated. yasr_ov_ranking will take its place
|
190 |
+
* TWEAK: yasr_top_5_reviewers is now depcrecated. yasr_top_reviewers will take its place
|
191 |
+
* TWEAK: yasr_top_ten_active_users is now depcrecated. yasr_most_active_users will take its place
|
192 |
* FIX: yasr_visitor_votes didn't work on CPT if AJAX is enabled and CPT is registred without _base parameter
|
193 |
* FIX: Couldn't add new element in MultiSet if only one is used
|
194 |
* Updated freemius to version 2.4.2
|
yet-another-stars-rating.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
* Plugin Name: Yet Another Stars Rating
|
5 |
* Plugin URI: http://wordpress.org/plugins/yet-another-stars-rating/
|
6 |
* Description: Boost the way people interact with your site with an easy WordPress stars rating system! With schema.org rich snippets YASR will improve your SEO
|
7 |
-
* Version: 2.6.
|
8 |
* Author: Dario Curvino
|
9 |
* Author URI: https://dariocurvino.it/
|
10 |
* Text Domain: yet-another-stars-rating
|
@@ -76,7 +76,7 @@ if ( !function_exists( 'yasr_fs' ) ) {
|
|
76 |
yasr_fs();
|
77 |
// Signal that SDK was initiated.
|
78 |
do_action( 'yasr_fs_loaded' );
|
79 |
-
define( 'YASR_VERSION_NUM', '2.6.
|
80 |
//Plugin absolute path
|
81 |
//e.g. /var/www/html/plugin_development/wp-content/plugins/yet-another-stars-rating
|
82 |
define( 'YASR_ABSOLUTE_PATH', __DIR__ );
|
4 |
* Plugin Name: Yet Another Stars Rating
|
5 |
* Plugin URI: http://wordpress.org/plugins/yet-another-stars-rating/
|
6 |
* Description: Boost the way people interact with your site with an easy WordPress stars rating system! With schema.org rich snippets YASR will improve your SEO
|
7 |
+
* Version: 2.6.3
|
8 |
* Author: Dario Curvino
|
9 |
* Author URI: https://dariocurvino.it/
|
10 |
* Text Domain: yet-another-stars-rating
|
76 |
yasr_fs();
|
77 |
// Signal that SDK was initiated.
|
78 |
do_action( 'yasr_fs_loaded' );
|
79 |
+
define( 'YASR_VERSION_NUM', '2.6.3' );
|
80 |
//Plugin absolute path
|
81 |
//e.g. /var/www/html/plugin_development/wp-content/plugins/yet-another-stars-rating
|
82 |
define( 'YASR_ABSOLUTE_PATH', __DIR__ );
|