Version 5.0.0 beta 5
This commit is contained in:
1 parent
2f24f9de48
commit
57d9db6ce2
218 files changed
+5331
-7416
No files matched your search
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<javascript app="blog">
|
||||
<file javascript_app="blog" javascript_location="front" javascript_path="controllers/view" javascript_name="ips.view.manageCategories.js" javascript_type="controller" javascript_version="5000030" javascript_position="1000100"><![CDATA[/**
|
||||
<file javascript_app="blog" javascript_location="front" javascript_path="controllers/view" javascript_name="ips.view.manageCategories.js" javascript_type="controller" javascript_version="5000031" javascript_position="1000100"><![CDATA[/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -31,7 +31,7 @@
|
||||
});
|
||||
|
||||
/* Save button changes */
|
||||
$('.ipsTabs ul[role="tablist"] a').on( 'click', this.tabChange );
|
||||
$('.ipsTabs [role="tablist"] a').on( 'click', this.tabChange );
|
||||
$('.ipsForm .ipsButtons').append( ips.templates.render('blog.view.addButton') );
|
||||
$('[data-action="addNew"]').on( 'click', _.bind( this.newRow, this ) );
|
||||
|
||||
@@ -71,8 +71,8 @@
|
||||
});
|
||||
|
||||
if( !$('#form_tab_blog_entry_categories').length ) {
|
||||
$('button[type="submit"]').addClass('ipsHide');
|
||||
$('button[data-action="addNew"]').removeClass('ipsHide');
|
||||
$('[type="submit"]').addClass('ipsHide');
|
||||
$('[data-action="addNew"]').removeClass('ipsHide');
|
||||
}
|
||||
},
|
||||
|
||||
@@ -169,7 +169,7 @@
|
||||
* @returns {void}
|
||||
*/
|
||||
tabChange: function (e) {
|
||||
if ( ! $('#form_tab_blog_entry_categories').hasClass('ipsTabs__tab--active') ) { // This looks back to front but the tab status is changed after this has fired
|
||||
if ($('#form_tab_blog_entry_categories').attr('aria-selected') == 'false') { // This looks back to front but the tab status is changed after this has fired
|
||||
$('button[type="submit"]').addClass('ipsHide');
|
||||
$('button[data-action="addNew"]').removeClass('ipsHide');
|
||||
} else {
|
||||
@@ -277,9 +277,9 @@
|
||||
}
|
||||
});
|
||||
}(jQuery, _));]]></file>
|
||||
<file javascript_app="blog" javascript_location="front" javascript_path="templates" javascript_name="ips.templates.view.js" javascript_type="template" javascript_version="5000030" javascript_position="1000050"><![CDATA[/* CLASS LIST TEMPLATES */
|
||||
<file javascript_app="blog" javascript_location="front" javascript_path="templates" javascript_name="ips.templates.view.js" javascript_type="template" javascript_version="5000031" javascript_position="1000050"><![CDATA[/* CLASS LIST TEMPLATES */
|
||||
ips.templates.set('blog.view.addButton', "\
|
||||
<button type=\"button\" class=\"ipsButton ipsButton--primary ipsHide\" data-action=\"addNew\">{{#lang}}manage_cats_new_row{{/lang}}</button>\
|
||||
<li><button type=\"button\" class=\"ipsButton ipsButton--primary ipsHide\" data-action=\"addNew\">{{#lang}}manage_cats_new_row{{/lang}}</button></li>\
|
||||
");
|
||||
|
||||
ips.templates.set('blog.view.categoryRow', "\
|
||||
@@ -287,13 +287,13 @@ ips.templates.set('blog.view.categoryRow', "\
|
||||
<span data-role=\"sortHandle\" class=\"i-cursor_move\"><i class=\"fa-solid fa-bars\"></i></span>\
|
||||
<div class=\"ipsData__main i-flex i-gap_1\">\
|
||||
<span class=\"ipsData__title\" data-role=\"title_{{cat}}\">{{name}}</span>\
|
||||
<input type=\"text\" name=\"blog_name_{{cat}}\" value=\"\" data-role=\"input_{{cat}}\" class=\"ipsHide\">\
|
||||
<a href=\"#\" data-role=\"saveChanges\" data-category-id=\"{{cat}}\" class=\"ipsHide i-flex_00 ipsButton ipsButton--positive\" data-ipstooltip=\"\" title=\"{{#lang}}save{{/lang}}\">{{#lang}}save{{/lang}}</a>\
|
||||
<a href=\"#\" data-role=\"cancelChanges\" data-category-id=\"{{cat}}\" class=\"ipsHide i-flex_00 ipsButton ipsButton--negative\" data-ipstooltip=\"\" title=\"{{#lang}}cancel{{/lang}}\">{{#lang}}cancel{{/lang}}</a>\
|
||||
<input type=\"text\" name=\"blog_name_{{cat}}\" value=\"\" data-role=\"input_{{cat}}\" class=\"ipsInput ipsHide\">\
|
||||
<button type='button' data-role=\"saveChanges\" data-category-id=\"{{cat}}\" class=\"ipsHide i-flex_00 ipsButton ipsButton--positive\">{{#lang}}save{{/lang}}</button>\
|
||||
<button type='button' data-role=\"cancelChanges\" data-category-id=\"{{cat}}\" class=\"ipsHide i-flex_00 ipsButton ipsButton--negative\">{{#lang}}cancel{{/lang}}</button>\
|
||||
</div>\
|
||||
<div class=\"cBlog_manage_edit ipsButtonGroup\">\
|
||||
<a href=\"#\" data-action=\"delete\" data-category-id=\"{{cat}}\" class=\"ipsButton\" data-ipstooltip title=\"{{#lang}}delete{{/lang}}\"><i class=\"fa-solid fa-circle-xmark\"></i></a>\
|
||||
<a href=\"#\" data-action=\"edit\" data-category-id=\"{{cat}}\" class=\"ipsButton\" data-ipstooltip title=\"{{#lang}}edit{{/lang}}\"><i class\=\"fa-solid fa-pencil\"></i></a>\
|
||||
<button type='button data-action=\"delete\" data-category-id=\"{{cat}}\" class=\"ipsButton\" data-ipstooltip title=\"{{#lang}}delete{{/lang}}\"><i class=\"fa-solid fa-circle-xmark\"></i></button>\
|
||||
<button type='button data-action=\"edit\" data-category-id=\"{{cat}}\" class=\"ipsButton\" data-ipstooltip title=\"{{#lang}}edit{{/lang}}\"><i class\=\"fa-solid fa-pencil\"></i></button>\
|
||||
</div>\
|
||||
</li>\
|
||||
");
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<language>
|
||||
<app key="blog" version="5000030">
|
||||
<app key="blog" version="5000031">
|
||||
<word key="__app_blog" js="0">Blogs</word>
|
||||
<word key="frontnavigation_blogs" js="0">Blogs</word>
|
||||
<word key="__indefart_blog_entry_comment" js="0">a comment on a blog entry</word>
|
||||
|
||||
@@ -670,21 +670,17 @@
|
||||
{{endif}}
|
||||
{{if \count( $elements ) > 1}}
|
||||
<h2 class='ipsBox__header'>{lang="entry_information"}</h2>
|
||||
<div class='ipsTabs ipsJS_show' id='tabs_{$id}' data-ipsTabBar data-ipsTabBar-contentArea='#ipsTabs_content_{$id}'>
|
||||
<ul role='tablist'>
|
||||
<i-tabs class='ipsTabs' id='ipsTabs_{$id}' data-ipsTabBar data-ipsTabBar-contentArea='#ipsTabs_{$id}_content'>
|
||||
<div role='tablist'>
|
||||
{{foreach $elements as $name => $content}}
|
||||
<li>
|
||||
<a href='#ipsTabs_tabs_{$id}_{$id}_tab_{$name}_panel' id='{$id}_tab_{$name}' class="ipsTabs__tab" role="tab">
|
||||
{lang="$name"}
|
||||
</a>
|
||||
</li>
|
||||
<button type="button" id='ipsTabs_{$id}_{$name}' class="ipsTabs__tab" role="tab" aria-controls='ipsTabs_{$id}_{$name}_panel' aria-selected="{{if $name == 'blog_entry_mainTab'}}true{{else}}false{{endif}}">{lang="$name"}</button>
|
||||
{{endforeach}}
|
||||
</ul>
|
||||
</div>
|
||||
{template="tabScrollers" app="core" group="global" location="global"}
|
||||
</div>
|
||||
<div id='ipsTabs_content_{$id}' class='ipsTabs__panels'>
|
||||
</i-tabs>
|
||||
<div id='ipsTabs_{$id}_content' class='ipsTabs__panels'>
|
||||
{{foreach $elements as $name => $contents}}
|
||||
<div id='ipsTabs_tabs_{$id}_{$id}_tab_{$name}_panel' class="ipsTabs__panel ipsTabs__panel--{$name}" aria-labelledby="{$id}_tab_{$name}" aria-hidden="false">
|
||||
<div id='ipsTabs_{$id}_{$name}_panel' class="ipsTabs__panel ipsTabs__panel--{$name}" role="tabpanel" aria-labelledby="ipsTabs_{$id}_{$name}" {{if $name != 'blog_entry_mainTab'}}hidden{{endif}}>
|
||||
<ul class='ipsForm ipsForm--blog-submit-content ipsForm--vertical'>
|
||||
{{foreach $contents as $inputName => $input}}
|
||||
{$input|raw}
|
||||
|
||||
@@ -279,5 +279,6 @@
|
||||
"5000027": "5.0.0 Beta 2",
|
||||
"5000028": "5.0.0 Beta 2",
|
||||
"5000029": "5.0.0 Beta 3",
|
||||
"5000030": "5.0.0 Beta 4"
|
||||
"5000030": "5.0.0 Beta 4",
|
||||
"5000031": "5.0.0 Beta 5"
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"id": 5000031,
|
||||
"name": "5.0.0 Beta 5",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": true,
|
||||
"themeeditor": true,
|
||||
"javascript": true,
|
||||
"emailTemplates": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"files": {
|
||||
"added": [],
|
||||
"edited": [
|
||||
"blog\/front\/controllers\/view\/ips.view.manageCategories.js",
|
||||
"blog\/front\/templates\/ips.templates.view.js"
|
||||
],
|
||||
"removed": []
|
||||
},
|
||||
"orders": {
|
||||
"added": [],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"html": {
|
||||
"added": [],
|
||||
"edited": [
|
||||
"front\/submit\/submitFormTemplate"
|
||||
],
|
||||
"removed": []
|
||||
},
|
||||
"css": {
|
||||
"added": [],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
},
|
||||
"resources": {
|
||||
"added": [],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"categories": {
|
||||
"added": [],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
},
|
||||
"settings": {
|
||||
"added": [],
|
||||
"edited": [
|
||||
"layout_blog_view"
|
||||
],
|
||||
"removed": []
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<javascript app="calendar">
|
||||
<file javascript_app="calendar" javascript_location="front" javascript_path="controllers/browse" javascript_name="ips.browse.main.js" javascript_type="controller" javascript_version="5000030" javascript_position="1000250"><![CDATA[/**
|
||||
<file javascript_app="calendar" javascript_location="front" javascript_path="controllers/browse" javascript_name="ips.browse.main.js" javascript_type="controller" javascript_version="5000031" javascript_position="1000250"><![CDATA[/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -110,7 +110,7 @@
|
||||
}
|
||||
});
|
||||
}(jQuery, _));]]></file>
|
||||
<file javascript_app="calendar" javascript_location="front" javascript_path="controllers/browse" javascript_name="ips.browse.monthView.js" javascript_type="controller" javascript_version="5000030" javascript_position="1000250"><![CDATA[/**
|
||||
<file javascript_app="calendar" javascript_location="front" javascript_path="controllers/browse" javascript_name="ips.browse.monthView.js" javascript_type="controller" javascript_version="5000031" javascript_position="1000250"><![CDATA[/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -229,7 +229,7 @@
|
||||
}
|
||||
});
|
||||
}(jQuery, _));]]></file>
|
||||
<file javascript_app="calendar" javascript_location="front" javascript_path="controllers/overview" javascript_name="ips.overview.eventList.js" javascript_type="controller" javascript_version="5000030" javascript_position="1000300"><![CDATA[/**
|
||||
<file javascript_app="calendar" javascript_location="front" javascript_path="controllers/overview" javascript_name="ips.overview.eventList.js" javascript_type="controller" javascript_version="5000031" javascript_position="1000300"><![CDATA[/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -347,7 +347,7 @@ var PER_PAGE = 16;
|
||||
}
|
||||
});
|
||||
}(jQuery, _));]]></file>
|
||||
<file javascript_app="calendar" javascript_location="front" javascript_path="controllers/overview" javascript_name="ips.overview.nearMe.js" javascript_type="controller" javascript_version="5000030" javascript_position="1000300"><![CDATA[/**
|
||||
<file javascript_app="calendar" javascript_location="front" javascript_path="controllers/overview" javascript_name="ips.overview.nearMe.js" javascript_type="controller" javascript_version="5000031" javascript_position="1000300"><![CDATA[/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -711,7 +711,7 @@ var PER_PAGE = 16;
|
||||
}
|
||||
});
|
||||
}(jQuery, _));]]></file>
|
||||
<file javascript_app="calendar" javascript_location="front" javascript_path="controllers/overview" javascript_name="ips.overview.search.js" javascript_type="controller" javascript_version="5000030" javascript_position="1000300"><![CDATA[/**
|
||||
<file javascript_app="calendar" javascript_location="front" javascript_path="controllers/overview" javascript_name="ips.overview.search.js" javascript_type="controller" javascript_version="5000031" javascript_position="1000300"><![CDATA[/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -1265,7 +1265,7 @@ var PER_PAGE = 16;
|
||||
});
|
||||
}(jQuery, _));
|
||||
]]></file>
|
||||
<file javascript_app="calendar" javascript_location="front" javascript_path="controllers/submit" javascript_name="ips.submit.dates.js" javascript_type="controller" javascript_version="5000030" javascript_position="1000100"><![CDATA[/**
|
||||
<file javascript_app="calendar" javascript_location="front" javascript_path="controllers/submit" javascript_name="ips.submit.dates.js" javascript_type="controller" javascript_version="5000031" javascript_position="1000100"><![CDATA[/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -1813,7 +1813,7 @@ var PER_PAGE = 16;
|
||||
}
|
||||
});
|
||||
}(jQuery, _));]]></file>
|
||||
<file javascript_app="calendar" javascript_location="front" javascript_path="controllers/venue" javascript_name="ips.venue.main.js" javascript_type="controller" javascript_version="5000030" javascript_position="1000200"><![CDATA[/**
|
||||
<file javascript_app="calendar" javascript_location="front" javascript_path="controllers/venue" javascript_name="ips.venue.main.js" javascript_type="controller" javascript_version="5000031" javascript_position="1000200"><![CDATA[/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -1920,7 +1920,7 @@ var PER_PAGE = 16;
|
||||
}
|
||||
});
|
||||
}(jQuery, _));]]></file>
|
||||
<file javascript_app="calendar" javascript_location="front" javascript_path="controllers/view" javascript_name="ips.view.reminderButton.js" javascript_type="controller" javascript_version="5000030" javascript_position="1000150"><![CDATA[/**
|
||||
<file javascript_app="calendar" javascript_location="front" javascript_path="controllers/view" javascript_name="ips.view.reminderButton.js" javascript_type="controller" javascript_version="5000031" javascript_position="1000150"><![CDATA[/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -2003,7 +2003,7 @@ var PER_PAGE = 16;
|
||||
}
|
||||
});
|
||||
}(jQuery, _));]]></file>
|
||||
<file javascript_app="calendar" javascript_location="front" javascript_path="controllers/view" javascript_name="ips.view.reminderForm.js" javascript_type="controller" javascript_version="5000030" javascript_position="1000150">/**
|
||||
<file javascript_app="calendar" javascript_location="front" javascript_path="controllers/view" javascript_name="ips.view.reminderForm.js" javascript_type="controller" javascript_version="5000031" javascript_position="1000150">/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -2113,7 +2113,7 @@ var PER_PAGE = 16;
|
||||
});
|
||||
}(jQuery, _));
|
||||
</file>
|
||||
<file javascript_app="calendar" javascript_location="front" javascript_path="templates" javascript_name="ips.calendar.templates.js" javascript_type="framework" javascript_version="5000030" javascript_position="1000050"><![CDATA[/**
|
||||
<file javascript_app="calendar" javascript_location="front" javascript_path="templates" javascript_name="ips.calendar.templates.js" javascript_type="framework" javascript_version="5000031" javascript_position="1000050"><![CDATA[/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*/
|
||||
@@ -2122,7 +2122,7 @@ var PER_PAGE = 16;
|
||||
ips.templates.set('calendar.reminder.loading', " \
|
||||
<div class='ipsLoading ipsLoading--tiny'></div>\
|
||||
");]]></file>
|
||||
<file javascript_app="calendar" javascript_location="front" javascript_path="templates" javascript_name="ips.templates.overview.js" javascript_type="template" javascript_version="5000030" javascript_position="1000050"><![CDATA[ips.templates.set("eventLoading", `
|
||||
<file javascript_app="calendar" javascript_location="front" javascript_path="templates" javascript_name="ips.templates.overview.js" javascript_type="template" javascript_version="5000031" javascript_position="1000050"><![CDATA[ips.templates.set("eventLoading", `
|
||||
<li class='ipsData__item ipsData__item--loading'>
|
||||
<div class="ipsData__image"></div>
|
||||
<div class="ipsData__content">
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<language>
|
||||
<app key="calendar" version="5000030">
|
||||
<app key="calendar" version="5000031">
|
||||
<word key="__app_calendar" js="0">Events</word>
|
||||
<word key="frontnavigation_calendar" js="0">Events</word>
|
||||
<word key="__indefart_calendar_event_comment" js="0">a comment on an event</word>
|
||||
|
||||
@@ -348,7 +348,7 @@
|
||||
<i></i>
|
||||
{{endif}}
|
||||
<div class='ipsCalendarDate'>
|
||||
{{if $event->nextOccurrence( \IPS\calendar\Date::getDate(), 'startDate' )}}
|
||||
{{if $event->nextOccurrence( $date, 'startDate' )}}
|
||||
<span class='ipsCalendarDate__month'>{lang="_date_month_short" pluralize="$event->nextOccurrence( $date, 'startDate' )->format( 'n' )"}</span>
|
||||
<span class='ipsCalendarDate__date'>{$event->nextOccurrence( $date, 'startDate' )->format( 'd' )}</span>
|
||||
{{else}}
|
||||
@@ -459,7 +459,7 @@
|
||||
{{endif}}
|
||||
{{endif}}
|
||||
</div>
|
||||
<h4 class='ipsData__title'><a href='{$event->url()}'>{$event->title}</a></h4>
|
||||
<h3 class='ipsData__title'><a href='{$event->url()}'>{$event->title}</a></h3>
|
||||
<p class="ipsData__desc">{$event->truncated(TRUE, 400)}</p>
|
||||
</div>
|
||||
{{if $event->container()->club() !== NULL || $event->venue || $event->location}}
|
||||
@@ -489,7 +489,7 @@
|
||||
{{if \count( $featured )}}
|
||||
<section class="ipsBox cEvents__overview-featured">
|
||||
<header class="ipsBox__header">
|
||||
<h3>Featured Events</h3>
|
||||
<h2>Featured Events</h2>
|
||||
{template="carouselNavigation" group="global" app="core" params="'carousel--events-featured'"}
|
||||
</header>
|
||||
<i-data>
|
||||
@@ -510,7 +510,7 @@
|
||||
{{$image = \IPS\File::get('core_Clubs', $event->container()->club()->profile_photo );}}
|
||||
{{endif}}
|
||||
|
||||
<div class='ipsData__item'>
|
||||
<li class='ipsData__item'>
|
||||
<a href="{$event->url()}" class="ipsLinkPanel" aria-hidden="true" tabindex="-1"><span>{$event->title}</span></a>
|
||||
<figure class="ipsData__image">
|
||||
{{if $image}}
|
||||
@@ -533,9 +533,9 @@
|
||||
{{if $event->_happening}}
|
||||
<div class='ipsBadge'>{$event->_happening}</div>
|
||||
{{endif}}
|
||||
<h4 class='ipsData__title'>
|
||||
<h3 class='ipsData__title'>
|
||||
<a href="{$event->url()}">{$event->title}</a>
|
||||
</h4>
|
||||
</h3>
|
||||
<p class='i-font-weight_500 i-font-size_-2 i-text-transform_uppercase'>
|
||||
<time datetime='{expression="$event->_start_date->format( 'Y-m-d' )"}'>
|
||||
{{if $event->nextOccurrence( \IPS\calendar\Date::getDate(), 'startDate' )}}
|
||||
@@ -614,7 +614,7 @@
|
||||
</ul>
|
||||
{{endif}}
|
||||
</div>
|
||||
</div>]]></template>
|
||||
</li>]]></template>
|
||||
<template template_group="events" template_name="nearMe" template_data="$nearme, $mapMarkers" template_location="front" template_app="calendar"><![CDATA[<section class='ipsBox' data-controller='calendar.front.overview.nearMe' {{if settings.googlemaps AND !settings.mapbox}}data-nearme-use-google data-googlemaps-api-key='{setting="google_maps_api_key"}'{{endif}}>
|
||||
<header class='ipsBox__header'>
|
||||
<h2>{lang="events_happening_near_you"}</h2>
|
||||
@@ -624,7 +624,7 @@
|
||||
</label>
|
||||
</header>
|
||||
<div class='ipsBox__content'>
|
||||
<p class='i-padding_3 i-color_soft'>{lang="showing_events_near_you"} <a href='{url="app=calendar&do=search&form_submitted=1&lat=0&lon=0"}' data-role='nearMeLink' data-action='moreNearMe'>{lang="see_more_events_near_you"} <i class='fa-solid fa-angle-right'></i></a></p>
|
||||
<p class='i-padding_3 i-color_soft'>{lang="showing_events_near_you"} <a href='{url="app=calendar&do=search&form_submitted=1&lat=0&lon=0"}' data-role='nearMeLink' data-action='moreNearMe' class="i-font-weight_500 i-text-decoration_underline">{lang="see_more_events_near_you"} <i class='fa-solid fa-angle-right'></i></a></p>
|
||||
<div class='ipsJS_hide' data-role='locationEvents'>
|
||||
{template="nearMeContent" group="events" app="calendar" params="$nearme, $mapMarkers"}
|
||||
</div>
|
||||
@@ -652,7 +652,7 @@
|
||||
<section class='ipsBox i-margin-bottom_block'>
|
||||
<h2 class='ipsBox__header'>{lang="events_online_events"}</h2>
|
||||
<div class='i-padding_3 i-background_2 i-border-end-start-radius_box i-border-end-end-radius_box'>
|
||||
<ul class='ipsEventList'>
|
||||
<ul class='ipsEventList ipsData ipsData--grid ipsData--events-list'>
|
||||
{{foreach $events as $event}}
|
||||
{template="event" app="calendar" group="events" params="$event, 'small'"}
|
||||
{{endforeach}}
|
||||
@@ -692,7 +692,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class='cEvents__searchMap cEvents__searchMap--loading event' data-role='searchResultsMap' {{if $mapMarkers}}data-markers="{$mapMarkers}"{{endif}}></div>
|
||||
<ul class='ipsEventList {{if !\count( $results )}}ipsHide{{endif}}' data-role='searchResults'>
|
||||
<ul class='ipsEventList ipsData ipsData--grid ipsData--events-list {{if !\count( $results )}}ipsHide{{endif}}' data-role='searchResults'>
|
||||
{template="searchResults" app="calendar" group="events" params="$results"}
|
||||
</ul>
|
||||
<div class='i-padding_2'>
|
||||
@@ -1371,39 +1371,46 @@
|
||||
{{foreach $elements[''] as $key => $input}}
|
||||
{{if $key === 'location'}}
|
||||
<li class='cEvents__search__field cEvents__search__field--location'>
|
||||
<label class='cEvents__search__label'>{lang="events_search_location"}</label>
|
||||
<div class='cEvents__search__searchWrap i-flex i-gap_1'>
|
||||
{{if $byLocation}}
|
||||
{{$input->options['placeholder'] = \IPS\Member::loggedIn()->language()->addToStack( "events_search_your_location" );}}
|
||||
{{$input->options['disabled'] = TRUE;}}
|
||||
{$input->html()|raw}
|
||||
<a href='#' class='ipsEventSearch__searchLocation i-align-self_center i-font-size_-2 i-font-weight_600 i-color_soft i-flex_00 ipsJS_show' hidden data-action='useMyLocation'><i class='fa-solid fa-crosshairs'></i> <span>{lang="events_search_use_location"}</span></a>
|
||||
<a href='#' class='ipsEventSearch__searchLocation i-align-self_center i-font-size_-2 i-font-weight_600 i-color_soft i-flex_00 ipsJS_show' data-action='cancelLocation'><span>{lang="events_search_cancel_location"}</span></a>
|
||||
{{else}}
|
||||
{$input->html()|raw}
|
||||
<a href='#' class='ipsEventSearch__searchLocation i-align-self_center i-font-size_-2 i-font-weight_600 i-color_soft i-flex_00 ipsJS_show' data-action='useMyLocation'><i class='fa-solid fa-crosshairs'></i> <span>{lang="events_search_use_location"}</span></a>
|
||||
<a href='#' class='ipsEventSearch__searchLocation i-align-self_center i-font-size_-2 i-font-weight_600 i-color_soft i-flex_00 ipsJS_show' hidden data-action='cancelLocation'><span>{lang="events_search_cancel_location"}</span></a>
|
||||
{{endif}}
|
||||
<div class="i-flex i-justify-content_space-between">
|
||||
<label class='cEvents__search__label' for="elInput_location">{lang="events_search_location"}</label>
|
||||
<div class='i-flex i-gap_1'>
|
||||
{{if $byLocation}}
|
||||
{{$input->options['placeholder'] = \IPS\Member::loggedIn()->language()->addToStack( "events_search_your_location" );}}
|
||||
{{$input->options['disabled'] = TRUE;}}
|
||||
<button type="button" class='ipsEventSearch__searchLocation' hidden data-action='useMyLocation'><i class='fa-solid fa-crosshairs'></i> <span>{lang="events_search_use_location"}</span></button>
|
||||
<button type="button" class='ipsEventSearch__searchLocation' data-action='cancelLocation'><span>{lang="events_search_cancel_location"}</span></button>
|
||||
{{else}}
|
||||
<button type="button" class='ipsEventSearch__searchLocation' data-action='useMyLocation'><i class='fa-solid fa-crosshairs'></i> <span>{lang="events_search_use_location"}</span></button>
|
||||
<button type="button" class='ipsEventSearch__searchLocation' hidden data-action='cancelLocation'><span>{lang="events_search_cancel_location"}</span></button>
|
||||
{{endif}}
|
||||
</div>
|
||||
</div>
|
||||
{$input->html()|raw}
|
||||
</li>
|
||||
{{elseif $key === 'show'}}
|
||||
<li class='cEvents__search__field cEvents__search__field--show'>
|
||||
<label class='cEvents__search__label'>{lang="events_search_type"}</label>
|
||||
{$input->html()|raw}
|
||||
<label class="cEvents__search__input">
|
||||
<span class='cEvents__search__label'>{lang="events_search_type"}</span>
|
||||
{$input->html()|raw}
|
||||
</label>
|
||||
</li>
|
||||
{{elseif $key === 'date'}}
|
||||
<li class='cEvents__search__field cEvents__search__field--date cEvents__search__field--from'>
|
||||
<label class='cEvents__search__label'>{lang="events_search_from"}</label>
|
||||
{$input->start->html()|raw}
|
||||
<label class="cEvents__search__input">
|
||||
<span class='cEvents__search__label'>{lang="events_search_from"}</span>
|
||||
{$input->start->html()|raw}
|
||||
</label>
|
||||
</li>
|
||||
<li class='cEvents__search__field cEvents__search__field--date cEvents__search__field--to'>
|
||||
<label class='cEvents__search__label'>{lang="events_search_to"}</label>
|
||||
{$input->end->html()|raw}
|
||||
<label class="cEvents__search__input">
|
||||
<span class='cEvents__search__label'>{lang="events_search_to"}</span>
|
||||
{$input->end->html()|raw}
|
||||
</label>
|
||||
</li>
|
||||
{{endif}}
|
||||
{{endforeach}}
|
||||
<li class='cEvents__search__field cEvents__search__field--submit'>
|
||||
<button type='submit' class='ipsButton ipsButton--primary i-width_100p'>{lang="events_search_search"}</button>
|
||||
<button type='submit' class='ipsButton ipsButton--large ipsButton--primary i-width_100p'><i class="fa-solid fa-magnifying-glass"></i><span>{lang="events_search_search"}</span></button>
|
||||
</li>
|
||||
</ul>
|
||||
</form>]]></template>
|
||||
@@ -1857,7 +1864,7 @@
|
||||
{template="shareButton" app="core" group="sharelinks" params="$event"}
|
||||
{{endif}}
|
||||
{{if $event->canRemind()}}
|
||||
{template="reminder" app="calendar" group="view" params="$event, $reminder"}
|
||||
{template="reminder" app="calendar" group="view" params="$event, $event->getReminder()"}
|
||||
{{endif}}
|
||||
{{if \IPS\Application::appIsEnabled('cloud')}}
|
||||
{template="spam" app="cloud" group="spam" params="$event"}
|
||||
@@ -2072,24 +2079,18 @@
|
||||
<div data-ips-hook="rsvpWrapper" class='ipsBox ipsPull'>
|
||||
{template="rsvpControls" group="view" params="$event, $attendees"}
|
||||
<h3 class='ipsTitle ipsTitle--h3 ipsHide'>{lang="event_rsvp_attendees"}</h3>
|
||||
<div class='ipsTabs ipsTabs_small ipsTabs--stretch' id='elAttendees{$tabId}' data-ipsTabBar data-ipsTabBar-contentArea='#elAttendees{$tabId}_content'>
|
||||
<ul data-ips-hook="rsvpTabs" role="tablist">
|
||||
<li>
|
||||
<a href='#ipsTabs_elAttendees{$tabId}_elGoing_panel' id='elGoing' class='ipsTabs__tab ipsTabs__tab--active' role="tab" aria-selected='true'>{{if $event->hasPassed()}}{lang="rsvp_attendees_past"}{{else}}{lang="rsvp_attendees"}{{endif}} {{if \count($attendees[1])}}({expression="\count($attendees[1])"}){{endif}}</a>
|
||||
</li>
|
||||
<i-tabs class='ipsTabs ipsTabs--small ipsTabs--stretch' id='ipsTabs_elAttendees{$tabId}' data-ipsTabBar data-ipsTabBar-contentArea='#ipsTabs_elAttendees{$tabId}_content'>
|
||||
<div data-ips-hook="rsvpTabs" role="tablist">
|
||||
<button type="button" id='ipsTabs_elAttendees{$tabId}_elGoing' class='ipsTabs__tab' role="tab" aria-controls="ipsTabs_elAttendees{$tabId}_elGoing_panel" aria-selected='true'>{{if $event->hasPassed()}}{lang="rsvp_attendees_past"}{{else}}{lang="rsvp_attendees"}{{endif}} {{if \count($attendees[1])}}({expression="\count($attendees[1])"}){{endif}}</button>
|
||||
{{if $event->rsvp_limit == -1}}
|
||||
<li>
|
||||
<a href='#ipsTabs_elAttendees{$tabId}_elMaybe_panel' id='elMaybe' class='ipsTabs__tab' role="tab" aria-selected='false'>{lang="rsvp_maybe_attendees"} {{if \count($attendees[2])}}({expression="\count($attendees[2])"}){{endif}}</a>
|
||||
</li>
|
||||
{{endif}}
|
||||
<li>
|
||||
<a href='#ipsTabs_elAttendees{$tabId}_elNotGoing_panel' id='elNotGoing' class='ipsTabs__tab' role="tab" aria-selected='false'>{lang="rsvp_notgoing_attendees"} {{if \count($attendees[0])}}({expression="\count($attendees[0])"}){{endif}}</a>
|
||||
</li>
|
||||
</ul>
|
||||
<button type="button" id='ipsTabs_elAttendees{$tabId}_elMaybe' class='ipsTabs__tab' role="tab" aria-controls="ipsTabs_elAttendees{$tabId}_elMaybe_panel" aria-selected='false'>{lang="rsvp_maybe_attendees"} {{if \count($attendees[2])}}({expression="\count($attendees[2])"}){{endif}}</button>
|
||||
{{endif}}
|
||||
<button type="button" id='ipsTabs_elAttendees{$tabId}_elNotGoing' class='ipsTabs__tab' role="tab" aria-controls="ipsTabs_elAttendees{$tabId}_elNotGoing_panel" aria-selected='false'>{lang="rsvp_notgoing_attendees"} {{if \count($attendees[0])}}({expression="\count($attendees[0])"}){{endif}}</button>
|
||||
</div>
|
||||
{template="tabScrollers" app="core" group="global" location="global"}
|
||||
</div>
|
||||
<div id='elAttendees{$tabId}_content' class='ipsTabs__panels ipsTabs__panels--padded'>
|
||||
<div data-ips-hook="rsvpAttendees" id="ipsTabs_elAttendees{$tabId}_elGoing_panel" class='ipsTabs__panel'>
|
||||
</i-tabs>
|
||||
<div id='ipsTabs_elAttendees{$tabId}_content' class='ipsTabs__panels ipsTabs__panels--padded'>
|
||||
<div data-ips-hook="rsvpAttendees" id="ipsTabs_elAttendees{$tabId}_elGoing_panel" class='ipsTabs__panel' role="tabpanel" aria-labelledby="ipsTabs_elAttendees{$tabId}_elGoing">
|
||||
{{if \count($attendees[1]) }}
|
||||
<ul class='ipsGrid ipsGrid--event-attendees i-basis_40'>
|
||||
{{foreach $attendees[1] as $attendee}}
|
||||
@@ -2115,7 +2116,7 @@
|
||||
{{endif}}
|
||||
</div>
|
||||
{{if $event->rsvp_limit == -1}}
|
||||
<div data-ips-hook="rsvpMaybeWrapper" id="ipsTabs_elAttendees{$tabId}_elMaybe_panel" class='ipsTabs__panel'>
|
||||
<div data-ips-hook="rsvpMaybeWrapper" id="ipsTabs_elAttendees{$tabId}_elMaybe_panel" class='ipsTabs__panel' role="tabpanel" aria-labelledby="ipsTabs_elAttendees{$tabId}_elMaybe" hidden>
|
||||
{{if \count($attendees[2]) }}
|
||||
<ul data-ips-hook="rsvpMaybe" class='ipsGrid ipsGrid--event-attendees i-basis_40'>
|
||||
{{foreach $attendees[2] as $attendee}}
|
||||
@@ -2141,7 +2142,7 @@
|
||||
{{endif}}
|
||||
</div>
|
||||
{{endif}}
|
||||
<div data-ips-hook="rsvpNotGoingWrapper" id="ipsTabs_elAttendees{$tabId}_elNotGoing_panel" class='ipsTabs__panel'>
|
||||
<div data-ips-hook="rsvpNotGoingWrapper" id="ipsTabs_elAttendees{$tabId}_elNotGoing_panel" class='ipsTabs__panel' role="tabpanel" aria-labelledby="ipsTabs_elAttendees{$tabId}_elNotGoing" hidden>
|
||||
{{if \count($attendees[0]) }}
|
||||
<ul data-ips-hook="rsvpNotGoing" class='ipsGrid ipsGrid--event-attendees i-basis_40'>
|
||||
{{foreach $attendees[0] as $attendee}}
|
||||
@@ -2984,7 +2985,6 @@ tr td:not(:first-child):not(.cCalendar_firstDay) .cEvents_ranged .cEvents_event:
|
||||
.ipsData--events-featured .ipsCalendarDate{
|
||||
width: 3.3em;
|
||||
position: absolute;
|
||||
top: 6em;
|
||||
inset-inline-start: 1.5em;
|
||||
}
|
||||
|
||||
@@ -2998,29 +2998,37 @@ tr td:not(:first-child):not(.cCalendar_firstDay) .cEvents_ranged .cEvents_event:
|
||||
.cEvents__search {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: flex-end;
|
||||
gap: 1em;
|
||||
gap: 1.8em 1em;
|
||||
}
|
||||
|
||||
.cEvents__search > *{
|
||||
flex: 1 1 100%;
|
||||
}
|
||||
|
||||
.ipsEventSearch__searchLocation{
|
||||
flex: 0 0 auto;
|
||||
font-weight: 600;
|
||||
font-size: .9em;
|
||||
align-self: start;
|
||||
}
|
||||
|
||||
.ipsEventSearch__searchLocation:hover{
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.cEvents__search__field--date {
|
||||
flex-basis: 280px;
|
||||
flex-basis: 150px;
|
||||
}
|
||||
|
||||
.cEvents__search__field--date input{
|
||||
max-width: none;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.cEvents__search__label {
|
||||
color: var(--i-color_hard);
|
||||
font-size: 11px;
|
||||
text-transform: uppercase;
|
||||
display: block;
|
||||
font-weight: 500;
|
||||
margin-bottom: 0.4em;
|
||||
font-weight: 600;
|
||||
margin-bottom: .5em;
|
||||
}
|
||||
|
||||
.cEvents__search__searchWrap :is([type="text"], [type="search"]) {
|
||||
@@ -3050,29 +3058,22 @@ tr td:not(:first-child):not(.cCalendar_firstDay) .cEvents_ranged .cEvents_event:
|
||||
}
|
||||
|
||||
/* Listing */
|
||||
.ipsData--events-list .ipsCalendarDate{
|
||||
position: absolute;
|
||||
width: 50px;
|
||||
top: 10px;
|
||||
inset-inline-start: 10px;
|
||||
.cEvent__onlineLogo{
|
||||
inset: auto;
|
||||
bottom: 5px;
|
||||
inset-inline-end: 5px;
|
||||
background: var(--i-background_1);
|
||||
padding: 8px 12px;
|
||||
pointer-events: none;
|
||||
border-start-start-radius: var(--i-box--bo-ra);
|
||||
}
|
||||
|
||||
.cEvent__onlineLogo{
|
||||
inset: auto;
|
||||
bottom: 5px;
|
||||
inset-inline-end: 5px;
|
||||
background: var(--i-background_1);
|
||||
padding: 8px 12px;
|
||||
pointer-events: none;
|
||||
border-start-start-radius: var(--i-box--bo-ra);
|
||||
.cEvent__onlineLogo svg{
|
||||
display: block;
|
||||
width: auto;
|
||||
height: 12px;
|
||||
}
|
||||
|
||||
.cEvent__onlineLogo svg{
|
||||
display: block;
|
||||
width: auto;
|
||||
height: 12px;
|
||||
}
|
||||
|
||||
/* Near me section */
|
||||
.ipsEventsNearMe__map{
|
||||
padding: 10px;
|
||||
@@ -3139,8 +3140,7 @@ tr td:not(:first-child):not(.cCalendar_firstDay) .cEvents_ranged .cEvents_event:
|
||||
}
|
||||
|
||||
.cEvents__monthNav__year {
|
||||
font-size: .85em;
|
||||
opacity: .5;
|
||||
font-size: .9em;
|
||||
}
|
||||
|
||||
.cEvents__skeleton--map {
|
||||
|
||||
@@ -279,5 +279,6 @@
|
||||
"5000027": "5.0.0 Beta 2",
|
||||
"5000028": "5.0.0 Beta 2",
|
||||
"5000029": "5.0.0 Beta 3",
|
||||
"5000030": "5.0.0 Beta 4"
|
||||
"5000030": "5.0.0 Beta 4",
|
||||
"5000031": "5.0.0 Beta 5"
|
||||
}
|
||||
@@ -155,14 +155,6 @@ class event extends Controller
|
||||
/* Online User Location */
|
||||
Session::i()->setLocation( $this->event->url(), $this->event->onlineListPermissions(), 'loc_calendar_viewing_event', array( $this->event->title => FALSE ) );
|
||||
|
||||
/* Reminder */
|
||||
$reminder = NULL;
|
||||
try
|
||||
{
|
||||
$reminder = Db::i()->select( '*', 'calendar_event_reminders', array( 'reminder_event_id=? and reminder_member_id=?', $this->event->id, (int) Member::loggedIn()->member_id ) )->first();
|
||||
}
|
||||
catch ( UnderflowException $e ) {}
|
||||
|
||||
/* Address */
|
||||
$address = NULL;
|
||||
$location = NULL;
|
||||
@@ -186,13 +178,28 @@ class event extends Controller
|
||||
'@type' => "Event",
|
||||
'url' => (string) $this->event->url(),
|
||||
'name' => $this->event->mapped('title'),
|
||||
'description' => $this->event->truncated( TRUE, NULL ),
|
||||
'description' => $this->event->truncated( TRUE, NULL ) ?? "",
|
||||
'eventStatus' => "EventScheduled",
|
||||
'organizer' => array(
|
||||
'@type' => 'Person',
|
||||
'name' => $this->event->author()->name,
|
||||
'image' => $this->event->author()->get_photo( TRUE, TRUE )
|
||||
),
|
||||
'startDate' => $this->event->nextOccurrence( Date::getDate(), 'startDate' ) ?
|
||||
$this->event->nextOccurrence( Date::getDate(), 'startDate' )->format( $format ) :
|
||||
$this->event->lastOccurrence( 'startDate' )->format( $format )
|
||||
);
|
||||
|
||||
if( $this->event->author()->member_id )
|
||||
{
|
||||
Output::i()->jsonLd['event']['organizer']['url'] = (string) $this->event->author()->url();
|
||||
}
|
||||
|
||||
if( $image = $this->event->coverPhotoFile() )
|
||||
{
|
||||
Output::i()->jsonLd['event']['image'] = (string) $image->url;
|
||||
}
|
||||
|
||||
if( $this->event->_end_date )
|
||||
{
|
||||
Output::i()->jsonLd['event']['endDate'] = $this->event->nextOccurrence( $this->event->nextOccurrence( Date::getDate(), 'startDate' ) ?: Date::getDate(), 'endDate' ) ?
|
||||
@@ -210,13 +217,10 @@ class event extends Controller
|
||||
);
|
||||
}
|
||||
|
||||
if( $this->event->coverPhoto()->file )
|
||||
{
|
||||
Output::i()->jsonLd['event']['image'] = (string) $this->event->coverPhoto()->file->url;
|
||||
}
|
||||
|
||||
if( $this->event->rsvp )
|
||||
{
|
||||
Output::i()->jsonLd['event']['eventAttendanceMode'] = 'https://schema.org/MixedEventAttendanceMode';
|
||||
|
||||
if( count( $attendees[1] ) )
|
||||
{
|
||||
Output::i()->jsonLd['event']['attendee'] = array();
|
||||
@@ -249,6 +253,8 @@ class event extends Controller
|
||||
{
|
||||
Output::i()->jsonLd['event']['location']['name'] = $addressName;
|
||||
}
|
||||
|
||||
Output::i()->jsonLd['event']['eventAttendanceMode'] = 'https://schema.org/OfflineEventAttendanceMode';
|
||||
}
|
||||
/* If not, default to events URL */
|
||||
else
|
||||
@@ -268,10 +274,12 @@ class event extends Controller
|
||||
'@type' => 'VirtualLocation',
|
||||
'url' => $this->event->url
|
||||
);
|
||||
|
||||
Output::i()->jsonLd['event']['eventAttendanceMode'] = 'https://schema.org/OnlineEventAttendanceMode';
|
||||
}
|
||||
|
||||
/* Display */
|
||||
Output::i()->output = Theme::i()->getTemplate( 'view' )->view( $this->event, $commentsAndReviews, $attendees, $address, $reminder );
|
||||
Output::i()->output = Theme::i()->getTemplate( 'view' )->view( $this->event, $commentsAndReviews, $attendees, $address, $this->event->getReminder() );
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -484,12 +492,7 @@ class event extends Controller
|
||||
}
|
||||
|
||||
/* Existing reminder? */
|
||||
$existing = NULL;
|
||||
try
|
||||
{
|
||||
$existing = Db::i()->select( '*', 'calendar_event_reminders', array( 'reminder_event_id=? and reminder_member_id=?', $this->event->id, (int) Member::loggedIn()->member_id ) )->first();
|
||||
}
|
||||
catch ( UnderflowException $e ) {}
|
||||
$existing = $this->event->getReminder();
|
||||
|
||||
/* Build the form */
|
||||
|
||||
@@ -520,9 +523,14 @@ class event extends Controller
|
||||
|
||||
Db::i()->update( 'core_tasks', array( 'enabled' => 1 ), array( '`key`=?', 'eventreminders' ) );
|
||||
|
||||
$message = 'event_reminder_added';
|
||||
|
||||
Output::i()->redirect( $this->event->url(), $message );
|
||||
if( Request::i()->isAjax() )
|
||||
{
|
||||
Output::i()->sendOutput( Theme::i()->getTemplate( 'view', 'calendar', 'front' )->reminderButton( $this->event, $this->event->getReminder() ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
Output::i()->redirect( $this->event->url(), 'event_reminder_added' );
|
||||
}
|
||||
}
|
||||
|
||||
/* Display */
|
||||
@@ -573,16 +581,6 @@ class event extends Controller
|
||||
*/
|
||||
protected function reminderButton() : void
|
||||
{
|
||||
/* Existing reminder? */
|
||||
$existing = NULL;
|
||||
try
|
||||
{
|
||||
$existing = Db::i()->select( '*', 'calendar_event_reminders', array( 'reminder_event_id=? and reminder_member_id=?', $this->event->id, (int)Member::loggedIn()->member_id ) )->first();
|
||||
}
|
||||
catch ( UnderflowException $e )
|
||||
{
|
||||
}
|
||||
|
||||
Output::i()->sendOutput( Theme::i()->getTemplate( 'view', 'calendar', 'front' )->reminderButton( $this->event, $existing ) );
|
||||
Output::i()->sendOutput( Theme::i()->getTemplate( 'view', 'calendar', 'front' )->reminderButton( $this->event, $this->event->getReminder() ) );
|
||||
}
|
||||
}
|
||||
@@ -602,7 +602,15 @@ class view extends Controller
|
||||
}
|
||||
|
||||
/* Sort */
|
||||
$startDate = Date::getDate();
|
||||
if( !isset( Request::i()->get ) or Request::i()->get == 'byMonth' )
|
||||
{
|
||||
$startDate = Date::getDate( Request::i()->y ?: null, Request::i()->m ?: null, 1, 12 );
|
||||
}
|
||||
else
|
||||
{
|
||||
$startDate = Date::getDate();
|
||||
}
|
||||
|
||||
@usort( $events, function( $a, $b ) use ( $startDate )
|
||||
{
|
||||
if( $a->nextOccurrence( $startDate, 'startDate' ) === NULL )
|
||||
@@ -645,7 +653,7 @@ class view extends Controller
|
||||
{
|
||||
foreach( $events as $idx => $event )
|
||||
{
|
||||
$eventHtml .= Theme::i()->getTemplate( 'events', 'calendar' )->event( $event );
|
||||
$eventHtml .= Theme::i()->getTemplate( 'events', 'calendar' )->event( $event, 'normal', $startDate );
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"id": 5000031,
|
||||
"name": "5.0.0 Beta 5",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": true,
|
||||
"themeeditor": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
{
|
||||
"html": {
|
||||
"added": [],
|
||||
"edited": [
|
||||
"front\/events\/event",
|
||||
"front\/events\/featured",
|
||||
"front\/events\/featuredEvent",
|
||||
"front\/events\/nearMe",
|
||||
"front\/events\/online",
|
||||
"front\/events\/searchResultsWrapper",
|
||||
"front\/overview\/searchBar",
|
||||
"front\/view\/coverPhotoOverlay",
|
||||
"front\/view\/eventSidebar"
|
||||
],
|
||||
"removed": []
|
||||
},
|
||||
"css": {
|
||||
"added": [],
|
||||
"edited": [
|
||||
"front\/calendar.css"
|
||||
],
|
||||
"removed": []
|
||||
},
|
||||
"resources": {
|
||||
"added": [],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
}
|
||||
}
|
||||
@@ -2553,6 +2553,27 @@ class Event extends Item implements Embeddable,
|
||||
return ( ( $this->_start_date->getTimestamp() - 86400 ) > time() );
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the existing reminder, if the member has one set
|
||||
*
|
||||
* @param Member|null $member
|
||||
* @return array|null
|
||||
*/
|
||||
public function getReminder( ?Member $member=null ) : ?array
|
||||
{
|
||||
$member = $member ?: Member::loggedIn();
|
||||
if( $member->member_id )
|
||||
{
|
||||
try
|
||||
{
|
||||
return Db::i()->select( '*', 'calendar_event_reminders', array( 'reminder_event_id=? and reminder_member_id=?', $this->id, (int) $member->member_id ) )->first();
|
||||
}
|
||||
catch( UnderflowException ){}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Venue
|
||||
*
|
||||
|
||||
@@ -549,7 +549,6 @@ HTML;
|
||||
'page_seo_name' => "articles.html",
|
||||
'page_folder_id' => 0,
|
||||
'page_ipb_wrapper' => 1,
|
||||
'page_show_sidebar' => 1,
|
||||
'page_type' => 'builder',
|
||||
'page_template' => 'page_builder__single_column__page_page_builder_single_column'
|
||||
);
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
<widget key="Rss"><![CDATA[{"class":"\\IPS\\Widget\\StaticCache","restrict":["cms"],"default_area":"","allow_reuse":true,"menu_style":"modal","embeddable":true}]]></widget>
|
||||
<widget key="pagebuildertext"><![CDATA[{"class":"\\IPS\\Widget\\StaticCache","restrict":["sidebar","cms"],"default_area":"","allow_reuse":true,"menu_style":"modal","layouts":"","embeddable":true,"padding":false,"default_layout":null,"searchterms":"plaintext,plain"}]]></widget>
|
||||
<widget key="pagebuilderoembed"><![CDATA[{"class":"\\IPS\\Widget\\StaticCache","restrict":["sidebar","cms"],"default_area":"","allow_reuse":true,"menu_style":"modal","embeddable":true}]]></widget>
|
||||
<widget key="pagebuilderupload"><![CDATA[{"class":"\\IPS\\Widget\\StaticCache","restrict":["sidebar","cms"],"default_area":"","allow_reuse":true,"menu_style":"modal","embeddable":true}]]></widget>
|
||||
<widget key="pagebuilderupload"><![CDATA[{"class":"\\IPS\\Widget\\StaticCache","restrict":["sidebar","cms"],"default_area":"","allow_reuse":true,"menu_style":"modal","layouts":"wallpaper","embeddable":true,"padding":false,"default_layout":"wallpaper","searchterms":"carousel,slideshow,autoplay"}]]></widget>
|
||||
<widget key="Codemirror"><![CDATA[{"class":"\\IPS\\Widget","restrict":["sidebar","cms"],"default_area":"","allow_reuse":true,"menu_style":"modal","layouts":"","embeddable":true,"padding":false,"default_layout":null,"searchterms":"code,rich,plain,editor"}]]></widget>
|
||||
<widget key="DatabaseNavigation"><![CDATA[{"class":"\\IPS\\Widget","restrict":["sidebar","cms"],"default_area":"","allow_reuse":false,"menu_style":"menu","layouts":"wrap,grid,start,center,end,columnLeft,columnRight,stack","embeddable":true}]]></widget>
|
||||
<widget key="FolderNavigation"><![CDATA[{"class":"\\IPS\\Widget","restrict":["sidebar","cms"],"default_area":"","allow_reuse":true,"menu_style":"menu","layouts":"wrap,grid,start,center,end,columnLeft,columnRight,stack","embeddable":true}]]></widget>
|
||||
|
||||
@@ -1365,21 +1365,18 @@ data-view-tracking-data="{expression="base64_encode(json_encode( $review->getVie
|
||||
{{if !empty( $errorTabs )}}
|
||||
<p class="ipsMessage ipsMessage--error ipsJS_show">{lang="tab_error"}</p>
|
||||
{{endif}}
|
||||
<div class='ipsTabs ipsJS_show' id='tabs_{$id}' data-ipsTabBar data-ipsTabBar-contentArea='#ipsTabs_content_{$id}'>
|
||||
<ul role='tablist'>
|
||||
<i-tabs class='ipsTabs' id='ipsTabs_{$id}' data-ipsTabBar data-ipsTabBar-contentArea='#ipsTabs_{$id}_content'>
|
||||
<div role='tablist'>
|
||||
{{$checkedTab = NULL;}}
|
||||
{{foreach $elements as $name => $content}}
|
||||
<li>
|
||||
<a href='#ipsTabs_tabs_{$id}_{$id}_tab_{$name}_panel' id='{$id}_tab_{$name}' class="ipsTabs__tab" role="tab">
|
||||
{lang="$name"}
|
||||
</a>
|
||||
</li>
|
||||
<button type="button" id='ipsTabs_{$id}_{$name}' class="ipsTabs__tab" role="tab" aria-controls="ipsTabs_{$id}_{$name}_panel" aria-selected="{{if !$checkedTab}}true{{$checkedTab = $name;}}{{else}}false{{endif}}">{lang="$name"}</button>
|
||||
{{endforeach}}
|
||||
</ul>
|
||||
</div>
|
||||
{template="tabScrollers" app="core" group="global" location="global"}
|
||||
</div>
|
||||
<div id='ipsTabs_content_{$id}' class='ipsTabs__panels ipsTabs__panels--padded'>
|
||||
</i-tabs>
|
||||
<div id='ipsTabs_{$id}_content' class='ipsTabs__panels ipsTabs__panels--padded'>
|
||||
{{foreach $elements as $name => $contents}}
|
||||
<div id='ipsTabs_tabs_{$id}_{$id}_tab_{$name}_panel' class="ipsTabs__panel" aria-labelledby="{$id}_tab_{$name}" aria-hidden="false">
|
||||
<div id='ipsTabs_{$id}_{$name}_panel' class="ipsTabs__panel" aria-labelledby="ipsTabs_{$id}_{$name}" role="tabpanel" {{if $checkedTab != $name}}hidden{{endif}}>
|
||||
|
||||
{{if $hasModOptions && ( $name == 'topic_mainTab' OR $name == 'content_record_form_mainTab' ) }}
|
||||
<div class='ipsColumns ipsColumns--lines'>
|
||||
@@ -1515,21 +1512,20 @@ data-view-tracking-data="{expression="base64_encode(json_encode( $review->getVie
|
||||
{{if !empty( $errorTabs )}}
|
||||
<p class="ipsMessage ipsMessage--error ipsJS_show">{lang="tab_error"}</p>
|
||||
{{endif}}
|
||||
<div class='ipsTabs ipsJS_show' id='tabs_{$id}' data-ipsTabBar data-ipsTabBar-contentArea='#ipsTabs_content_{$id}'>
|
||||
<ul role='tablist'>
|
||||
<i-tabs class='ipsTabs' id='ipsTabs_{$id}' data-ipsTabBar data-ipsTabBar-contentArea='#ipsTabs_{$id}_content'>
|
||||
<div role='tablist'>
|
||||
{{$checkedTab = NULL;}}
|
||||
{{foreach $elements as $name => $content}}
|
||||
<li>
|
||||
<a href='#ipsTabs_tabs_{$id}_{$id}_tab_{$name}_panel' id='{$id}_tab_{$name}' class="ipsTabs__tab" role="tab">
|
||||
{lang="$name"}
|
||||
</a>
|
||||
</li>
|
||||
<button type="button" id='ipsTabs_{$id}_{$name}' class="ipsTabs__tab" role="tab" aria-controls="ipsTabs_{$id}_{$name}_panel" aria-selected="{{if !$checkedTab}}true{{$checkedTab = $name;}}{{else}}false{{endif}}">
|
||||
{lang="$name"}
|
||||
</button>
|
||||
{{endforeach}}
|
||||
</ul>
|
||||
</div>
|
||||
{template="tabScrollers" app="core" group="global" location="global"}
|
||||
</div>
|
||||
<div id='ipsTabs_content_{$id}' class='ipsTabs__panels ipsTabs__panels--padded'>
|
||||
</i-tabs>
|
||||
<div id='ipsTabs_{$id}_content' class='ipsTabs__panels ipsTabs__panels--padded'>
|
||||
{{foreach $elements as $name => $contents}}
|
||||
<div id='ipsTabs_tabs_{$id}_{$id}_tab_{$name}_panel' class="ipsTabs__panel" aria-labelledby="{$id}_tab_{$name}" aria-hidden="false">
|
||||
<div id='ipsTabs_{$id}_{$name}_panel' class="ipsTabs__panel" role="tabpanel" aria-labelledby="ipsTabs_{$id}_{$name}" {{if $checkedTab != $name}}hidden{{endif}}>
|
||||
|
||||
{{if $hasModOptions && ( $name == 'topic_mainTab' OR $name == 'content_record_form_mainTab' ) }}
|
||||
<div class='ipsColumns'>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<javascript app="cms">
|
||||
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/blocks" javascript_name="ips.blocks.form.js" javascript_type="controller" javascript_version="5000030" javascript_position="1000100"><![CDATA[/**
|
||||
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/blocks" javascript_name="ips.blocks.form.js" javascript_type="controller" javascript_version="5000031" javascript_position="1000100"><![CDATA[/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -67,7 +67,7 @@
|
||||
}
|
||||
});
|
||||
}(jQuery, _));]]></file>
|
||||
<file javascript_app="cms" javascript_location="front" javascript_path="controllers/blocks" javascript_name="ips.blocks.navigation.js" javascript_type="controller" javascript_version="5000030" javascript_position="1000050"><![CDATA[/**
|
||||
<file javascript_app="cms" javascript_location="front" javascript_path="controllers/blocks" javascript_name="ips.blocks.navigation.js" javascript_type="controller" javascript_version="5000031" javascript_position="1000050"><![CDATA[/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -111,7 +111,7 @@
|
||||
|
||||
});
|
||||
}(jQuery, _));]]></file>
|
||||
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/databases" javascript_name="ips.databases.download.js" javascript_type="controller" javascript_version="5000030" javascript_position="1000150">/**
|
||||
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/databases" javascript_name="ips.databases.download.js" javascript_type="controller" javascript_version="5000031" javascript_position="1000150">/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -156,7 +156,7 @@
|
||||
}
|
||||
});
|
||||
}(jQuery, _));</file>
|
||||
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/databases" javascript_name="ips.databases.form.js" javascript_type="controller" javascript_version="5000030" javascript_position="1000150"><![CDATA[/**
|
||||
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/databases" javascript_name="ips.databases.form.js" javascript_type="controller" javascript_version="5000031" javascript_position="1000150"><![CDATA[/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -232,7 +232,7 @@
|
||||
}
|
||||
});
|
||||
}(jQuery, _));]]></file>
|
||||
<file javascript_app="cms" javascript_location="front" javascript_path="controllers/external" javascript_name="ips.external.communication.js" javascript_type="controller" javascript_version="5000030" javascript_position="1000150"><![CDATA[/**
|
||||
<file javascript_app="cms" javascript_location="front" javascript_path="controllers/external" javascript_name="ips.external.communication.js" javascript_type="controller" javascript_version="5000031" javascript_position="1000150"><![CDATA[/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -367,7 +367,7 @@
|
||||
}
|
||||
});
|
||||
}(jQuery, _));]]></file>
|
||||
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/fields" javascript_name="ips.fields.form.js" javascript_type="controller" javascript_version="5000030" javascript_position="1000200"><![CDATA[/**
|
||||
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/fields" javascript_name="ips.fields.form.js" javascript_type="controller" javascript_version="5000031" javascript_position="1000200"><![CDATA[/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -457,7 +457,7 @@
|
||||
}
|
||||
});
|
||||
}(jQuery, _));]]></file>
|
||||
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/media" javascript_name="ips.media.main.js" javascript_type="controller" javascript_version="5000030" javascript_position="1000300"><![CDATA[/**
|
||||
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/media" javascript_name="ips.media.main.js" javascript_type="controller" javascript_version="5000031" javascript_position="1000300"><![CDATA[/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -1091,13 +1091,12 @@
|
||||
*/
|
||||
_switchToTab: function (tab) {
|
||||
if( tab == 'overview' ){
|
||||
this.scope.find('#elTab_overview').removeClass('ipsTabs__tabDisabled');
|
||||
this.scope.find('#elTab_overview').click();
|
||||
this.scope.find('#ipsTabs_mediaSidebar_overview').click();
|
||||
}
|
||||
}
|
||||
});
|
||||
}(jQuery, _));]]></file>
|
||||
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/pages" javascript_name="ips.pages.embed.js" javascript_type="controller" javascript_version="5000030" javascript_position="1000250"><![CDATA[/**
|
||||
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/pages" javascript_name="ips.pages.embed.js" javascript_type="controller" javascript_version="5000031" javascript_position="1000250"><![CDATA[/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -1132,7 +1131,7 @@
|
||||
}
|
||||
});
|
||||
}(jQuery, _));]]></file>
|
||||
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/pages" javascript_name="ips.pages.form.js" javascript_type="controller" javascript_version="5000030" javascript_position="1000250"><![CDATA[/**
|
||||
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/pages" javascript_name="ips.pages.form.js" javascript_type="controller" javascript_version="5000031" javascript_position="1000250"><![CDATA[/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -1254,7 +1253,7 @@
|
||||
}
|
||||
});
|
||||
}(jQuery, _));]]></file>
|
||||
<file javascript_app="cms" javascript_location="front" javascript_path="controllers/records" javascript_name="ips.records.form.js" javascript_type="controller" javascript_version="5000030" javascript_position="1000100"><![CDATA[/**
|
||||
<file javascript_app="cms" javascript_location="front" javascript_path="controllers/records" javascript_name="ips.records.form.js" javascript_type="controller" javascript_version="5000031" javascript_position="1000100"><![CDATA[/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -1366,7 +1365,7 @@
|
||||
}
|
||||
});
|
||||
}(jQuery, _));]]></file>
|
||||
<file javascript_app="cms" javascript_location="front" javascript_path="controllers/records" javascript_name="ips.records.revisions.js" javascript_type="controller" javascript_version="5000030" javascript_position="1000100">/**
|
||||
<file javascript_app="cms" javascript_location="front" javascript_path="controllers/records" javascript_name="ips.records.revisions.js" javascript_type="controller" javascript_version="5000031" javascript_position="1000100">/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -1421,7 +1420,7 @@
|
||||
}
|
||||
});
|
||||
}(jQuery, _));</file>
|
||||
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/templates" javascript_name="ips.templates.addForm.js" javascript_type="controller" javascript_version="5000030" javascript_position="1000050">/**
|
||||
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/templates" javascript_name="ips.templates.addForm.js" javascript_type="controller" javascript_version="5000031" javascript_position="1000050">/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -1471,7 +1470,7 @@
|
||||
}
|
||||
});
|
||||
}(jQuery, _));</file>
|
||||
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/templates" javascript_name="ips.templates.conflict.js" javascript_type="controller" javascript_version="5000030" javascript_position="1000050">/**
|
||||
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/templates" javascript_name="ips.templates.conflict.js" javascript_type="controller" javascript_version="5000031" javascript_position="1000050">/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -1543,7 +1542,7 @@
|
||||
}
|
||||
});
|
||||
}(jQuery, _));</file>
|
||||
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/templates" javascript_name="ips.templates.fileEditor.js" javascript_type="controller" javascript_version="5000030" javascript_position="1000050"><![CDATA[/**
|
||||
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/templates" javascript_name="ips.templates.fileEditor.js" javascript_type="controller" javascript_version="5000031" javascript_position="1000050"><![CDATA[/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -1598,7 +1597,7 @@
|
||||
var self = this;
|
||||
|
||||
// Set element references
|
||||
this._tabBar = this.scope.find('#elTemplateEditor_tabbar > ul');
|
||||
this._tabBar = this.scope.find('#elTemplateEditor_tabbar [role="tablist"]');
|
||||
this._tabContent = this.scope.find('#elTemplateEditor_panels');
|
||||
|
||||
// Get the current height of the tab bar
|
||||
@@ -2168,7 +2167,7 @@
|
||||
}
|
||||
|
||||
// Is this tab active?
|
||||
var active = tab.hasClass('ipsTabs__tab--active');
|
||||
var active = (tab.attr('aria-selected') === 'true');
|
||||
|
||||
// Let the document know what we're up to
|
||||
this.trigger( 'closedTab.templates', {
|
||||
@@ -2188,7 +2187,7 @@
|
||||
}
|
||||
|
||||
if( newTab ){
|
||||
newTab.find('> a').click();
|
||||
newTab.click();
|
||||
}
|
||||
|
||||
// Close the tab
|
||||
@@ -2281,7 +2280,7 @@
|
||||
if( !this._tabBar.find('[data-fileid="' + data.meta.key + '"]').length ){
|
||||
this._buildTab( data.meta );
|
||||
} else {
|
||||
this._tabBar.find('[data-fileid="' + data.meta.key + '"] > a').click();
|
||||
this._tabBar.find('[data-fileid="' + data.meta.key + '"]').click();
|
||||
}
|
||||
},
|
||||
|
||||
@@ -2323,7 +2322,7 @@
|
||||
this._recalculatePanelWrapper();
|
||||
|
||||
// Toggle the new tab
|
||||
this._tabBar.find('[data-fileid="' + meta.key + '"] > a').click();
|
||||
this._tabBar.find('[data-fileid="' + meta.key + '"]').click();
|
||||
|
||||
// Manually set the content area to loading since we aren't using ui.tabbar's load methods
|
||||
this._tabContent.addClass('ipsLoading ipsTabs_loadingContent');
|
||||
@@ -2357,9 +2356,9 @@
|
||||
*/
|
||||
_updateTabLabel: function( key, title )
|
||||
{
|
||||
var span = this._tabBar.find('[data-fileid="' + key + '"] > a span').clone();
|
||||
var span = this._tabBar.find('[data-fileid="' + key + '"] span').clone();
|
||||
|
||||
this._tabBar.find('[data-fileid="' + key + '"] > a').html( title ).append( span );
|
||||
this._tabBar.find('[data-fileid="' + key + '"]').html( title ).append( span );
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -2474,7 +2473,7 @@
|
||||
tabPanel: null
|
||||
};
|
||||
|
||||
var tab = this._tabBar.find('.ipsTabs__tab.ipsTabs__tab--active').first().parent();
|
||||
var tab = this._tabBar.find('[aria-selected="true"]').first();
|
||||
|
||||
if( !tab.length ){
|
||||
return toReturn;
|
||||
@@ -2504,7 +2503,7 @@
|
||||
}
|
||||
});
|
||||
}(jQuery, _));]]></file>
|
||||
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/templates" javascript_name="ips.templates.fileList.js" javascript_type="controller" javascript_version="5000030" javascript_position="1000050"><![CDATA[/**
|
||||
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/templates" javascript_name="ips.templates.fileList.js" javascript_type="controller" javascript_version="5000031" javascript_position="1000050"><![CDATA[/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -2785,10 +2784,10 @@
|
||||
* @returns {string}
|
||||
*/
|
||||
_currentType: function () {
|
||||
if( this._tabBar.find('[data-type="template"]').hasClass('ipsTabs__tab--active') ){
|
||||
if( this._tabBar.find('[data-type="template"]').attr('aria-selected') === "true" ){
|
||||
return 'template';
|
||||
}
|
||||
if( this._tabBar.find('[data-type="js"]').hasClass('ipsTabs__tab--active') ){
|
||||
if( this._tabBar.find('[data-type="js"]').attr('aria-selected') === "true" ){
|
||||
return 'js';
|
||||
}
|
||||
|
||||
@@ -2796,7 +2795,7 @@
|
||||
}
|
||||
});
|
||||
}(jQuery, _));]]></file>
|
||||
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/templates" javascript_name="ips.templates.main.js" javascript_type="controller" javascript_version="5000030" javascript_position="1000050"><![CDATA[/**
|
||||
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/templates" javascript_name="ips.templates.main.js" javascript_type="controller" javascript_version="5000031" javascript_position="1000050"><![CDATA[/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -2925,7 +2924,7 @@
|
||||
this._textField.addClass('ipsField_loading');
|
||||
}
|
||||
|
||||
var type = $('#elTemplateEditor_typeTabs').find('.ipsTabs__tab--active').attr('data-type');
|
||||
var type = $('#elTemplateEditor_typeTabs').find('[aria-selected="true"]').attr('data-type');
|
||||
var type = ( type == 'templates' ) ? 'template' : type; // Because it's fun to be inconsistent, the database 'type' is 'template' yet in templates we use 'templates' - thanks past Matt
|
||||
|
||||
$('#elTemplateEditor_fileList').find('li[data-type=' + type + ']').addClass('ipsHide');
|
||||
@@ -2965,7 +2964,7 @@
|
||||
|
||||
});
|
||||
}(jQuery, _));]]></file>
|
||||
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/templates" javascript_name="ips.templates.variablesDialog.js" javascript_type="controller" javascript_version="5000030" javascript_position="1000050">/**
|
||||
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/templates" javascript_name="ips.templates.variablesDialog.js" javascript_type="controller" javascript_version="5000031" javascript_position="1000050">/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -3010,7 +3009,7 @@
|
||||
}
|
||||
});
|
||||
}(jQuery, _));</file>
|
||||
<file javascript_app="cms" javascript_location="admin" javascript_path="templates" javascript_name="ips.templates.media.js" javascript_type="template" javascript_version="5000030" javascript_position="1000050"><![CDATA[ips.templates.set( 'templates.media.grid', "\
|
||||
<file javascript_app="cms" javascript_location="admin" javascript_path="templates" javascript_name="ips.templates.media.js" javascript_type="template" javascript_version="5000031" javascript_position="1000050"><![CDATA[ips.templates.set( 'templates.media.grid', "\
|
||||
<ul class='ipsGrid ipsGrid--pages-media'>\
|
||||
{{{contents}}}\
|
||||
</ul>\
|
||||
@@ -3027,16 +3026,14 @@ ips.templates.set( 'templates.media.noSearchResults', "\
|
||||
{{#lang}}mediaNoResults{{/lang}}\
|
||||
</div>\
|
||||
");]]></file>
|
||||
<file javascript_app="cms" javascript_location="admin" javascript_path="templates" javascript_name="ips.templates.templates.js" javascript_type="template" javascript_version="5000030" javascript_position="1000050"><![CDATA[/* TEMPLATE EDITOR TEMPLATES */
|
||||
<file javascript_app="cms" javascript_location="admin" javascript_path="templates" javascript_name="ips.templates.templates.js" javascript_type="template" javascript_version="5000031" javascript_position="1000050"><![CDATA[/* TEMPLATE EDITOR TEMPLATES */
|
||||
/* TEMPLATECEPTION */
|
||||
ips.templates.set('templates.editor.newTab', " \
|
||||
<li data-fileid='{{fileid}}' data-location='{{location}}'>\
|
||||
<a href='#' class='ipsTabs__tab' id='{{id}}'>{{title}} <span data-action='closeTab'><i class='fa-solid fa-xmark'></i></span></a>\
|
||||
</li>\
|
||||
<a href='#' class='ipsTabs__tab' id='ipsTabs_elTemplateEditor_tabbar_tab_{{fileid}}' role='tab' aria-controls='ipsTabs_elTemplateEditor_tabbar_tab_{{fileid}}_panel' aria-selected='false' data-fileid='{{fileid}}' data-location='{{location}}'>{{title}} <span data-action='closeTab'><i class='fa-solid fa-xmark'></i></span></a>\
|
||||
");
|
||||
|
||||
ips.templates.set('templates.editor.tabPanel', " \
|
||||
<div data-fileid='{{fileid}}' id='ipsTabs_elTemplateEditor_tabbar_tab_{{fileid}}_panel' class='ipsTabs__panel' style='display: none' data-location='{{location}}' data-type='{{type}}' data-group='{{group}}' data-name='{{name}}' data-type='{{type}}' data-itemID='{{id}}' data-inherited-value='{{inherited}}'>\
|
||||
<div class='ipsTabs__panel' id='ipsTabs_elTemplateEditor_tabbar_tab_{{fileid}}_panel' role='tabpanel' aria-labelledby='ipsTabs_elTemplateEditor_tabbar_tab_{{fileid}}' hidden data-fileid='{{fileid}}' data-location='{{location}}' data-type='{{type}}' data-group='{{group}}' data-name='{{name}}' data-type='{{type}}' data-itemID='{{id}}' data-inherited-value='{{inherited}}'>\
|
||||
{{{content}}}\
|
||||
</div>\
|
||||
");
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<language>
|
||||
<app key="cms" version="5000030">
|
||||
<app key="cms" version="5000031">
|
||||
<word key="__app_cms" js="0">Pages</word>
|
||||
<word key="menutab__cms" js="0">Pages</word>
|
||||
<word key="menutab__cms_icon" js="0">file</word>
|
||||
@@ -298,7 +298,6 @@
|
||||
<word key="page_meta_index" js="0">Index</word>
|
||||
<word key="page_meta_index_desc" js="0">Allow Search Engines to index this page.</word>
|
||||
<word key="page_meta_index_desc_disabled" js="0">The page is not visible to guests, so it cannot be indexed.</word>
|
||||
<word key="page_show_sidebar" js="0">Show the suite sidebar on this page</word>
|
||||
<word key="page_type" js="0">Content Editor</word>
|
||||
<word key="page_type_builder" js="0">Page Editor (recommended)</word>
|
||||
<word key="page_type_builder_desc" js="0">A visual editor for drag and drop page creation</word>
|
||||
|
||||
@@ -2864,20 +2864,6 @@
|
||||
"values": [],
|
||||
"zerofill": false
|
||||
},
|
||||
"page_show_sidebar": {
|
||||
"allow_null": true,
|
||||
"auto_increment": false,
|
||||
"binary": false,
|
||||
"comment": "Display the standard suite sidebar",
|
||||
"decimals": null,
|
||||
"default": "0",
|
||||
"length": 1,
|
||||
"name": "page_show_sidebar",
|
||||
"type": "INT",
|
||||
"unsigned": true,
|
||||
"values": [],
|
||||
"zerofill": false
|
||||
},
|
||||
"page_default": {
|
||||
"allow_null": false,
|
||||
"auto_increment": false,
|
||||
|
||||
@@ -383,19 +383,15 @@
|
||||
<a href='{$rootButtons['add_folder']['link']}' data-ipsDialog data-ipsDialog-title='{lang="cms_add_media_folder"}' class='ipsButton ipsButton--secondary ipsButton--small ipsButton--wide' data-role='folderButton'><i class="fa-solid fa-folder-plus"></i> {lang="cms_add_media_folder"}</a>
|
||||
{{endif}}
|
||||
</div>
|
||||
<div class="ipsTabs ipsTabs--stretch acpFormTabBar" id="elMedia_sidebarTabs" data-ipsTabBar data-ipsTabBar-contentarea="#elMedia_sidebar" data-ipstabbar-updateurl="false">
|
||||
<ul role='tablist'>
|
||||
<li>
|
||||
<a href="#" class="ipsTabs__tab ipsTabs__tab--active" data-type="templates" id="elTab_folders" aria-selected="true">{lang="media_folders"}</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#" class="ipsTabs__tab ipsTabs__tabDisabled" id='elTab_overview' data-type="css">{lang="media_file_overview"}</a>
|
||||
</li>
|
||||
</ul>
|
||||
<i-tabs class="ipsTabs ipsTabs--stretch acpFormTabBar" id="ipsTabs_mediaSidebar" data-ipsTabBar data-ipsTabBar-contentarea="#elMedia_sidebar" data-ipstabbar-updateurl="false">
|
||||
<div role='tablist'>
|
||||
<button type="button" class="ipsTabs__tab" id="ipsTabs_mediaSidebar_folders" role="tab" aria-controls="ipsTabs_mediaSidebar_folders_panel" aria-selected="true" data-type="templates">{lang="media_folders"}</button>
|
||||
<button type="button" class="ipsTabs__tab" id='ipsTabs_mediaSidebar_overview' role="tab" aria-controls="ipsTabs_mediaSidebar_overview_panel" aria-selected="false" data-type="css">{lang="media_file_overview"}</button>
|
||||
</div>
|
||||
{template="tabScrollers" app="core" group="global" location="global"}
|
||||
</div>
|
||||
</i-tabs>
|
||||
<div id='elMedia_sidebar' class='i-background_1 ipsScrollbar'>
|
||||
<div id='ipsTabs_elMedia_sidebarTabs_elTab_folders_panel' class='ipsTabs__panel'>
|
||||
<div id='ipsTabs_mediaSidebar_folders_panel' class='ipsTabs__panel' role="tabpanel" aria-labelledby="ipsTabs_mediaSidebar_folders">
|
||||
{{$roots = \call_user_func( $tree->getRoots );}}
|
||||
<ul class='ipsTreeList' data-role='folderList'>
|
||||
<li class='ipsTreeList_activeBranch ipsTreeList_activeNode' data-role="mediaFolder" data-folderID='0' data-loaded='true'>
|
||||
@@ -408,7 +404,7 @@
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id='ipsTabs_elMedia_sidebarTabs_elTab_overview_panel' class='ipsTabs__panel i-padding_3' data-role='mediaSidebar'>
|
||||
<div id='ipsTabs_mediaSidebar_overview_panel' class='ipsTabs__panel i-padding_3' data-role='mediaSidebar' role="tabpanel" aria-labelledby="ipsTabs_mediaSidebar_overview" hidden>
|
||||
<div data-role='itemInformation'>
|
||||
<div class='cMedia_preview i-margin-bottom_3' data-role='itemPreview'></div>
|
||||
<div class=''>
|
||||
@@ -841,21 +837,18 @@
|
||||
{{if !empty( $errorTabs )}}
|
||||
<p class="ipsMessage ipsMessage--error ipsJS_show">{lang="tab_error"}</p>
|
||||
{{endif}}
|
||||
<div class='ipsTabs ipsJS_show' id='tabs_{$id}' data-ipsTabBar data-ipsTabBar-contentArea='#ipsTabs_content_{$id}'>
|
||||
<ul role='tablist'>
|
||||
<i-tabs class='ipsTabs' id='ipsTabs_{$id}' data-ipsTabBar data-ipsTabBar-contentArea='#ipsTabs_{$id}_content'>
|
||||
<div role='tablist'>
|
||||
{{$checkedTab = NULL;}}
|
||||
{{foreach $elements as $name => $content}}
|
||||
<li>
|
||||
<a href='#ipsTabs_tabs_{$id}_{$id}_tab_{$name}_panel' id='{$id}_tab_{$name}' class="ipsTabs__tab" role="tab">
|
||||
{lang="$name"}
|
||||
</a>
|
||||
</li>
|
||||
<a href='#ipsTabs_{$id}_{$name}_panel' id='ipsTabs_{$id}_{$name}' class="ipsTabs__tab" role="tab" aria-controls="ipsTabs_{$id}_{$name}_panel" aria-selected="{{if !$checkedTab}}true{{$checkedTab = $name;}}{{else}}false{{endif}}">{lang="$name"}</a>
|
||||
{{endforeach}}
|
||||
</ul>
|
||||
</div>
|
||||
{template="tabScrollers" app="core" group="global" location="global"}
|
||||
</div>
|
||||
<div id='ipsTabs_content_{$id}' class='ipsTabs__panels ipsTabs__panels--padded'>
|
||||
</i-tabs>
|
||||
<div id='ipsTabs_{$id}_content' class='ipsTabs__panels ipsTabs__panels--padded'>
|
||||
{{foreach $elements as $name => $contents}}
|
||||
<div id='ipsTabs_tabs_{$id}_{$id}_tab_{$name}_panel' class="ipsTabs__panel" aria-labelledby="{$id}_tab_{$name}" aria-hidden="false">
|
||||
<div id='ipsTabs_{$id}_{$name}_panel' class="ipsTabs__panel" aria-labelledby="ipsTabs_{$id}_{$name}" {{if $checkedTab != $name}}hidden{{endif}}>
|
||||
|
||||
{{if $hasModOptions && $name == 'topic_mainTab'}}
|
||||
<div class='ipsColumns'>
|
||||
@@ -937,7 +930,7 @@
|
||||
<template template_group="templates" template_name="addForm" template_data="$formHTML, $type" template_location="admin" template_app="cms"><![CDATA[<div data-type='{$type}'>
|
||||
{$formHTML|raw}
|
||||
</div>]]></template>
|
||||
<template template_group="templates" template_name="editor" template_data="$templates, $current" template_location="admin" template_app="cms"><![CDATA[<div class='ipsTabs__panel' data-role="templatePanel" id='ipsTabs_elTemplateEditor_tabbar_tab_{$current->key}_panel' data-fileid="{$current->key}" data-location="{$current->location}" data-group="{$current->group}" data-name="{$current->title}" data-type='{$current->type}' data-itemID='{$current->id}' data-inherited-value="{$current->_inherited}">
|
||||
<template template_group="templates" template_name="editor" template_data="$templates, $current" template_location="admin" template_app="cms"><![CDATA[<div class='ipsTabs__panel' id='ipsTabs_elTemplateEditor_tabbar_tab_{$current->key}_panel' role="tabpanel" aria-labelledby="tab_{$current->key}" data-role="templatePanel" data-fileid="{$current->key}" data-location="{$current->location}" data-group="{$current->group}" data-name="{$current->title}" data-type='{$current->type}' data-itemID='{$current->id}' data-inherited-value="{$current->_inherited}">
|
||||
<input data-role="group" type="text" name="group_{$current->key}" class='ipsJS_hide ipsInput ipsInput--text' value="{$current->group}">
|
||||
<input data-role="variables" type="text" name="variables_{$current->key}" class="ipsInput ipsInput--text ipsInput--fullWidth" value='{$current->params}' placeholder="{lang="skin_set_template_templatevars"}">
|
||||
<input data-role="title" type="text" name="title_{$current->key}" class="ipsJS_hide ipsInput ipsInput--text ipsInput--fullWidth" value='{$current->title}' placeholder="{lang="content_template_editor_fields_title"}">
|
||||
@@ -1059,14 +1052,14 @@
|
||||
<li class='ipsMenu_item'><a role='menuitem' href='{url="app=cms&module=pages&controller=templates&do=addTemplate&type=js"}' data-ipsDialog data-ipsDialog-forceReload data-ipsDialog-title='{lang="content_template_add_template_js_title""}'>{lang="content_template_add_template_js"}</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class='ipsTabs ipsTabs--stretch acpFormTabBar' id='elTemplateEditor_typeTabs' data-ipsTabBar data-ipsTabBar-contentArea='#elTemplateEditor_fileList' data-ipsTabBar-updateURL='false'>
|
||||
<ul role="tablist">
|
||||
<li><a href='{url="app=cms&module=pages&controller=templates&do=manage&t_type=templates"}' class='ipsTabs__tab i-text-align_center {{if $current->type == 'templates'}}ipsTabs__tab--active{{endif}}' data-tabURL='{url="app=cms&module=pages&controller=ajax&do=loadMenu&t_type=templates"}' data-type='templates'>{lang="theme_html"}</a></li>
|
||||
<li><a href='{url="app=cms&module=pages&controller=templates&do=manage&t_type=css"}' class='ipsTabs__tab i-text-align_center {{if $current->type == 'css'}}ipsTabs__tab--active{{endif}}' data-tabURL='{url="app=cms&module=pages&controller=ajax&do=loadMenu&t_type=css"}' data-type='css'>{lang="theme_css"}</a></li>
|
||||
<li><a href='{url="app=cms&module=pages&controller=templates&do=manage&t_type=js"}' class='ipsTabs__tab i-text-align_center {{if $current->type == 'js'}}ipsTabs__tab--active{{endif}}' data-tabURL='{url="app=cms&module=pages&controller=ajax&do=loadMenu&t_type=js"}' data-type='js'>{lang="theme_js"}</a></li>
|
||||
</ul>
|
||||
<i-tabs class='ipsTabs ipsTabs--stretch acpFormTabBar' id='elTemplateEditor_typeTabs' data-ipsTabBar data-ipsTabBar-contentArea='#elTemplateEditor_fileList' data-ipsTabBar-updateURL='false'>
|
||||
<div role="tablist">
|
||||
<a href='{url="app=cms&module=pages&controller=templates&do=manage&t_type=templates"}' class='ipsTabs__tab' role="tab" aria-selected="{{if $current->type == 'templates'}}true{{else}}false{{endif}}" data-tabURL='{url="app=cms&module=pages&controller=ajax&do=loadMenu&t_type=templates"}' data-type='templates'>{lang="theme_html"}</a>
|
||||
<a href='{url="app=cms&module=pages&controller=templates&do=manage&t_type=css"}' class='ipsTabs__tab' role="tab" aria-selected="{{if $current->type == 'css'}}true{{else}}false{{endif}}" data-tabURL='{url="app=cms&module=pages&controller=ajax&do=loadMenu&t_type=css"}' data-type='css'>{lang="theme_css"}</a>
|
||||
<a href='{url="app=cms&module=pages&controller=templates&do=manage&t_type=js"}' class='ipsTabs__tab' role="tab" aria-selected="{{if $current->type == 'js'}}true{{else}}false{{endif}}" data-tabURL='{url="app=cms&module=pages&controller=ajax&do=loadMenu&t_type=js"}' data-type='js'>{lang="theme_js"}</a>
|
||||
</div>
|
||||
{template="tabScrollers" app="core" group="global" location="global"}
|
||||
</div>
|
||||
</i-tabs>
|
||||
<section id='elTemplateEditor_fileList'>
|
||||
{template="menu" params="$templates, $current, $request" app="cms" location="admin" group="templates"}
|
||||
</section>
|
||||
@@ -1104,13 +1097,11 @@
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id='elTemplateEditor_tabbar' class='ipsTabs acpFormTabBar' data-ipsTabBar data-ipsTabBar-contentArea='#elTemplateEditor_panels'>
|
||||
<ul role='tablist'>
|
||||
<li data-fileid='{$current->key}' data-type="{$current->type}" data-location='{$current->location}' data-group="{$current->group}">
|
||||
<a href='#' class='ipsTabs__tab' id='tab_{$current->key}'>{$current->title} <span data-action='closeTab'><i class='fa-solid fa-xmark'></i></span></a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<i-tabs id='elTemplateEditor_tabbar' class='ipsTabs acpFormTabBar' data-ipsTabBar data-ipsTabBar-contentArea='#elTemplateEditor_panels'>
|
||||
<div role='tablist'>
|
||||
<a href='#' class='ipsTabs__tab' id='tab_{$current->key}' role="tab" aria-controls="ipsTabs_elTemplateEditor_tabbar_tab_{$current->key}_panel" aria-selected="true" data-fileid='{$current->key}' data-type="{$current->type}" data-location='{$current->location}' data-group="{$current->group}">{$current->title} <span data-action='closeTab'><i class='fa-solid fa-xmark'></i></span></a>
|
||||
</div>
|
||||
</i-tabs>
|
||||
<section data-role="templatePanelWrap" id='elTemplateEditor_panels' data-haseditor="{{if $current->id}}true{{else}}false{{endif}}">
|
||||
{template="editor" params="$templates, $current" app="cms" location="admin" group="templates"}
|
||||
</section>
|
||||
@@ -1266,7 +1257,7 @@
|
||||
</details>]]></template>
|
||||
<template template_group="widgets" template_name="pagebuilderoembed" template_data="$video, $layout='table', $isCarousel=false" template_location="front" template_app="cms"><![CDATA[<div class='i-margin-inline_auto'>{$video|raw}</div>]]></template>
|
||||
<template template_group="widgets" template_name="pagebuildertext" template_data="$text, $layout='table', $isCarousel=false" template_location="front" template_app="cms"><![CDATA[<div>{$text|raw}</div>]]></template>
|
||||
<template template_group="widgets" template_name="pagebuilderupload" template_data="$images, $captions, $urls, $autoPlay, $maxHeight, $layout='table', $isCarousel=false" template_location="front" template_app="cms"><![CDATA[
|
||||
<template template_group="widgets" template_name="pagebuilderupload" template_data="$images, $captions, $urls, $maxHeight, $layout='table', $isCarousel=false" template_location="front" template_app="cms"><![CDATA[
|
||||
{{if ! \is_array( $images )}}
|
||||
<figure class="ipsFigure ipsFigure--contain" {{if $maxHeight}}style="--_height: {$maxHeight}px;"{{endif}}>
|
||||
{{if isset( $urls[0] )}}
|
||||
@@ -1287,7 +1278,7 @@
|
||||
|
||||
{{else}}
|
||||
{{$carouselID = 'page-builder-image-widget_' . mt_rand();}}
|
||||
<ul class='ipsCarousel ipsCarousel--page-builder-image-widget' id='{$carouselID}' {{if $autoPlay}}data-ipsCarousel-slideshow{{endif}} tabindex="0">
|
||||
<ul class='ipsCarousel ipsCarousel--page-builder-image-widget' id='{$carouselID}' tabindex="0">
|
||||
{{foreach $images as $id => $image}}
|
||||
<li>
|
||||
<figure class='ipsFigure ipsFigure--contain' style="--_backdrop: url('{$image}'); {{if $maxHeight}}--_height: {$maxHeight}px;{{endif}}">
|
||||
@@ -1702,14 +1693,14 @@
|
||||
}
|
||||
|
||||
/* Hide tab bar if there are zero tabs (ie. if all tabs are closed) */
|
||||
#elTemplateEditor .ipsTabs:not(:has(li)){
|
||||
#elTemplateEditor .ipsTabs:not(:has([role="tab"])){
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* Close tab button */
|
||||
#elTemplateEditor [data-action="closeTab"] {
|
||||
font-size: 12px;
|
||||
color: var(--i-color_soft);
|
||||
opacity: .5;
|
||||
display: inline-grid;
|
||||
width: 1.6em;
|
||||
height: 1.6em;
|
||||
@@ -1721,8 +1712,8 @@
|
||||
}
|
||||
|
||||
#elTemplateEditor [data-action="closeTab"]:hover {
|
||||
color: var(--i-color_hard);
|
||||
background: color-mix(in srgb, var(--i-color_hard) 30%, transparent);
|
||||
opacity: 1;
|
||||
background: color-mix(in srgb, currentColor 10%, transparent);
|
||||
}
|
||||
|
||||
/* Full height code editor */
|
||||
@@ -1917,7 +1908,7 @@ a.ipsCms_templateOptions {
|
||||
/* INHERITED VALUES */
|
||||
a[data-inherited-value]::after {
|
||||
position: absolute;
|
||||
margin-top: 2px;
|
||||
top: 9px;
|
||||
inset-inline-end: 5px;
|
||||
}
|
||||
|
||||
@@ -1950,18 +1941,21 @@ a[data-inherited-value="original"]::after {
|
||||
.cTemplateState_custom::before {
|
||||
content: 'C';
|
||||
background: #c9c030;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.cTemplateList a[data-inherited-value="inherit"]::after,
|
||||
.cTemplateState_inherit::before {
|
||||
content: 'I';
|
||||
background: #83b256;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.cTemplateList a[data-inherited-value="changed"]::after,
|
||||
.cTemplateState_changed::before {
|
||||
content: 'M';
|
||||
background: #c93054;
|
||||
color: #fff;
|
||||
}]]></css>
|
||||
<css css_location="admin" css_app="cms" css_attributes="" css_path="templates" css_name="view.css">/* ----- */
|
||||
.ipsTemplate_box {
|
||||
|
||||
@@ -597,5 +597,6 @@
|
||||
"5000027": "5.0.0 Beta 2",
|
||||
"5000028": "5.0.0 Beta 2",
|
||||
"5000029": "5.0.0 Beta 3",
|
||||
"5000030": "5.0.0 Beta 4"
|
||||
"5000030": "5.0.0 Beta 4",
|
||||
"5000031": "5.0.0 Beta 5"
|
||||
}
|
||||
@@ -109,7 +109,11 @@
|
||||
"default_area": "",
|
||||
"allow_reuse": true,
|
||||
"menu_style": "modal",
|
||||
"embeddable": true
|
||||
"layouts": "wallpaper",
|
||||
"embeddable": true,
|
||||
"padding": false,
|
||||
"default_layout": "wallpaper",
|
||||
"searchterms": "carousel,slideshow,autoplay"
|
||||
},
|
||||
"Codemirror": {
|
||||
"class": "\\IPS\\Widget",
|
||||
|
||||
@@ -71,7 +71,6 @@ class UpdateHtmlPages extends QueueAbstract
|
||||
if( $row->type == 'builder' )
|
||||
{
|
||||
$row->ipb_wrapper = true;
|
||||
$row->show_sidebar = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -97,7 +96,6 @@ class UpdateHtmlPages extends QueueAbstract
|
||||
if( $row->wrapper_template === null or $row->wrapper_template == '__none__')
|
||||
{
|
||||
$row->ipb_wrapper = true;
|
||||
$row->show_sidebar = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1559,7 +1559,6 @@ class databases extends Controller
|
||||
}
|
||||
$pageValues['page_folder_id'] = $pageValues['page_folder_id'] ?: 0;
|
||||
$pageValues['page_name'] = $pageValues['page_name'] ?: $values['database_name'];
|
||||
$pageValues['page_show_sidebar'] = true;
|
||||
$pageValues['page_ipb_wrapper'] = true;
|
||||
|
||||
if( $currentPage = $current->page )
|
||||
@@ -1741,7 +1740,7 @@ class databases extends Controller
|
||||
|
||||
foreach( Page::formElements( $current?->page ) as $name => $field )
|
||||
{
|
||||
if( !in_array( $name, [ 'tab_details', 'tab_content', 'page_content', 'page_ipb_wrapper', 'page_show_sidebar', 'page_wrapper_template', 'page_theme', 'page_template' ] ) )
|
||||
if( !in_array( $name, [ 'tab_details', 'tab_content', 'page_content', 'page_ipb_wrapper', 'page_wrapper_template', 'page_theme', 'page_template' ] ) )
|
||||
{
|
||||
if ( is_array( $field ) )
|
||||
{
|
||||
|
||||
@@ -257,16 +257,20 @@ FILE;
|
||||
*/
|
||||
protected function delete() : void
|
||||
{
|
||||
/* Database pages cannot be deleted from here */
|
||||
if( isset( static::$pageToDatabaseMap[ Request::i()->id ] ) )
|
||||
/* Check if we are working with a page or a folder */
|
||||
if( isset( Request::i()->subnode ) and Request::i()->subnode )
|
||||
{
|
||||
Output::i()->error( Member::loggedIn()->language()->addToStack( 'content_acp_err_page_db_delete' ), '3T260/1', 403 );
|
||||
}
|
||||
/* Database pages cannot be deleted from here */
|
||||
if( isset( static::$pageToDatabaseMap[ Request::i()->id ] ) )
|
||||
{
|
||||
Output::i()->error( Member::loggedIn()->language()->addToStack( 'content_acp_err_page_db_delete' ), '3T260/1', 403 );
|
||||
}
|
||||
|
||||
if ( isset( Request::i()->id ) )
|
||||
{
|
||||
Session::i()->csrfCheck();
|
||||
Page::deleteCompiled( Request::i()->id );
|
||||
if ( isset( Request::i()->id ) )
|
||||
{
|
||||
Session::i()->csrfCheck();
|
||||
Page::deleteCompiled( Request::i()->id );
|
||||
}
|
||||
}
|
||||
|
||||
parent::delete();
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"id": 5000031,
|
||||
"name": "5.0.0 Beta 5",
|
||||
"steps": {
|
||||
"queries": true,
|
||||
"lang": true,
|
||||
"theme": true,
|
||||
"themeeditor": false,
|
||||
"javascript": true,
|
||||
"emailTemplates": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": true,
|
||||
"customOptions": false,
|
||||
"customRoutines": true
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"files": {
|
||||
"added": [],
|
||||
"edited": [
|
||||
"cms\/admin\/controllers\/media\/ips.media.main.js",
|
||||
"cms\/admin\/controllers\/templates\/ips.templates.fileEditor.js",
|
||||
"cms\/admin\/controllers\/templates\/ips.templates.fileList.js",
|
||||
"cms\/admin\/controllers\/templates\/ips.templates.main.js",
|
||||
"cms\/admin\/templates\/ips.templates.templates.js"
|
||||
],
|
||||
"removed": []
|
||||
},
|
||||
"orders": {
|
||||
"added": [],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"normal": {
|
||||
"added": [],
|
||||
"edited": [],
|
||||
"removed": [
|
||||
"page_show_sidebar"
|
||||
]
|
||||
},
|
||||
"js": {
|
||||
"added": [],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"1": {
|
||||
"method": "dropColumn",
|
||||
"params": [
|
||||
"cms_pages",
|
||||
"page_show_sidebar"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"html": {
|
||||
"added": [],
|
||||
"edited": [
|
||||
"admin\/media\/media",
|
||||
"front\/submit\/createRecordForm",
|
||||
"admin\/templates\/editor",
|
||||
"admin\/templates\/templates",
|
||||
"front\/widgets\/pagebuilderupload"
|
||||
],
|
||||
"removed": []
|
||||
},
|
||||
"css": {
|
||||
"added": [],
|
||||
"edited": [
|
||||
"admin\/templates\/templates.css"
|
||||
],
|
||||
"removed": []
|
||||
},
|
||||
"resources": {
|
||||
"added": [],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief 5.0.0 Beta 5 Upgrade Code
|
||||
* @author <a href='https://www.invisioncommunity.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) Invision Power Services, Inc.
|
||||
* @license https://www.invisioncommunity.com/legal/standards/
|
||||
* @package Invision Community
|
||||
* @subpackage Pages
|
||||
* @since 12 Nov 2024
|
||||
*/
|
||||
|
||||
namespace IPS\cms\setup\upg_5000031;
|
||||
|
||||
use IPS\Db;
|
||||
use IPS\Image;
|
||||
use function defined;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( $_SERVER['SERVER_PROTOCOL'] ?? 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* 5.0.0 Beta 5 Upgrade Code
|
||||
*/
|
||||
class Upgrade
|
||||
{
|
||||
/**
|
||||
* ...
|
||||
*
|
||||
* @return bool|array If returns TRUE, upgrader will proceed to next step. If it returns any other value, it will set this as the value of the 'extra' GET parameter and rerun this step (useful for loops)
|
||||
*/
|
||||
public function step1() : bool|array
|
||||
{
|
||||
$media = iterator_to_array(
|
||||
Db::i()->select( '*', 'cms_media', [ 'media_is_image=?', 0 ] )
|
||||
);
|
||||
$extensions = Image::supportedExtensions();
|
||||
$toUpdate = [];
|
||||
foreach( $media as $row )
|
||||
{
|
||||
/* We added support for additional image extensions, so flip the flag here */
|
||||
$ext = mb_substr( $row['media_filename'], mb_strrpos( $row['media_filename'], '.' ) + 1 );
|
||||
if( in_array( mb_strtolower( $ext ), $extensions ) )
|
||||
{
|
||||
$toUpdate[] = $row['media_id'];
|
||||
}
|
||||
}
|
||||
|
||||
if( count( $toUpdate ) )
|
||||
{
|
||||
Db::i()->update( 'cms_media', [ 'media_is_image' => 1 ], Db::i()->in( 'media_id', $toUpdate ) );
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
// You can create as many additional methods (step2, step3, etc.) as is necessary.
|
||||
// Each step will be executed in a new HTTP request
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"added": [],
|
||||
"edited": [
|
||||
"pagebuilderupload"
|
||||
],
|
||||
"removed": []
|
||||
}
|
||||
@@ -683,12 +683,9 @@ class Page extends Model implements Permissions
|
||||
), NULL, NULL, NULL, 'page_folder_id' );
|
||||
|
||||
$return['page_ipb_wrapper'] = new YesNo( 'page_ipb_wrapper', ( $item AND $item->id ) ? $item->ipb_wrapper : 1, TRUE, array(
|
||||
'togglesOn' => array( 'page_show_sidebar' ),
|
||||
'togglesOff' => array( 'page_wrapper_template' )
|
||||
'togglesOff' => array( 'page_wrapper_template' )
|
||||
), NULL, NULL, NULL, 'page_ipb_wrapper' );
|
||||
|
||||
$return['page_show_sidebar'] = new YesNo( 'page_show_sidebar', $item ? $item->show_sidebar : TRUE, FALSE, array(), NULL, NULL, NULL, 'page_show_sidebar' );
|
||||
|
||||
$wrapperTemplates = array( '_none_' => Member::loggedIn()->language()->addToStack('cms_page_wrapper_template_none') );
|
||||
foreach( Templates::getTemplates( Templates::RETURN_PAGE + Templates::RETURN_DATABASE_AND_IN_DEV ) as $id => $obj )
|
||||
{
|
||||
@@ -2070,12 +2067,6 @@ class Page extends Model implements Permissions
|
||||
|
||||
Output::i()->output = Theme::i()->getTemplate( 'pages' )->globalWrap( $nav, $this->getPageContent(), $this );
|
||||
|
||||
/* Can only disable sidebar if HTML page */
|
||||
if ( ! $this->show_sidebar )
|
||||
{
|
||||
Output::i()->sidebar['enabled'] = false;
|
||||
}
|
||||
|
||||
if ( isset( Settings::i()->cms_error_page ) and Settings::i()->cms_error_page and Settings::i()->cms_error_page == $this->id )
|
||||
{
|
||||
Output::i()->sidebar['enabled'] = false;
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
namespace IPS\cms\widgets;
|
||||
|
||||
use ErrorException;
|
||||
use Exception;
|
||||
use IPS\Data\Store;
|
||||
use IPS\Helpers\Form;
|
||||
use IPS\Http\Url;
|
||||
@@ -139,7 +139,7 @@ class Codemirror extends Widget
|
||||
Output::i()->jsFiles = array_merge( Output::i()->jsFiles, Output::i()->js( 'front_core.js', 'core' ) );
|
||||
return $this->output( $themeFunction() );
|
||||
}
|
||||
catch( ErrorException $e )
|
||||
catch( Exception $e )
|
||||
{
|
||||
Log::log( $e->getMessage(), 'codeblock' );
|
||||
return "";
|
||||
|
||||
@@ -57,6 +57,12 @@ class Database extends Widget
|
||||
*/
|
||||
public bool $soloWidget = true;
|
||||
|
||||
/**
|
||||
* @brief Set to false if this widget should be hidden from the block list
|
||||
* in the Page Editor
|
||||
*/
|
||||
public static bool $showInBlockList = false;
|
||||
|
||||
/**
|
||||
* @brief If a widget should not be dropped into a particular area (e.g. a database widget in the header), list those areas here
|
||||
*/
|
||||
|
||||
@@ -20,9 +20,11 @@ use IPS\Helpers\Form\Stack;
|
||||
use IPS\Helpers\Form\Upload;
|
||||
use IPS\Helpers\Form\YesNo;
|
||||
use IPS\Widget\Builder;
|
||||
use IPS\Widget\Customizable;
|
||||
use IPS\Widget\StaticCache;
|
||||
use function count;
|
||||
use function defined;
|
||||
use function str_ends_with;
|
||||
|
||||
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
@@ -33,7 +35,7 @@ if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
/**
|
||||
* pagebuilderupload Widget
|
||||
*/
|
||||
class pagebuilderupload extends StaticCache implements Builder
|
||||
class pagebuilderupload extends StaticCache implements Builder, Customizable
|
||||
{
|
||||
/**
|
||||
* @brief Widget Key
|
||||
@@ -86,10 +88,11 @@ class pagebuilderupload extends StaticCache implements Builder
|
||||
}
|
||||
|
||||
$form->add( new Upload( 'pagebuilderupload_upload', $images, FALSE, array( 'multiple' => true, 'storageExtension' => 'core_Attachment', 'allowStockPhotos' => TRUE, 'image' => true ) ) );
|
||||
$form->add( new YesNo( 'pagebuilderupload_slideshow', ( $this->configuration['pagebuilderupload_slideshow'] ?? FALSE ) ) );
|
||||
$form->add( new Stack( 'pagebuilderupload_captions', $captions, FALSE, array( 'stackFieldType' => 'Text' ) ) );
|
||||
$form->add( new Stack( 'pagebuilderupload_urls', $urls, FALSE, array( 'stackFieldType' => 'Url' ) ) );
|
||||
|
||||
// $form->add( new YesNo( 'pagebuilderupload_slideshow', ( $this->configuration['pagebuilderupload_slideshow'] ?? FALSE ) ) );
|
||||
$form->add( new Stack( 'pagebuilderupload_captions', $captions, FALSE, array( 'stackFieldType' => 'Text', 'removeEmptyValues' => false ) ) );
|
||||
$form->add( new Stack( 'pagebuilderupload_urls', $urls, FALSE, array( 'stackFieldType' => 'Url', 'removeEmptyValues' => false ) ) );
|
||||
|
||||
// This is now handled by the page builder
|
||||
$form->add( new Number( 'pagebuilderupload_height', ( $this->configuration['pagebuilderupload_height'] ?? 300 ), FALSE, array( 'unlimited' => 0 ) ) );
|
||||
return $form;
|
||||
}
|
||||
@@ -147,7 +150,7 @@ class pagebuilderupload extends StaticCache implements Builder
|
||||
$images = array();
|
||||
$captions = ( isset( $this->configuration['pagebuilderupload_captions'] ) ) ? $this->configuration['pagebuilderupload_captions'] : array();
|
||||
$urls = ( isset( $this->configuration['pagebuilderupload_urls'] ) ) ? json_decode( $this->configuration['pagebuilderupload_urls'], TRUE ) : array();
|
||||
$autoPlay = ( isset( $this->configuration['pagebuilderupload_slideshow'] ) ) ? $this->configuration['pagebuilderupload_slideshow'] : FALSE;
|
||||
// $autoPlay = ( isset( $this->configuration['pagebuilderupload_slideshow'] ) ) ? $this->configuration['pagebuilderupload_slideshow'] : FALSE;
|
||||
$maxHeight = ( isset( $this->configuration['pagebuilderupload_height'] ) ) ? $this->configuration['pagebuilderupload_height'] : FALSE;
|
||||
|
||||
if ( isset( $this->configuration['pagebuilderupload_upload'] ) )
|
||||
@@ -157,9 +160,29 @@ class pagebuilderupload extends StaticCache implements Builder
|
||||
$images[] = (string) File::get( 'core_Attachment', $img )->url;
|
||||
}
|
||||
|
||||
return $this->output( ( count( $images ) === 1 ? $images[0] : $images ), $captions, $urls, $autoPlay, $maxHeight );
|
||||
return $this->output( ( count( $images ) === 1 ? $images[0] : $images ), $captions, $urls, $maxHeight );
|
||||
}
|
||||
|
||||
return '';
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return string[]
|
||||
*/
|
||||
public function getSupportedLayouts() : array
|
||||
{
|
||||
$layouts = parent::getSupportedLayouts();
|
||||
|
||||
/* Remove support for non-carousels; if we have tabs, there is way too much going on here */
|
||||
$return = [];
|
||||
foreach( $layouts as $k => $v )
|
||||
{
|
||||
if( str_ends_with( $v, '-carousel' ) )
|
||||
{
|
||||
$return[] = $v;
|
||||
}
|
||||
}
|
||||
return $return;
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<javascript app="convert">
|
||||
<file javascript_app="convert" javascript_location="admin" javascript_path="controllers/convert" javascript_name="ips.convert.menu.js" javascript_type="controller" javascript_version="5000030" javascript_position="1000100">/**
|
||||
<file javascript_app="convert" javascript_location="admin" javascript_path="controllers/convert" javascript_name="ips.convert.menu.js" javascript_type="controller" javascript_version="5000031" javascript_position="1000100">/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -45,7 +45,7 @@
|
||||
}
|
||||
} );
|
||||
}(jQuery, _));</file>
|
||||
<file javascript_app="convert" javascript_location="admin" javascript_path="controllers/forms" javascript_name="ips.forms.reactionmapper.js" javascript_type="controller" javascript_version="5000030" javascript_position="1000050">/**
|
||||
<file javascript_app="convert" javascript_location="admin" javascript_path="controllers/forms" javascript_name="ips.forms.reactionmapper.js" javascript_type="controller" javascript_version="5000031" javascript_position="1000050">/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<language>
|
||||
<app key="convert" version="5000030">
|
||||
<app key="convert" version="5000031">
|
||||
<word key="__app_convert" js="0">Converter</word>
|
||||
<word key="menu__convert_manage" js="0">Conversions</word>
|
||||
<word key="menu__convert_manage_manage_start" js="0">Start New Conversion</word>
|
||||
|
||||
@@ -279,5 +279,6 @@
|
||||
"5000027": "5.0.0 Beta 2",
|
||||
"5000028": "5.0.0 Beta 2",
|
||||
"5000029": "5.0.0 Beta 3",
|
||||
"5000030": "5.0.0 Beta 4"
|
||||
"5000030": "5.0.0 Beta 4",
|
||||
"5000031": "5.0.0 Beta 5"
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"id": 5000031,
|
||||
"name": "5.0.0 Beta 5",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeeditor": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -36,26 +36,26 @@ class {class} extends AchievementActionAbstract // NOTE: Other classes exist to
|
||||
* @param Url $url The URL the form is being shown on
|
||||
* @return array
|
||||
*/
|
||||
public function filters( ?array $filters, Url $url ): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
//public function filters( ?array $filters, Url $url ): array
|
||||
//{
|
||||
// return [];
|
||||
//}
|
||||
|
||||
/**
|
||||
* Format filter form values
|
||||
*
|
||||
* @param array $values The values from the form
|
||||
* @return array
|
||||
*/
|
||||
public function formatFilterValues( array $values ): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
//public function formatFilterValues( array $values ): array
|
||||
//{
|
||||
// return [];
|
||||
//}
|
||||
|
||||
/**
|
||||
* Work out if the filters applies for a given action
|
||||
*
|
||||
* Important note for milestones: consider the context. This method is called by \IPS\Member::achievementAction(). If your code
|
||||
* Important note for milestones: consider the context. This method is called by \IPS\Member::achievementAction(). If your code
|
||||
* calls that BEFORE making its change in the database (or there is read/write separation), you will need to add
|
||||
* 1 to the value being considered for milestones
|
||||
*
|
||||
@@ -64,11 +64,11 @@ class {class} extends AchievementActionAbstract // NOTE: Other classes exist to
|
||||
* @param mixed $extra Any additional information about what is happening (e.g. if a post is being made: the post object)
|
||||
* @return bool
|
||||
*/
|
||||
public function filtersMatch( MemberClass $subject, array $filters, mixed $extra = NULL ): bool
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
//public function filtersMatch( MemberClass $subject, array $filters, mixed $extra = NULL ): bool
|
||||
//{
|
||||
// return TRUE;
|
||||
//}
|
||||
|
||||
/**
|
||||
* Get the labels for the people this action might give awards to
|
||||
*
|
||||
|
||||
@@ -52,37 +52,6 @@ class {class} extends AdminNotification
|
||||
{
|
||||
return 'acp_notification_{class}';
|
||||
}
|
||||
|
||||
/**
|
||||
* Can a member access this type of notification?
|
||||
*
|
||||
* @param MemberClass $member The member
|
||||
* @return bool
|
||||
*/
|
||||
public static function permissionCheck( MemberClass $member ): bool
|
||||
{
|
||||
return true;// $member->hasAcpRestriction( ... );
|
||||
}
|
||||
|
||||
/**
|
||||
* Is this type of notification ever optional (controls if it will be selectable as "viewable" in settings)
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public static function mayBeOptional(): bool
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Is this type of notification might recur (controls what options will be available for the email setting)
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public static function mayRecur(): bool
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Notification Title (full HTML, must be escaped where necessary)
|
||||
@@ -123,14 +92,4 @@ class {class} extends AdminNotification
|
||||
{
|
||||
return static::DISMISSIBLE_TEMPORARY;
|
||||
}
|
||||
|
||||
/**
|
||||
* Quick link from popup menu
|
||||
*
|
||||
* @return Url
|
||||
*/
|
||||
public function link(): Url
|
||||
{
|
||||
return parent::link(); // Url::internal( '...' );
|
||||
}
|
||||
}
|
||||
@@ -49,16 +49,4 @@ class {class} extends AdvertisementLocationsAbstract
|
||||
{
|
||||
return array();
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the advertisement can be displayed, based on settings
|
||||
*
|
||||
* @param AdvertisementClass $advertisement
|
||||
* @param string $location
|
||||
* @return bool
|
||||
*/
|
||||
public function canShow( AdvertisementClass $advertisement, string $location ) : bool
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
@@ -15,7 +15,6 @@ namespace IPS\{app}\extensions\core\ApprovalReason;
|
||||
|
||||
use IPS\core\Approval as ApprovalClass;
|
||||
use IPS\Extensions\ApprovalReasonAbstract;
|
||||
use RuntimeException;
|
||||
use function defined;
|
||||
|
||||
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
@@ -41,6 +40,8 @@ class {class} extends ApprovalReasonAbstract
|
||||
|
||||
/**
|
||||
* Parse Reason
|
||||
* Return an array with 2 elements: lang (the language string to use)
|
||||
* and sprintf (an array of replacements)
|
||||
*
|
||||
* @param ApprovalClass $approval Approval row
|
||||
* @return array
|
||||
|
||||
@@ -18,7 +18,6 @@ use IPS\Extensions\ClubAbstract;
|
||||
use IPS\Http\Url;
|
||||
use IPS\Member;
|
||||
use IPS\Node\Model;
|
||||
use RuntimeException;
|
||||
use function defined;
|
||||
|
||||
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
@@ -35,8 +34,8 @@ class {class} extends ClubAbstract
|
||||
/**
|
||||
* Tabs
|
||||
*
|
||||
* @param \IPS\Member\Club $club The club
|
||||
* @param \IPS\Node\Model $container Container
|
||||
* @param Club $club The club
|
||||
* @param Model|null $container Container
|
||||
* @return array
|
||||
*/
|
||||
public function tabs( Club $club, ?Model $container = NULL ): array
|
||||
|
||||
@@ -19,6 +19,7 @@ use IPS\Http\Url;
|
||||
use IPS\Member as MemberClass;
|
||||
use IPS\Output;
|
||||
use IPS\Theme;
|
||||
use IPS\Settings;
|
||||
use LogicException;
|
||||
use function defined;
|
||||
|
||||
|
||||
@@ -30,12 +30,6 @@ if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
*/
|
||||
class {class} extends ContentRouterAbstract
|
||||
{
|
||||
/**
|
||||
* @brief Can be shown in similar content
|
||||
*/
|
||||
public bool $similarContent = FALSE;
|
||||
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
|
||||
@@ -62,52 +62,6 @@ class {class} extends CustomFieldAbstract
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Can be overridden by individual extension implementations
|
||||
* to allow for a field to be available only in certain connditions
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public static function isEnabled() : bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* A list of form elements that will be toggled on when this field
|
||||
* type is selected
|
||||
* @see CustomField::$additionalFieldToggles
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function fieldTypeToggles() : array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Add fields to the field creation form
|
||||
*
|
||||
* @param Form $form
|
||||
* @param CustomField $field The field currently being modified
|
||||
* @return void
|
||||
*/
|
||||
public static function form( Form $form, CustomField $field ) : void
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Process values from the ACP Custom Field form
|
||||
*
|
||||
* @param array $values
|
||||
* @return array
|
||||
*/
|
||||
public static function formatFormValues( array $values ) : array
|
||||
{
|
||||
return $values;
|
||||
}
|
||||
|
||||
/**
|
||||
* Display Value
|
||||
* @see CustomField::displayValue()
|
||||
|
||||
@@ -76,39 +76,4 @@ class {class} extends EditorLocationsAbstract
|
||||
return NULL;
|
||||
// return Url::internal( ... );
|
||||
}
|
||||
|
||||
/**
|
||||
* Rebuild content post-upgrade
|
||||
*
|
||||
* @param int|null $offset Offset to start from
|
||||
* @param int|null $max Maximum to parse
|
||||
* @return int Number completed
|
||||
* @note This method is optional and will only be called if it exists
|
||||
*/
|
||||
//public function rebuildContent( ?int $offset, ?int $max ): int
|
||||
//{
|
||||
//}
|
||||
|
||||
/**
|
||||
* Rebuild content to add or remove lazy loading
|
||||
*
|
||||
* @param int|null $offset Offset to start from
|
||||
* @param int|null $max Maximum to parse
|
||||
* @param bool $status Enable/Disable lazy loading
|
||||
* @return int Number completed
|
||||
* @note This method is optional and will only be called if it exists
|
||||
*/
|
||||
//public function rebuildLazyLoad( ?int $offset, ?int $max, bool $status=TRUE ): int
|
||||
//{
|
||||
//}
|
||||
|
||||
/**
|
||||
* Total content count to be used in progress indicator
|
||||
*
|
||||
* @return int Total Count
|
||||
*/
|
||||
//public function contentCount() : int
|
||||
//{
|
||||
// return \IPS\Db::i()->select( 'COUNT(*) as count', '...', "..." )->setKeyField('count')->first();
|
||||
//}
|
||||
}
|
||||
@@ -45,28 +45,6 @@ class {class} extends FrontNavigationAbstract
|
||||
return MemberClass::loggedIn()->language()->addToStack('frontnavigation_{app}');
|
||||
}
|
||||
|
||||
/**
|
||||
* Can this item be used at all?
|
||||
* For example, if this will link to a particular feature which has been diabled, it should
|
||||
* not be available, even if the user has permission
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public static function isEnabled(): bool
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Can the currently logged in user access the content this item links to?
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function canAccessContent(): bool
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Title
|
||||
*
|
||||
@@ -96,15 +74,4 @@ class {class} extends FrontNavigationAbstract
|
||||
{
|
||||
return Dispatcher::i()->application->directory === '{app}';
|
||||
}
|
||||
|
||||
/**
|
||||
* Children
|
||||
*
|
||||
* @param bool $noStore If true, will skip datastore and get from DB (used for ACP preview)
|
||||
* @return array|null
|
||||
*/
|
||||
public function children( bool $noStore=FALSE ): ?array
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
@@ -52,15 +52,4 @@ class {class} extends GroupFormAbstract
|
||||
{
|
||||
$group->example = $values['example'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Can this group be deleted?
|
||||
*
|
||||
* @param SystemGroup $group The group
|
||||
* @return bool
|
||||
*/
|
||||
public function canDelete( SystemGroup $group ): bool
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
@@ -33,39 +33,6 @@ if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
class {class} extends IpAddressesAbstract
|
||||
{
|
||||
/**
|
||||
* Removes the logged IP address
|
||||
*
|
||||
* @param int $time
|
||||
* @return void
|
||||
*/
|
||||
public function pruneIpAddresses( int $time ) : void
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Supported in the ACP IP address lookup tool?
|
||||
*
|
||||
* @return bool
|
||||
* @note If the method does not exist in an extension, the result is presumed to be TRUE
|
||||
*/
|
||||
public function supportedInAcp(): bool
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Supported in the ModCP IP address lookup tool?
|
||||
*
|
||||
* @return bool
|
||||
* @note If the method does not exist in an extension, the result is presumed to be TRUE
|
||||
*/
|
||||
public function supportedInModCp(): bool
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Find Records by IP
|
||||
*
|
||||
* @param string $ip The IP Address
|
||||
|
||||
@@ -28,16 +28,6 @@ if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
*/
|
||||
class {class} extends LiveSearchAbstract
|
||||
{
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
/* Check Permissions */
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the search results
|
||||
*
|
||||
|
||||
@@ -18,57 +18,5 @@ if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
*/
|
||||
class {class} extends LoaderAbstract
|
||||
{
|
||||
/**
|
||||
* Additional CSS files to load
|
||||
*
|
||||
* @return array<string|Url>
|
||||
*/
|
||||
public function css(): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Additional JS files to load
|
||||
*
|
||||
* @return array<string|Url>
|
||||
*/
|
||||
public function js(): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
* If a redirect is needed, return the URL
|
||||
* or NULL to continue
|
||||
*
|
||||
* @return Url|null
|
||||
*/
|
||||
public function checkForRedirect() : Url|null
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show a custom error message or null to use the default
|
||||
*
|
||||
* @param string $message
|
||||
* @param mixed $code
|
||||
* @param int $httpStatusCode
|
||||
* @return string|null
|
||||
*/
|
||||
public function customError( string $message, mixed $code, int $httpStatusCode ) : string|null
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Run custom code right on Dispatcher::finish()
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function onFinish() : void
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -49,16 +49,4 @@ class {class} extends MainTab
|
||||
'IPS\{app}\extensions\core\MemberACPProfileBlocks\BlockName',
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get right-column blocks
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rightColumnBlocks(): array
|
||||
{
|
||||
return array(
|
||||
'IPS\{app}\extensions\core\MemberACPProfileBlocks\BlockName',
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -35,7 +35,6 @@ class {class} extends MemberExportPiiAbstract
|
||||
*/
|
||||
public function getData( MemberClass $member ): array
|
||||
{
|
||||
$return = array();
|
||||
return $return;
|
||||
return array();
|
||||
}
|
||||
}
|
||||
@@ -76,31 +76,4 @@ class {class} extends MemberFilterAbstract
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* Callback for member retrieval database query
|
||||
* Can be used to set joins
|
||||
*
|
||||
* @param array $data The array returned from the save() method
|
||||
* @param Select $query The query
|
||||
* @return void
|
||||
*/
|
||||
public function queryCallback( array $data, Select $query ) : void
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine if a member matches specified filters
|
||||
*
|
||||
* @note This is only necessary if availableIn() includes group_promotions
|
||||
* @param MemberClass $member Member object to check
|
||||
* @param array $filters Previously defined filters
|
||||
* @param object|NULL $object Calling class
|
||||
* @return bool
|
||||
*/
|
||||
public function matches( MemberClass $member, array $filters, ?object $object=NULL ): bool
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
@@ -29,66 +29,4 @@ if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
*/
|
||||
class {class} extends Restriction
|
||||
{
|
||||
/**
|
||||
* Modify Edit Restrictions form
|
||||
*
|
||||
* @param Form $form The form
|
||||
* @return void
|
||||
*/
|
||||
public function form( Form $form ) : void
|
||||
{
|
||||
// $form->add( ... );
|
||||
}
|
||||
|
||||
/**
|
||||
* Save Form
|
||||
*
|
||||
* @param array $values Values from form
|
||||
* @return array
|
||||
*/
|
||||
public function save( array $values ): array
|
||||
{
|
||||
$return = array();
|
||||
|
||||
// $return['my_restriction'] = array( 'old' => $oldValue, 'new' => $values['my_restriction'] ); // used in changesForHistory()
|
||||
// Db::i()->update( ... ); // Actually save the value
|
||||
|
||||
return $return;
|
||||
}
|
||||
|
||||
/**
|
||||
* What restrictions are active on the account?
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function activeRestrictions(): array
|
||||
{
|
||||
$return = array();
|
||||
|
||||
/*if ( ... )
|
||||
{
|
||||
$return[] = 'my_restricion';
|
||||
}*/
|
||||
|
||||
return $return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get details of a change to show on history
|
||||
*
|
||||
* @param array $changes Changes as set in save()
|
||||
* @param array $row Row of data from member history table.
|
||||
* @return array
|
||||
*/
|
||||
public static function changesForHistory( array $changes, array $row ): array
|
||||
{
|
||||
$return = array();
|
||||
|
||||
if ( isset( $changes['my_restriction'] ) )
|
||||
{
|
||||
$return[] = MemberClass::loggedIn()->language()->addToStack( 'changed_my_restriction', FALSE, array( 'sprintf' => array( $changes['my_restriction']['new'], $changes['my_restriction']['new'] ) ) );
|
||||
}
|
||||
|
||||
return $return;
|
||||
}
|
||||
}
|
||||
@@ -52,27 +52,4 @@ class {class} extends ModeratorPermissionsAbstract
|
||||
'can_delete_course_content' => "YesNo",*/
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* After change
|
||||
*
|
||||
* @param array $moderator The moderator
|
||||
* @param array $changed Values that were changed
|
||||
* @return void
|
||||
*/
|
||||
public function onChange( array $moderator, array $changed ) : void
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* After delete
|
||||
*
|
||||
* @param array $moderator The moderator
|
||||
* @return void
|
||||
*/
|
||||
public function onDelete( array $moderator ) : void
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -60,42 +60,6 @@ class {class} extends NotificationsAbstract
|
||||
//...
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Save "extra" value
|
||||
*
|
||||
* @param MemberClass|NULL $member The member or NULL if this is the admin setting defaults
|
||||
* @param string $key The key
|
||||
* @param bool $value The value
|
||||
* @return void
|
||||
*/
|
||||
public static function saveExtra( ?MemberClass $member, string $key, bool $value ) : void
|
||||
{
|
||||
// You can perform extra processing here to save values in a specific manner if needed
|
||||
}
|
||||
|
||||
/**
|
||||
* Disable all "extra" values for a particular type
|
||||
*
|
||||
* @param MemberClass|NULL $member The member or NULL if this is the admin setting defaults
|
||||
* @param string $method The method type
|
||||
* @return void
|
||||
*/
|
||||
public static function disableExtra( ?MemberClass $member, string $method ) : void
|
||||
{
|
||||
// You can disable extra values for a given type, such as if a setting means the notification preference is irrelevant
|
||||
}
|
||||
|
||||
/**
|
||||
* Reset "extra" value to the default for all accounts
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public static function resetExtra() : void
|
||||
{
|
||||
// Any extra processing you may need to perform when resetting all members to default notification options.
|
||||
// Typically you won't have to do anything here unless you have custom settings
|
||||
}
|
||||
|
||||
// For each type of notification you need a method like this which controls what will be displayed when the user clicks on the notification icon in the header:
|
||||
// Note that for each type of notification you must *also* create email templates. See documentation for details: https://remoteservices.invisionpower.com/docs/devdocs-notifications
|
||||
|
||||
@@ -49,17 +49,6 @@ class {class} extends ProfileStepsAbstract
|
||||
{
|
||||
return array( );
|
||||
}
|
||||
|
||||
/**
|
||||
* Can the actions have multiple choices?
|
||||
*
|
||||
* @param string $action Action key (basic_profile, etc)
|
||||
* @return bool|null
|
||||
*/
|
||||
public static function actionMultipleChoice( string $action ): ?bool
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Has a specific step been completed?
|
||||
@@ -72,54 +61,6 @@ class {class} extends ProfileStepsAbstract
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Can be set as required?
|
||||
*
|
||||
* @return array
|
||||
* @note This is intended for items which have their own independent settings and dedicated enable pages, such as MFA and Social Login integration
|
||||
*/
|
||||
public static function canBeRequired(): array
|
||||
{
|
||||
return array();
|
||||
}
|
||||
|
||||
/**
|
||||
* Action URL
|
||||
*
|
||||
* @param string $action The action
|
||||
* @param MemberClass|NULL $member The member, or NULL for currently logged in
|
||||
* @return Url|null
|
||||
*/
|
||||
public function url( string $action, ?MemberClass $member = NULL ): ?Url
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Post ACP Save
|
||||
*
|
||||
* @param ProfileStep $step The step
|
||||
* @param array $values Form Values
|
||||
* @return void
|
||||
*/
|
||||
public function postAcpSave( ProfileStep $step, array $values ) : void
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Format Form Values
|
||||
*
|
||||
* @param array $values The values from the form
|
||||
* @param MemberClass $member The member
|
||||
* @param Form $form The form
|
||||
* @return void
|
||||
*/
|
||||
public static function formatFormValues( array $values, MemberClass $member, Form $form ) : void
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Wizard Steps
|
||||
@@ -131,15 +72,4 @@ class {class} extends ProfileStepsAbstract
|
||||
{
|
||||
return array( );
|
||||
}
|
||||
|
||||
/**
|
||||
* Post Delete
|
||||
*
|
||||
* @param ProfileStep $step The step
|
||||
* @return void
|
||||
*/
|
||||
public function onDelete( ProfileStep $step ) : void
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -64,16 +64,4 @@ class {class} extends QueueAbstract
|
||||
{
|
||||
return array( 'text' => 'Doing something...', 'complete' => 50 );
|
||||
}
|
||||
|
||||
/**
|
||||
* Perform post-completion processing
|
||||
*
|
||||
* @param array $data Data returned from preQueueData
|
||||
* @param bool $processed Was anything processed or not? If preQueueData returns NULL, this will be FALSE.
|
||||
* @return void
|
||||
*/
|
||||
public function postComplete( array $data, bool $processed = TRUE ) : void
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -28,59 +28,6 @@ if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
*/
|
||||
class {class} extends SSOAbstract
|
||||
{
|
||||
/**
|
||||
* Determine if the extension is currently enabled
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function isEnabled(): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an array of setting keys that will be overridden by this extension
|
||||
* Example: post_before_registering might always return a value of 0
|
||||
* Would return an array like [ 'post_before_registering' => 0 ]
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function overrideSettings(): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Return URL guest should be redirected to for login
|
||||
*
|
||||
* @return Url|null
|
||||
*/
|
||||
public function loginUrl(): Url|null
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return URL guest should be redirect to for login
|
||||
*
|
||||
* @param Url $redirectUrl
|
||||
* @return Url|null
|
||||
*/
|
||||
public function logoutUrl( Url $redirectUrl ): Url|null
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return URL user should visit to change display name
|
||||
*
|
||||
* @return Url|null
|
||||
*/
|
||||
public function displayNameChange(): Url|null
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* Custom logic executed on session init
|
||||
*
|
||||
@@ -103,14 +50,4 @@ class {class} extends SSOAbstract
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Does SSO support login as?
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function supportsLoginAs(): bool
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
@@ -21,77 +21,8 @@ if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
*/
|
||||
class {class} extends UIComment
|
||||
{
|
||||
|
||||
/**
|
||||
* @brief Class to extend
|
||||
*/
|
||||
public static ?string $class = '{comment}';
|
||||
|
||||
/**
|
||||
* Can be used to add additional css classes to the comment
|
||||
*
|
||||
* @param BaseComment $comment
|
||||
* @return string
|
||||
*/
|
||||
public function css( BaseComment $comment ): string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Can be used to add additional data attributes to the comment
|
||||
*
|
||||
* @param BaseComment $comment
|
||||
* @return string
|
||||
*/
|
||||
public function dataAttributes( BaseComment $comment ): string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Can be used to attach additional content to the author panel
|
||||
*
|
||||
* @param BaseComment $comment
|
||||
* @return string
|
||||
*/
|
||||
public function authorPanel( BaseComment $comment ): string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* returns additional menu items for the comment menu
|
||||
*
|
||||
* @param BaseComment $comment
|
||||
* @return array<string,MenuItem>
|
||||
*/
|
||||
public function menuItems( BaseComment $comment ): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Add elements to the comment form
|
||||
*
|
||||
* @param BaseComment|null $comment
|
||||
* @param BaseItem $item
|
||||
* @return array<string,FormAbstract>
|
||||
*/
|
||||
public function formElements( ?BaseComment $comment, BaseItem $item ): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Triggered after the comment form is saved
|
||||
*
|
||||
* @param BaseComment $comment
|
||||
* @param array $values
|
||||
* @return void
|
||||
*/
|
||||
public function formPostSave( BaseComment $comment, array $values ): void
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -26,141 +26,4 @@ class {class} extends UIItem
|
||||
* @brief Class to extend
|
||||
*/
|
||||
public static ?string $class = '{item}';
|
||||
|
||||
/**
|
||||
* Can be used to add additional css classes to the item
|
||||
*
|
||||
* @param BaseItem $item
|
||||
* @return string
|
||||
*/
|
||||
public function css( BaseItem $item ): string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Can be used to add additional data attributes to the item
|
||||
*
|
||||
* @param BaseItem $item
|
||||
* @return string
|
||||
*/
|
||||
public function dataAttributes( BaseItem $item ): string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* returns additional menu items for the moderation menu
|
||||
*
|
||||
* @param BaseItem $item
|
||||
* @return array
|
||||
*/
|
||||
public function menuItems( BaseItem $item ): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns additional badge icons to display in the header
|
||||
*
|
||||
* @param BaseItem $item
|
||||
* @return array<Icon>
|
||||
*/
|
||||
public function badges( BaseItem $item ) : array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Add elements to the item form.
|
||||
* This method returns all elements that will be added.
|
||||
* By default, all elements will be added in order at the end of the form.
|
||||
* To specify placement within the form, @see FormAbstract::setPosition().
|
||||
*
|
||||
* @param BaseItem|null $item
|
||||
* @param Model|null $container
|
||||
* @return array<string,FormAbstract>
|
||||
*/
|
||||
public function formElements( ?BaseItem $item, ?Model $container ): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Called after the Item form is saved
|
||||
*
|
||||
* @param BaseItem $item
|
||||
* @param array $values
|
||||
* @return void
|
||||
*/
|
||||
public function formPostSave( BaseItem $item, array $values ): void
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Display content in the contextual sidebar
|
||||
*
|
||||
* @param BaseItem $item
|
||||
* @return string
|
||||
*/
|
||||
public function sidebar( BaseItem $item ) : string
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
/**
|
||||
* Add custom sort options to the content table for this class
|
||||
* @note $item will ALWAYS be null.
|
||||
*
|
||||
* @param BaseItem|null $item
|
||||
* @param Content $table
|
||||
* @return array
|
||||
*/
|
||||
public function contentTableSortOptions( ?BaseItem $item, Content $table ) : array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the sort direction for the selected sort option,
|
||||
* or NULL to use the default parent method.
|
||||
*
|
||||
* @note $item will ALWAYS be null.
|
||||
*
|
||||
* @param BaseItem|null $item
|
||||
* @param Content $table
|
||||
* @param string $sortBy
|
||||
* @return string|null
|
||||
*/
|
||||
public function contentTableSortDirection( ?BaseItem $item, Content $table, string $sortBy ) : string|null
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add custom filters to the content table for this class
|
||||
* @note $item will ALWAYS be null.
|
||||
*
|
||||
* @param BaseItem|null $item
|
||||
* @param Content $table
|
||||
* @return array
|
||||
*/
|
||||
public function contentTableFilters( ?BaseItem $item, Content $table ) : array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Add custom conditions to the where clause for a content table.
|
||||
* @note $item will ALWAYS be null.
|
||||
*
|
||||
* @param BaseItem|null $item
|
||||
* @param Content $table
|
||||
* @return array
|
||||
*/
|
||||
public function contentTableWhere( ?BaseItem $item, Content $table ) : array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
}
|
||||
@@ -24,86 +24,4 @@ class {class} extends UINode
|
||||
* @brief Class to extend
|
||||
*/
|
||||
public static ?string $class = '{node}';
|
||||
|
||||
/**
|
||||
* Can be used to add additional css classes to the node
|
||||
*
|
||||
* @param Model $node
|
||||
* @return array
|
||||
*/
|
||||
public function css( Model $node ): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Can be used to add additional data attributes to the node
|
||||
*
|
||||
* @param Model $node
|
||||
* @return string
|
||||
*/
|
||||
public function dataAttributes( Model $node ): string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Can be used to add buttons to the ACP tree row
|
||||
* and to the view page in the ACP
|
||||
*
|
||||
* @param Model $node
|
||||
* @return array
|
||||
*/
|
||||
public function rowButtons( Model $node ): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns additional HTML to be displayed in the ACP tree row
|
||||
*
|
||||
* @param Model $node
|
||||
* @return string
|
||||
*/
|
||||
public function rowHtml( Model $node ) : string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a badge to be displayed in the ACP tree row
|
||||
*
|
||||
* @param Model $node
|
||||
* @return null|array Null for no badge, or an array of badge data (0 => CSS class type, 1 => language string, 2 => optional raw HTML to show instead of language string)
|
||||
*/
|
||||
public function rowBadge( Model $node ) : array|null
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add elements to the Node form
|
||||
* This method returns all elements that will be added.
|
||||
* By default, all elements will be added in order at the end of the form.
|
||||
* To specify placement within the form, @see FormAbstract::setPosition().
|
||||
*
|
||||
* @param Model $node
|
||||
* @return array<string,FormAbstract>
|
||||
*/
|
||||
public function formElements( Model $node ): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Called after the Node form is saved
|
||||
*
|
||||
* @param Model $node
|
||||
* @param array $values
|
||||
* @return void
|
||||
*/
|
||||
public function formPostSave( Model $node, array $values ): void
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -26,72 +26,4 @@ class {class} extends UIReview
|
||||
* @brief Class to extend
|
||||
*/
|
||||
public static ?string $class = '{review}';
|
||||
|
||||
/**
|
||||
* Can be used to add additional css classes to the comment
|
||||
*
|
||||
* @param BaseComment $comment
|
||||
* @return string
|
||||
*/
|
||||
public function css( BaseComment $comment ): string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Can be used to add additional data attributes to the comment
|
||||
*
|
||||
* @param BaseComment $comment
|
||||
* @return string
|
||||
*/
|
||||
public function dataAttributes( BaseComment $comment ): string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Can be used to attach additional content to the author panel
|
||||
*
|
||||
* @param BaseComment $comment
|
||||
* @return string
|
||||
*/
|
||||
public function authorPanel( BaseComment $comment ): string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* returns additional menu items for the comment menu
|
||||
*
|
||||
* @param BaseComment $comment
|
||||
* @return array<string,MenuItem>
|
||||
*/
|
||||
public function menuItems( BaseComment $comment ): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Add elements to the comment form
|
||||
*
|
||||
* @param BaseComment|null $comment
|
||||
* @param BaseItem $item
|
||||
* @return array<string,FormAbstract>
|
||||
*/
|
||||
public function formElements( ?BaseComment $comment, BaseItem $item ): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Triggered after the comment form is saved
|
||||
*
|
||||
* @param BaseComment $comment
|
||||
* @param array $values
|
||||
* @return void
|
||||
*/
|
||||
public function formPostSave( BaseComment $comment, array $values ): void
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -27,33 +27,5 @@ if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
*/
|
||||
class {class} extends UninstallAbstract
|
||||
{
|
||||
/**
|
||||
* Code to execute before the application has been uninstalled
|
||||
*
|
||||
* @param string $application Application directory
|
||||
* @return void
|
||||
*/
|
||||
public function preUninstall( string $application ) : void
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Code to execute after the application has been uninstalled
|
||||
*
|
||||
* @param string $application Application directory
|
||||
* @return void
|
||||
*/
|
||||
public function postUninstall( string $application ) : void
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Code to execute when other applications or plugins are uninstalled
|
||||
*
|
||||
* @param string $application Application directory
|
||||
* @return void
|
||||
*/
|
||||
public function onOtherUninstall( string $application ) : void
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -20,58 +20,5 @@ if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
*/
|
||||
class {class} extends MenuExtension
|
||||
{
|
||||
/**
|
||||
* Used to add additional links to the user account menu
|
||||
*
|
||||
* @param string $position ( can be content, settings, logout )
|
||||
* @return array<MenuItem>
|
||||
*/
|
||||
public function accountMenu( string $position = 'content' ): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Used to add items to the mobile navigation Menu
|
||||
*
|
||||
* @param string $position (can be content, settings, logout)
|
||||
* @return array<MenuItem>
|
||||
*/
|
||||
public function mobileMenu( string $position = 'content' ) : array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Used to add additional content to userbar
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function userNav(): string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Used to add content to the mobile navigation header
|
||||
*
|
||||
* @param string $position Where the code will be inserted (header/footer)
|
||||
* @param string $iconLocation Where the main icons are currently located (header/footer)
|
||||
* @return string
|
||||
*/
|
||||
public function mobileNav( string $position, string $iconLocation = 'footer' ) : string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Used to add items to the user profile menu
|
||||
*
|
||||
* @param MemberClass $member Member whose profile is being viewed
|
||||
* @return array<MenuItem>
|
||||
*/
|
||||
public function editProfileMenu( MemberClass $member ) : array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
}
|
||||
@@ -16,6 +16,7 @@ namespace IPS\{app}\listeners;
|
||||
use IPS\Content as ContentClass;
|
||||
use IPS\Content\Comment as CommentClass;
|
||||
use IPS\Content\Item as ItemClass;
|
||||
use IPS\Db;
|
||||
use IPS\Events\ListenerType\ContentListenerType;
|
||||
use IPS\Node\Model;
|
||||
use function defined;
|
||||
@@ -36,120 +37,4 @@ class {filename} extends ContentListenerType
|
||||
* @var string
|
||||
*/
|
||||
public static string $class = {class};
|
||||
|
||||
/**
|
||||
* Fired when the item/comment is initialized (in constructFromData).
|
||||
* Useful for loading additional tables or properties
|
||||
*
|
||||
* @param ContentClass $object
|
||||
* @return void
|
||||
*/
|
||||
public function onLoad( ContentClass $object ) : void
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Fired before an item is created/edited
|
||||
*
|
||||
* @note This event is NOT fired for comments.
|
||||
* @param ContentClass $object
|
||||
* @param array $values
|
||||
* @param bool $new TRUE when fired before create; FALSE when fired before edit
|
||||
* @return void
|
||||
*/
|
||||
public function onBeforeCreateOrEdit( ContentClass $object, array $values, bool $new = FALSE ) : void
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Fired after an item/comment is created/edited
|
||||
*
|
||||
* @param ContentClass $object
|
||||
* @param array $values
|
||||
* @param bool $new TRUE when fired before create; FALSE when fired before edit
|
||||
* @return void
|
||||
*/
|
||||
public function onCreateOrEdit( ContentClass $object, array $values, bool $new = FALSE ) : void
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Fired when an item/comment is deleted
|
||||
*
|
||||
* @param ContentClass $object
|
||||
* @return void
|
||||
*/
|
||||
public function onDelete( ContentClass $object ) : void
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Fired when an action is taken on a particular item/comment.
|
||||
* Example: pin, unpin, hide, unhide
|
||||
* Note: merge is handled with a separate event
|
||||
*
|
||||
* @param ContentClass $object
|
||||
* @param string $action
|
||||
* @return void
|
||||
*/
|
||||
public function onStatusChange( ContentClass $object, string $action ) : void
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/***
|
||||
* Fired when items/comments are merged
|
||||
* Note: this is fired AFTER the merge is complete.
|
||||
*
|
||||
* @param ContentClass $object
|
||||
* @param array $items Old items/comments merged into this one
|
||||
* @return void
|
||||
*/
|
||||
public function onMerge( ContentClass $object, array $items ) : void
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Fired when an item is moved.
|
||||
* Note: this is fired AFTER the move is complete.
|
||||
*
|
||||
* @param ItemClass $item
|
||||
* @param Model $oldContainer Previous node
|
||||
* @param bool $keepLink
|
||||
* @return void
|
||||
*/
|
||||
public function onItemMove( ItemClass $item, Model $oldContainer, bool $keepLink = FALSE ) : void
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Fired when a comment is moved.
|
||||
* Note: this is fired AFTER the move is complete.
|
||||
*
|
||||
* @param CommentClass $comment
|
||||
* @param ItemClass $oldItem
|
||||
* @param bool $skip
|
||||
* @return void
|
||||
*/
|
||||
public function onCommentMove( CommentClass $comment, ItemClass $oldItem, bool $skip = FALSE ) : void
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/***
|
||||
* Fired when an item is viewed, and runs updateViews() via the ViewUpdates trait
|
||||
*
|
||||
* @param ItemClass $item
|
||||
* @return void
|
||||
*/
|
||||
public function onItemView( ItemClass $item ) : void
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -13,6 +13,7 @@ namespace IPS\{app}\listeners;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
|
||||
use IPS\Db;
|
||||
use IPS\Events\ListenerType\InvoiceListenerType;
|
||||
use IPS\Member as MemberClass;
|
||||
use IPS\nexus\Invoice as InvoiceClass;
|
||||
@@ -29,40 +30,5 @@ if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
*/
|
||||
class {filename} extends InvoiceListenerType
|
||||
{
|
||||
/**
|
||||
* Fired when the invoice status is changed (e.g. unpaid to paid)
|
||||
*
|
||||
* @param InvoiceClass $invoice
|
||||
* @param string $status The new status
|
||||
* @return void
|
||||
*/
|
||||
public function onStatusChange( InvoiceClass $invoice, string $status ) : void
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Fired when a member is created by an invoice.
|
||||
*
|
||||
* @param InvoiceClass $invoice
|
||||
* @param MemberClass $member The new member
|
||||
* @param array $guestData The original values of InvoiceClass::$guest_data
|
||||
* @return void
|
||||
*/
|
||||
public function onCreateAccountForGuest( InvoiceClass $invoice, MemberClass $member, array $guestData ) : void
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Fired at each checkout step (before submission)
|
||||
*
|
||||
* @param InvoiceClass $invoice
|
||||
* @param string $step The checkout step (customer|pay)
|
||||
* @return void
|
||||
*/
|
||||
public function onCheckout( InvoiceClass $invoice, string $step ) : void
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -14,6 +14,7 @@ namespace IPS\{app}\listeners;
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
|
||||
use IPS\calendar\Event;
|
||||
use IPS\Db;
|
||||
use IPS\Events\ListenerType\MemberListenerType;
|
||||
use IPS\Http\Url;
|
||||
use IPS\Member as MemberClass;
|
||||
@@ -33,217 +34,5 @@ if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
*/
|
||||
class {filename} extends MemberListenerType
|
||||
{
|
||||
/**
|
||||
* Member account has been created
|
||||
*
|
||||
* @param MemberClass $member New member account
|
||||
* @return void
|
||||
*/
|
||||
public function onCreateAccount( MemberClass $member ) : void
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Member has validated
|
||||
*
|
||||
* @param MemberClass $member Member validated
|
||||
* @return void
|
||||
*/
|
||||
public function onValidate( MemberClass $member ) : void
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Member has logged on
|
||||
*
|
||||
* @param MemberClass $member Member that logged in
|
||||
* @return void
|
||||
*/
|
||||
public function onLogin( MemberClass $member ) : void
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Member has logged out
|
||||
*
|
||||
* @param MemberClass $member Member that logged out
|
||||
* @param Url $returnUrl The URL to send the user back to
|
||||
* @return void
|
||||
*/
|
||||
public function onLogout( MemberClass $member, Url $returnUrl ) : void
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Member account has been updated
|
||||
*
|
||||
* @param $member MemberClass member being updated
|
||||
* @param $changes array The changes
|
||||
* @return void
|
||||
*/
|
||||
public function onProfileUpdate( MemberClass $member, array $changes ) : void
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Member is flagged as spammer
|
||||
*
|
||||
* @param $member MemberClass The member
|
||||
* @return void
|
||||
*/
|
||||
public function onSetAsSpammer( MemberClass $member ) : void
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Member is unflagged as spammer
|
||||
*
|
||||
* @param $member MemberClass The member
|
||||
* @return void
|
||||
*/
|
||||
public function onUnSetAsSpammer( MemberClass $member ) : void
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Member is merged with another member
|
||||
*
|
||||
* @param MemberClass $member Member being kept
|
||||
* @param MemberClass $member2 Member being removed
|
||||
* @return void
|
||||
*/
|
||||
public function onMerge( MemberClass $member, MemberClass $member2 ) : void
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Member is deleted
|
||||
*
|
||||
* @param $member MemberClass The member
|
||||
* @return void
|
||||
*/
|
||||
public function onDelete( MemberClass $member ) : void
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Email address is changed
|
||||
*
|
||||
* @param MemberClass $member The member
|
||||
* @param string $new New email address
|
||||
* @param string $old Old email address
|
||||
* @return void
|
||||
*/
|
||||
public function onEmailChange( MemberClass $member, string $new, string $old ) : void
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Password is changed
|
||||
*
|
||||
* @param MemberClass $member The member
|
||||
* @param string $new New password, wrapped in an object that can be cast to a string so it doesn't show in any logs
|
||||
* @return void
|
||||
*/
|
||||
public function onPassChange( MemberClass $member, string $new ) : void
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* When a member is added to a club
|
||||
*
|
||||
* @param MemberClass $member
|
||||
* @param Club $club
|
||||
* @return void
|
||||
*/
|
||||
public function onJoinClub( MemberClass $member, Club $club ) : void
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* When a member leaves a club
|
||||
*
|
||||
* @param MemberClass $member
|
||||
* @param Club $club
|
||||
* @return void
|
||||
*/
|
||||
public function onLeaveClub( MemberClass $member, Club $club ) : void
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* When a member RSVPs to an event
|
||||
*
|
||||
* @param MemberClass $member
|
||||
* @param Event $event
|
||||
* @param int $response The RSVP response
|
||||
* @return void
|
||||
*/
|
||||
public function onEventRsvp( MemberClass $member, Event $event, int $response ) : void
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Member reacted to content
|
||||
*
|
||||
* @param MemberClass $member
|
||||
* @param ContentClass $content
|
||||
* @param Reaction $reaction
|
||||
* @return void
|
||||
*/
|
||||
public function onReact( MemberClass $member, ContentClass $content, Reaction $reaction ) : void
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Member removed reaction
|
||||
*
|
||||
* @param MemberClass $member
|
||||
* @param ContentClass $content
|
||||
* @return void
|
||||
*/
|
||||
public function onUnreact( MemberClass $member, ContentClass $content ) : void
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Member follows content
|
||||
*
|
||||
* @param MemberClass $member
|
||||
* @param object $object
|
||||
* @param bool $isAnonymous
|
||||
* @return void
|
||||
*/
|
||||
public function onFollow( MemberClass $member, object $object, bool $isAnonymous ): void
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Member unfollows content
|
||||
*
|
||||
* @param MemberClass $member
|
||||
* @param object $object
|
||||
* @return void
|
||||
*/
|
||||
public function onUnfollow( MemberClass $member, object $object ) : void
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -13,6 +13,7 @@ namespace IPS\{app}\listeners;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
|
||||
use IPS\Db;
|
||||
use IPS\Events\ListenerType\NodeListenerType;
|
||||
use IPS\Node\Model;
|
||||
use function defined;
|
||||
@@ -33,27 +34,4 @@ class {filename} extends NodeListenerType
|
||||
* @var string
|
||||
*/
|
||||
public static string $class = {class};
|
||||
|
||||
/**
|
||||
* Fired when the node is initialized (in constructFromData).
|
||||
* Useful for loading additional tables or properties
|
||||
*
|
||||
* @param Model $node
|
||||
* @return void
|
||||
*/
|
||||
public function onLoad( Model $node ) : void
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Fired when a node is deleted
|
||||
*
|
||||
* @param Model $node
|
||||
* @return void
|
||||
*/
|
||||
public function onDelete( Model $node ) : void
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -13,6 +13,7 @@ namespace IPS\{app}\listeners;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
|
||||
use IPS\Db;
|
||||
use IPS\Events\ListenerType\PackageListenerType;
|
||||
use IPS\Member as MemberClass;
|
||||
use IPS\nexus\Invoice as InvoiceClass;
|
||||
@@ -38,155 +39,4 @@ class {filename} extends PackageListenerType
|
||||
* @var string
|
||||
*/
|
||||
public static string $class = {class};
|
||||
|
||||
/**
|
||||
* On Purchase Canceled
|
||||
*
|
||||
* @param InvoiceItem $item
|
||||
* @param PurchaseClass $purchase The purchase
|
||||
* @return void
|
||||
*/
|
||||
public function onCancel( InvoiceItem $item, PurchaseClass $purchase ) : void
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* On Upgrade/Downgrade
|
||||
*
|
||||
* @param InvoiceItem $item
|
||||
* @param PurchaseClass $purchase The purchase
|
||||
* @param PackageClass $newPackage The package to upgrade to
|
||||
* @param int|RenewalTerm|NULL $chosenRenewalOption The chosen renewal option
|
||||
* @return void
|
||||
*/
|
||||
public function onChange( InvoiceItem $item, PurchaseClass $purchase, PackageClass $newPackage, int|RenewalTerm $chosenRenewalOption = NULL ) : void
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* On Purchase Deleted
|
||||
*
|
||||
* @param InvoiceItem $item
|
||||
* @param PurchaseClass $purchase The purchase
|
||||
* @return void
|
||||
*/
|
||||
public function onDelete( InvoiceItem $item, PurchaseClass $purchase ) : void
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* On expire soon
|
||||
* If returns TRUE, the normal expire warning email will not be sent
|
||||
*
|
||||
* @param InvoiceItem $item
|
||||
* @param PurchaseClass $purchase The purchase
|
||||
* @return void
|
||||
*/
|
||||
public function onExpireWarning( InvoiceItem $item, PurchaseClass $purchase ) : void
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* On Purchase Expired
|
||||
*
|
||||
* @param InvoiceItem $item
|
||||
* @param PurchaseClass $purchase The purchase
|
||||
* @return void
|
||||
*/
|
||||
public function onExpire( InvoiceItem $item, PurchaseClass $purchase ) : void
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* On Invoice Cancel (when unpaid)
|
||||
*
|
||||
* @param InvoiceItem $item
|
||||
* @param InvoiceClass $invoice The invoice
|
||||
* @return void
|
||||
*/
|
||||
public function onInvoiceCancel( InvoiceItem $item, InvoiceClass $invoice ) : void
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* On Paid
|
||||
*
|
||||
* @param InvoiceItem $item
|
||||
* @param InvoiceClass $invoice The invoice
|
||||
* @return void
|
||||
*/
|
||||
public function onPaid( InvoiceItem $item, InvoiceClass $invoice ) : void
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* On Purchase Generated
|
||||
*
|
||||
* @param InvoiceItem $item
|
||||
* @param PurchaseClass $purchase The purchase
|
||||
* @param InvoiceClass $invoice The invoice
|
||||
* @return void
|
||||
*/
|
||||
public function onPurchaseGenerated( InvoiceItem $item, PurchaseClass $purchase, InvoiceClass $invoice ) : void
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* On Purchase Reactivated (renewed after being expired or reactivated after being canceled)
|
||||
*
|
||||
* @param InvoiceItem $item
|
||||
* @param PurchaseClass $purchase The purchase
|
||||
* @return void
|
||||
*/
|
||||
public function onReactivate( InvoiceItem $item, PurchaseClass $purchase ) : void
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* On Renew (Renewal invoice paid. Is not called if expiry data is manually changed)
|
||||
*
|
||||
* @param InvoiceItem $item
|
||||
* @param PurchaseClass $purchase The purchase
|
||||
* @param int $cycles Cycles
|
||||
* @return void
|
||||
*/
|
||||
public function onRenew( InvoiceItem $item, PurchaseClass $purchase, int $cycles ) : void
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* On Transfer (is run before transferring)
|
||||
*
|
||||
* @param InvoiceItem $item
|
||||
* @param PurchaseClass $purchase The purchase
|
||||
* @param MemberClass $newCustomer New Customer
|
||||
* @return void
|
||||
*/
|
||||
public function onTransfer( InvoiceItem $item, PurchaseClass $purchase, MemberClass $newCustomer ) : void
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* On Unpaid
|
||||
*
|
||||
* @param InvoiceItem $item
|
||||
* @param InvoiceClass $invoice The invoice
|
||||
* @param string $status Status
|
||||
* @return void
|
||||
*/
|
||||
public function onUnpaid( InvoiceItem $item, InvoiceClass $invoice, string $status ) : void
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -45,7 +45,7 @@
|
||||
"isDynamicEntry": true
|
||||
},
|
||||
"src/main.jsx": {
|
||||
"file": "assets/main-CoHJ0uDc.js",
|
||||
"file": "assets/main-JrAf8-U8.js",
|
||||
"name": "main",
|
||||
"src": "src/main.jsx",
|
||||
"isEntry": true,
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<language>
|
||||
<app key="core" version="5000030">
|
||||
<app key="core" version="5000031">
|
||||
<word key="__app_core" js="0">System</word>
|
||||
<word key="__indefart_personal_conversation" js="0">a personal conversation</word>
|
||||
<word key="__indefart_personal_conversation_message" js="0">a message in a personal conversation</word>
|
||||
@@ -187,6 +187,7 @@
|
||||
<word key="joined" js="0">Joined</word>
|
||||
<word key="other" js="0">Other</word>
|
||||
<word key="author" js="0">Author</word>
|
||||
<word key="author_stats" js="0">Author stats</word>
|
||||
<word key="read_more" js="0">Read more...</word>
|
||||
<word key="no_content_to_show" js="0">No content to display</word>
|
||||
<word key="category_tags" js="0">Tags</word>
|
||||
@@ -12119,6 +12120,7 @@ In PHP8, altering overloaded method signatures within a subclass results in a fa
|
||||
<word key="editor_insert_line_after" js="1">Insert line after</word>
|
||||
<word key="editor_add_box_title" js="1">Add a box title...</word>
|
||||
<word key="editor_giphy_prompt" js="1">Search for GIFs...</word>
|
||||
<word key="editor_font_type_generic" js="1">OS Native</word>
|
||||
<word key="moderator_alert_reply_ready" js="1">Your reply has been sent</word>
|
||||
<word key="moderator_alert_reply_view" js="1">View Reply</word>
|
||||
</app>
|
||||
|
||||
@@ -1 +1 @@
|
||||
{"build":1730845557681}
|
||||
{"build":1731680494374}
|
||||
@@ -9815,57 +9815,57 @@
|
||||
"comment": "",
|
||||
"reporting": "count"
|
||||
},
|
||||
"core_rc_author_notification_text": {
|
||||
"name": "core_rc_author_notification_text",
|
||||
"columns": {
|
||||
"id": {
|
||||
"name": "id",
|
||||
"type": "BIGINT",
|
||||
"length": "20",
|
||||
"unsigned": true,
|
||||
"allow_null": false,
|
||||
"default": null,
|
||||
"auto_increment": true,
|
||||
"comment": "ID Number"
|
||||
},
|
||||
"title": {
|
||||
"name": "title",
|
||||
"type": "VARCHAR",
|
||||
"length": 255,
|
||||
"decimals": null,
|
||||
"values": null,
|
||||
"allow_null": false,
|
||||
"default": "",
|
||||
"comment": "",
|
||||
"unsigned": false,
|
||||
"auto_increment": false
|
||||
},
|
||||
"text": {
|
||||
"name": "text",
|
||||
"type": "TEXT",
|
||||
"length": null,
|
||||
"decimals": null,
|
||||
"values": null,
|
||||
"allow_null": false,
|
||||
"default": null,
|
||||
"comment": "",
|
||||
"unsigned": false,
|
||||
"auto_increment": false
|
||||
}
|
||||
},
|
||||
"indexes": {
|
||||
"PRIMARY": {
|
||||
"type": "primary",
|
||||
"name": "PRIMARY",
|
||||
"columns": [
|
||||
"id"
|
||||
],
|
||||
"length": [
|
||||
null
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"core_rc_author_notification_text": {
|
||||
"name": "core_rc_author_notification_text",
|
||||
"columns": {
|
||||
"id": {
|
||||
"name": "id",
|
||||
"type": "BIGINT",
|
||||
"length": "20",
|
||||
"unsigned": true,
|
||||
"allow_null": false,
|
||||
"default": null,
|
||||
"auto_increment": true,
|
||||
"comment": "ID Number"
|
||||
},
|
||||
"title": {
|
||||
"name": "title",
|
||||
"type": "VARCHAR",
|
||||
"length": 255,
|
||||
"decimals": null,
|
||||
"values": null,
|
||||
"allow_null": false,
|
||||
"default": "",
|
||||
"comment": "",
|
||||
"unsigned": false,
|
||||
"auto_increment": false
|
||||
},
|
||||
"text": {
|
||||
"name": "text",
|
||||
"type": "TEXT",
|
||||
"length": null,
|
||||
"decimals": null,
|
||||
"values": null,
|
||||
"allow_null": false,
|
||||
"default": null,
|
||||
"comment": "",
|
||||
"unsigned": false,
|
||||
"auto_increment": false
|
||||
}
|
||||
},
|
||||
"indexes": {
|
||||
"PRIMARY": {
|
||||
"type": "primary",
|
||||
"name": "PRIMARY",
|
||||
"columns": [
|
||||
"id"
|
||||
],
|
||||
"length": [
|
||||
null
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"core_rc_reports": {
|
||||
"name": "core_rc_reports",
|
||||
"columns": {
|
||||
@@ -26319,7 +26319,7 @@
|
||||
"event": {
|
||||
"name": "event",
|
||||
"type": "VARCHAR",
|
||||
"length": 32,
|
||||
"length": 255,
|
||||
"decimals": null,
|
||||
"values": null,
|
||||
"allow_null": false,
|
||||
|
||||
+730
-953
File diff suppressed because it is too large.
Load diff
@@ -279,5 +279,6 @@
|
||||
"5000027": "5.0.0 Beta 2",
|
||||
"5000028": "5.0.0 Beta 2",
|
||||
"5000029": "5.0.0 Beta 3",
|
||||
"5000030": "5.0.0 Beta 4"
|
||||
"5000030": "5.0.0 Beta 4",
|
||||
"5000031": "5.0.0 Beta 5"
|
||||
}
|
||||
@@ -188,4 +188,14 @@ class CustomItem extends FrontNavigationAbstract
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Is Active?
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function active(): bool
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -173,7 +173,7 @@ class Lastvisit extends MemberFilterAbstract
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
$lastVisit = DateTime::ts( max( $member->last_visit, $member->last_activity ) );
|
||||
$lastVisit = DateTime::ts( max( (int) $member->last_visit, (int) $member->last_activity ) );
|
||||
|
||||
if( !empty( $filters['range'] ) AND !empty( $filters['range']['end'] ) )
|
||||
{
|
||||
|
||||
@@ -228,7 +228,7 @@ class RebuildSearchIndex extends QueueAbstract
|
||||
try
|
||||
{
|
||||
$index = TRUE;
|
||||
if ( IPS::classUsesTrait( $item, 'IPS\Content\FuturePublishing' ) AND !$item->isFutureDate() )
|
||||
if ( IPS::classUsesTrait( $item, 'IPS\Content\FuturePublishing' ) AND $item->isFutureDate() )
|
||||
{
|
||||
$index = FALSE;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,78 @@
|
||||
var v2=Object.defineProperty;var w2=(e,t,r)=>t in e?v2(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Qh=(e,t,r)=>(w2(e,typeof t!="symbol"?t+"":t,r),r);const y2="modulepreload",_2=function(e){return"/"+e},qh={},S2=function(t,r,l){if(!r||r.length===0)return t();const o=document.getElementsByTagName("link");return Promise.all(r.map(s=>{if(s=_2(s),s in qh)return;qh[s]=!0;const c=s.endsWith(".css"),f=c?'[rel="stylesheet"]':"";if(!!l)for(let y=o.length-1;y>=0;y--){const w=o[y];if(w.href===s&&(!c||w.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${s}"]${f}`))return;const m=document.createElement("link");if(m.rel=c?"stylesheet":y2,c||(m.as="script",m.crossOrigin=""),m.href=s,document.head.appendChild(m),c)return new Promise((y,w)=>{m.addEventListener("load",y),m.addEventListener("error",()=>w(new Error(`Unable to preload CSS for ${s}`)))})})).then(()=>t()).catch(s=>{const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=s,window.dispatchEvent(c),!c.defaultPrevented)throw s})};var fl=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function x2(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var o0={exports:{}},ss={},u0={exports:{}},me={};/**
|
||||
* @license React
|
||||
* react.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/var no=Symbol.for("react.element"),C2=Symbol.for("react.portal"),E2=Symbol.for("react.fragment"),k2=Symbol.for("react.strict_mode"),L2=Symbol.for("react.profiler"),I2=Symbol.for("react.provider"),R2=Symbol.for("react.context"),T2=Symbol.for("react.forward_ref"),A2=Symbol.for("react.suspense"),O2=Symbol.for("react.memo"),P2=Symbol.for("react.lazy"),Kh=Symbol.iterator;function N2(e){return e===null||typeof e!="object"?null:(e=Kh&&e[Kh]||e["@@iterator"],typeof e=="function"?e:null)}var s0={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},a0=Object.assign,c0={};function $i(e,t,r){this.props=e,this.context=t,this.refs=c0,this.updater=r||s0}$i.prototype.isReactComponent={};$i.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};$i.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function f0(){}f0.prototype=$i.prototype;function mf(e,t,r){this.props=e,this.context=t,this.refs=c0,this.updater=r||s0}var vf=mf.prototype=new f0;vf.constructor=mf;a0(vf,$i.prototype);vf.isPureReactComponent=!0;var Yh=Array.isArray,d0=Object.prototype.hasOwnProperty,wf={current:null},p0={key:!0,ref:!0,__self:!0,__source:!0};function h0(e,t,r){var l,o={},s=null,c=null;if(t!=null)for(l in t.ref!==void 0&&(c=t.ref),t.key!==void 0&&(s=""+t.key),t)d0.call(t,l)&&!p0.hasOwnProperty(l)&&(o[l]=t[l]);var f=arguments.length-2;if(f===1)o.children=r;else if(1<f){for(var d=Array(f),m=0;m<f;m++)d[m]=arguments[m+2];o.children=d}if(e&&e.defaultProps)for(l in f=e.defaultProps,f)o[l]===void 0&&(o[l]=f[l]);return{$$typeof:no,type:e,key:s,ref:c,props:o,_owner:wf.current}}function M2(e,t){return{$$typeof:no,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function yf(e){return typeof e=="object"&&e!==null&&e.$$typeof===no}function B2(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var Zh=/\/+/g;function Ga(e,t){return typeof e=="object"&&e!==null&&e.key!=null?B2(""+e.key):t.toString(36)}function Su(e,t,r,l,o){var s=typeof e;(s==="undefined"||s==="boolean")&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case"string":case"number":c=!0;break;case"object":switch(e.$$typeof){case no:case C2:c=!0}}if(c)return c=e,o=o(c),e=l===""?"."+Ga(c,0):l,Yh(o)?(r="",e!=null&&(r=e.replace(Zh,"$&/")+"/"),Su(o,t,r,"",function(m){return m})):o!=null&&(yf(o)&&(o=M2(o,r+(!o.key||c&&c.key===o.key?"":(""+o.key).replace(Zh,"$&/")+"/")+e)),t.push(o)),1;if(c=0,l=l===""?".":l+":",Yh(e))for(var f=0;f<e.length;f++){s=e[f];var d=l+Ga(s,f);c+=Su(s,t,r,d,o)}else if(d=N2(e),typeof d=="function")for(e=d.call(e),f=0;!(s=e.next()).done;)s=s.value,d=l+Ga(s,f++),c+=Su(s,t,r,d,o);else if(s==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return c}function nu(e,t,r){if(e==null)return e;var l=[],o=0;return Su(e,l,"","",function(s){return t.call(r,s,o++)}),l}function W2(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(r){(e._status===0||e._status===-1)&&(e._status=1,e._result=r)},function(r){(e._status===0||e._status===-1)&&(e._status=2,e._result=r)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var wt={current:null},xu={transition:null},z2={ReactCurrentDispatcher:wt,ReactCurrentBatchConfig:xu,ReactCurrentOwner:wf};me.Children={map:nu,forEach:function(e,t,r){nu(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return nu(e,function(){t++}),t},toArray:function(e){return nu(e,function(t){return t})||[]},only:function(e){if(!yf(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};me.Component=$i;me.Fragment=E2;me.Profiler=L2;me.PureComponent=mf;me.StrictMode=k2;me.Suspense=A2;me.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=z2;me.cloneElement=function(e,t,r){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var l=a0({},e.props),o=e.key,s=e.ref,c=e._owner;if(t!=null){if(t.ref!==void 0&&(s=t.ref,c=wf.current),t.key!==void 0&&(o=""+t.key),e.type&&e.type.defaultProps)var f=e.type.defaultProps;for(d in t)d0.call(t,d)&&!p0.hasOwnProperty(d)&&(l[d]=t[d]===void 0&&f!==void 0?f[d]:t[d])}var d=arguments.length-2;if(d===1)l.children=r;else if(1<d){f=Array(d);for(var m=0;m<d;m++)f[m]=arguments[m+2];l.children=f}return{$$typeof:no,type:e.type,key:o,ref:s,props:l,_owner:c}};me.createContext=function(e){return e={$$typeof:R2,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:I2,_conLine truncated
|
||||
* @license React
|
||||
* react-jsx-runtime.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/var $2=Z,F2=Symbol.for("react.element"),U2=Symbol.for("react.fragment"),j2=Object.prototype.hasOwnProperty,H2=$2.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,V2={key:!0,ref:!0,__self:!0,__source:!0};function g0(e,t,r){var l,o={},s=null,c=null;r!==void 0&&(s=""+r),t.key!==void 0&&(s=""+t.key),t.ref!==void 0&&(c=t.ref);for(l in t)j2.call(t,l)&&!V2.hasOwnProperty(l)&&(o[l]=t[l]);if(e&&e.defaultProps)for(l in t=e.defaultProps,t)o[l]===void 0&&(o[l]=t[l]);return{$$typeof:F2,type:e,key:s,ref:c,props:o,_owner:H2.current}}ss.Fragment=U2;ss.jsx=g0;ss.jsxs=g0;o0.exports=ss;var T=o0.exports,yc={},m0={exports:{}},Ft={},v0={exports:{}},w0={};/**
|
||||
* @license React
|
||||
* scheduler.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/(function(e){function t(F,V){var G=F.length;F.push(V);e:for(;0<G;){var X=G-1>>>1,we=F[X];if(0<o(we,V))F[X]=V,F[G]=we,G=X;else break e}}function r(F){return F.length===0?null:F[0]}function l(F){if(F.length===0)return null;var V=F[0],G=F.pop();if(G!==V){F[0]=G;e:for(var X=0,we=F.length,Re=we>>>1;X<Re;){var Ee=2*(X+1)-1,Ye=F[Ee],Ze=Ee+1,Tt=F[Ze];if(0>o(Ye,G))Ze<we&&0>o(Tt,Ye)?(F[X]=Tt,F[Ze]=G,X=Ze):(F[X]=Ye,F[Ee]=G,X=Ee);else if(Ze<we&&0>o(Tt,G))F[X]=Tt,F[Ze]=G,X=Ze;else break e}}return V}function o(F,V){var G=F.sortIndex-V.sortIndex;return G!==0?G:F.id-V.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var c=Date,f=c.now();e.unstable_now=function(){return c.now()-f}}var d=[],m=[],y=1,w=null,x=3,k=!1,O=!1,I=!1,P=typeof setTimeout=="function"?setTimeout:null,v=typeof clearTimeout=="function"?clearTimeout:null,_=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function C(F){for(var V=r(m);V!==null;){if(V.callback===null)l(m);else if(V.startTime<=F)l(m),V.sortIndex=V.expirationTime,t(d,V);else break;V=r(m)}}function M(F){if(I=!1,C(F),!O)if(r(d)!==null)O=!0,Fe(z);else{var V=r(m);V!==null&&pe(M,V.startTime-F)}}function z(F,V){O=!1,I&&(I=!1,v(B),B=-1),k=!0;var G=x;try{for(C(V),w=r(d);w!==null&&(!(w.expirationTime>V)||F&&!te());){var X=w.callback;if(typeof X=="function"){w.callback=null,x=w.priorityLevel;var we=X(w.expirationTime<=V);V=e.unstable_now(),typeof we=="function"?w.callback=we:w===r(d)&&l(d),C(V)}else l(d);w=r(d)}if(w!==null)var Re=!0;else{var Ee=r(m);Ee!==null&&pe(M,Ee.startTime-V),Re=!1}return Re}finally{w=null,x=G,k=!1}}var U=!1,A=null,B=-1,b=5,Q=-1;function te(){return!(e.unstable_now()-Q<b)}function ie(){if(A!==null){var F=e.unstable_now();Q=F;var V=!0;try{V=A(!0,F)}finally{V?le():(U=!1,A=null)}}else U=!1}var le;if(typeof _=="function")le=function(){_(ie)};else if(typeof MessageChannel<"u"){var ce=new MessageChannel,se=ce.port2;ce.port1.onmessage=ie,le=function(){se.postMessage(null)}}else le=function(){P(ie,0)};function Fe(F){A=F,U||(U=!0,le())}function pe(F,V){B=P(function(){F(e.unstable_now())},V)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(F){F.callback=null},e.unstable_continueExecution=function(){O||k||(O=!0,Fe(z))},e.unstable_forceFrameRate=function(F){0>F||125<F?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):b=0<F?Math.floor(1e3/F):5},e.unstable_getCurrentPriorityLevel=function(){return x},e.unstable_getFirstCallbackNode=function(){return r(d)},e.unstable_next=function(F){switch(x){case 1:case 2:case 3:var V=3;break;default:V=x}var G=x;x=V;try{return F()}finally{x=G}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(F,V){switch(F){case 1:case 2:case 3:case 4:case 5:break;default:F=3}var G=x;x=F;try{return V()}finally{x=G}},e.unstable_scheduleCallback=function(F,V,G){var X=e.unstable_now();switch(typeof G=="object"&&G!==null?(G=G.delay,G=typeof G=="number"&&0<G?X+G:X):G=X,F){case 1:var we=-1;break;case 2:we=250;break;case 5:we=1073741823;break;case 4:we=1e4;break;default:we=5e3}return we=G+we,F={id:y++,callback:V,priorityLevel:F,startTime:G,expirationTime:we,sortIndex:-1},G>X?(F.sortIndex=G,t(m,F),r(d)===null&&F===r(m)&&(I?(v(B),B=-1):I=!0,pe(M,G-X))):(F.sortIndex=we,t(d,F),O||k||(O=!0,Fe(z))),F},e.unstable_shouldYield=te,e.unstable_wrapCallback=function(F){var V=x;return function(){var G=x;x=V;try{return F.apply(this,arguments)}finally{x=G}}}})(w0);v0.exports=w0;var G2=v0.exports;/**
|
||||
* @license React
|
||||
* react-dom.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/var y0=Z,$t=G2;function H(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r]);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 _0=new Set,zl={};function qr(e,t){Pi(e,t),Pi(e+"Capture",t)}function Pi(e,t){for(zl[e]=t,e=0;e<t.length;e++)_0.add(t[e])}var Un=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),_c=Object.prototype.hasOwnProperty,Q2=/^[: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]*$/,Xh={},Jh={};function q2(e){return _c.call(Jh,e)?!0:_c.call(Xh,e)?!1:Q2.test(e)?Jh[e]=!0:(Xh[e]=!0,!1)}function K2(e,t,r,l){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return l?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Y2(e,t,r,l){if(t===null||typeof t>"u"||K2(e,t,r,l))return!0;if(l)return!1;if(r!==null)switch(r.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function yt(e,t,r,l,o,s,c){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=l,this.attributeNamespace=o,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=s,this.removeEmptyString=c}var ot={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){ot[e]=new yt(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];ot[t]=new yt(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){ot[e]=new yt(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){ot[e]=new yt(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){ot[e]=new yt(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){ot[e]=new yt(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){ot[e]=new yt(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){ot[e]=new yt(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){ot[e]=new yt(e,5,!1,e.toLowerCase(),null,!1,!1)});var _f=/[\-:]([a-z])/g;function Sf(e){return e[1].toUpperCase()}"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(_f,Sf);ot[t]=new yt(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(_f,Sf);ot[t]=new yt(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(_f,Sf);ot[t]=new yt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){ot[e]=new yt(e,1,!1,e.toLowerCase(),null,!1,!1)});ot.xlinkHref=new yt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){ot[e]=new yt(e,1,!1,e.toLowerCase(),null,!0,!0)});function xf(e,t,r,l){var o=ot.hasOwnProperty(t)?ot[t]:null;(o!==null?o.type!==0:l||!(2<t.length)||t[0]!=="o"&&t[0]!=="
Line truncated
|
||||
`+Qa+e}var qa=!1;function Ka(e,t){if(!e||qa)return"";qa=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(m){var l=m}Reflect.construct(e,[],t)}else{try{t.call()}catch(m){l=m}e.call(t.prototype)}else{try{throw Error()}catch(m){l=m}e()}}catch(m){if(m&&l&&typeof m.stack=="string"){for(var o=m.stack.split(`
|
||||
`),s=l.stack.split(`
|
||||
`),c=o.length-1,f=s.length-1;1<=c&&0<=f&&o[c]!==s[f];)f--;for(;1<=c&&0<=f;c--,f--)if(o[c]!==s[f]){if(c!==1||f!==1)do if(c--,f--,0>f||o[c]!==s[f]){var d=`
|
||||
`+o[c].replace(" at new "," at ");return e.displayName&&d.includes("<anonymous>")&&(d=d.replace("<anonymous>",e.displayName)),d}while(1<=c&&0<=f);break}}}finally{qa=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?Cl(e):""}function Z2(e){switch(e.tag){case 5:return Cl(e.type);case 16:return Cl("Lazy");case 13:return Cl("Suspense");case 19:return Cl("SuspenseList");case 0:case 2:case 15:return e=Ka(e.type,!1),e;case 11:return e=Ka(e.type.render,!1),e;case 1:return e=Ka(e.type,!0),e;default:return""}}function Ec(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case gi:return"Fragment";case hi:return"Portal";case Sc:return"Profiler";case Cf:return"StrictMode";case xc:return"Suspense";case Cc:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case x0:return(e.displayName||"Context")+".Consumer";case S0:return(e._context.displayName||"Context")+".Provider";case Ef:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case kf:return t=e.displayName||null,t!==null?t:Ec(e.type)||"Memo";case rr:t=e._payload,e=e._init;try{return Ec(e(t))}catch{}}return null}function X2(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Ec(t);case 8:return t===Cf?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function _r(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function E0(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function J2(e){var t=E0(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),l=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var o=r.get,s=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(c){l=""+c,s.call(this,c)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return l},setValue:function(c){l=""+c},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function iu(e){e._valueTracker||(e._valueTracker=J2(e))}function k0(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),l="";return e&&(l=E0(e)?e.checked?"true":"false":e.value),e=l,e!==r?(t.setValue(e),!0):!1}function Nu(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function kc(e,t){var r=t.checked;return ze({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function eg(e,t){var r=t.defaultValue==null?"":t.defaultValue,l=t.checked!=null?t.checked:t.defaultChecked;r=_r(t.value!=null?t.value:r),e._wrapperState={initialChecked:l,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function L0(e,t){t=t.checked,t!=null&&xf(e,"checked",t,!1)}function Lc(e,t){L0(e,t);var r=_r(t.value),l=t.type;if(r!=null)l==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(l==="submit"||l==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Ic(e,t.type,r):t.hasOwnProperty("defaultValue")&&Ic(e,t.type,_r(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function tg(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var l=t.type;if(!(l!=="submit"&&l!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function Ic(e,t,r){(t!=="number"||Nu(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var El=Array.isArray;function Li(e,t,r,l){if(e=e.options,t){t={};for(var o=0;o<r.length;o++)t["$"+r[o]]=!0;for(r=0;r<e.length;r++)o=t.hasOwnProperty("$"+e[r].value),e[r].selected!==o&&(e[r].selected=o),o&&l&&(e[r].defaultSelected=!0)}else{for(r=""+_r(r),t=null,o=0;o<e.length;o++){if(e[o].value===r){e[o].selected=!0,l&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function Rc(e,t){if(t.dan
Line truncated
|
||||
`).replace(sk,"")}function du(e,t,r){if(t=Eg(t),Eg(e)!==t&&r)throw Error(H(425))}function Uu(){}var Uc=null,jc=null;function Hc(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Vc=typeof setTimeout=="function"?setTimeout:void 0,ak=typeof clearTimeout=="function"?clearTimeout:void 0,kg=typeof Promise=="function"?Promise:void 0,ck=typeof queueMicrotask=="function"?queueMicrotask:typeof kg<"u"?function(e){return kg.resolve(null).then(e).catch(fk)}:Vc;function fk(e){setTimeout(function(){throw e})}function uc(e,t){var r=t,l=0;do{var o=r.nextSibling;if(e.removeChild(r),o&&o.nodeType===8)if(r=o.data,r==="/$"){if(l===0){e.removeChild(o),jl(t);return}l--}else r!=="$"&&r!=="$?"&&r!=="$!"||l++;r=o}while(r);jl(t)}function pr(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function Lg(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"){if(t===0)return e;t--}else r==="/$"&&t++}e=e.previousSibling}return null}var Ui=Math.random().toString(36).slice(2),xn="__reactFiber$"+Ui,ql="__reactProps$"+Ui,jn="__reactContainer$"+Ui,Gc="__reactEvents$"+Ui,dk="__reactListeners$"+Ui,pk="__reactHandles$"+Ui;function zr(e){var t=e[xn];if(t)return t;for(var r=e.parentNode;r;){if(t=r[jn]||r[xn]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=Lg(e);e!==null;){if(r=e[xn])return r;e=Lg(e)}return t}e=r,r=e.parentNode}return null}function lo(e){return e=e[xn]||e[jn],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function yi(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(H(33))}function ps(e){return e[ql]||null}var Qc=[],_i=-1;function Er(e){return{current:e}}function Oe(e){0>_i||(e.current=Qc[_i],Qc[_i]=null,_i--)}function Ie(e,t){_i++,Qc[_i]=e.current,e.current=t}var Sr={},dt=Er(Sr),Lt=Er(!1),jr=Sr;function Ni(e,t){var r=e.type.contextTypes;if(!r)return Sr;var l=e.stateNode;if(l&&l.__reactInternalMemoizedUnmaskedChildContext===t)return l.__reactInternalMemoizedMaskedChildContext;var o={},s;for(s in r)o[s]=t[s];return l&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function It(e){return e=e.childContextTypes,e!=null}function ju(){Oe(Lt),Oe(dt)}function Ig(e,t,r){if(dt.current!==Sr)throw Error(H(168));Ie(dt,t),Ie(Lt,r)}function hm(e,t,r){var l=e.stateNode;if(t=t.childContextTypes,typeof l.getChildContext!="function")return r;l=l.getChildContext();for(var o in l)if(!(o in t))throw Error(H(108,X2(e)||"Unknown",o));return ze({},r,l)}function Hu(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Sr,jr=dt.current,Ie(dt,e),Ie(Lt,Lt.current),!0}function Rg(e,t,r){var l=e.stateNode;if(!l)throw Error(H(169));r?(e=hm(e,t,jr),l.__reactInternalMemoizedMergedChildContext=e,Oe(Lt),Oe(dt),Ie(dt,e)):Oe(Lt),Ie(Lt,r)}var zn=null,hs=!1,sc=!1;function gm(e){zn===null?zn=[e]:zn.push(e)}function hk(e){hs=!0,gm(e)}function kr(){if(!sc&&zn!==null){sc=!0;var e=0,t=Ce;try{var r=zn;for(Ce=1;e<r.length;e++){var l=r[e];do l=l(!0);while(l!==null)}zn=null,hs=!1}catch(o){throw zn!==null&&(zn=zn.slice(e+1)),F0(If,kr),o}finally{Ce=t,sc=!1}}return null}var Si=[],xi=0,Vu=null,Gu=0,Zt=[],Xt=0,Hr=null,Dn=1,$n="";function Br(e,t){Si[xi++]=Gu,Si[xi++]=Vu,Vu=e,Gu=t}function mm(e,t,r){Zt[Xt++]=Dn,Zt[Xt++]=$n,Zt[Xt++]=Hr,Hr=e;var l=Dn;e=$n;var o=32-hn(l)-1;l&=~(1<<o),r+=1;var s=32-hn(t)+o;if(30<s){var c=o-o%5;s=(l&(1<<c)-1).toString(32),l>>=c,o-=c,Dn=1<<32-hn(t)+o|r<<o|l,$n=s+e}else Dn=1<<s|r<<o|l,$n=e}function Wf(e){e.return!==null&&(Br(e,1),mm(e,1,0))}function zf(e){for(;e===Vu;)Vu=Si[--xi],Si[xi]=null,Gu=Si[--xi],Si[xi]=null;for(;e===Hr;)Hr=Zt[--Xt],Zt[Xt]=null,$n=Zt[--Xt],Zt[Xt]=null,Dn=Zt[--Xt],Zt[Xt]=null}var Dt=null,zt=null,Ne=!1,pn=null;function vm(e,t){var r=Jt(5,null,null,0);r.elementType="DELETED",r.stateNode=t,r.return=e,t=e.deletions,t===null?(e.deletions=[r],e.flags|=16):t.push(r)}function Tg(e,t){switch(e.tag){case 5:var r=e.type;return t=t.nodeType!==1||r.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Dt=e,zt=pr(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Dt=e,zt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(r=Hr!==null?{id:Dn,overflow:$n}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},r=Jt(18,null,null,0),r.stateNode=t,r.return=e,e.child=r,Dt=e,zt=null,!0):!1;default:return!1}}function qc(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Kc(e){if(Ne){var t=zt;if(t){var r=t;if(!Tg(e,t)){if(qc(e))throw Error(H(418));t=pr(r.nextSibling);var l=Dt;t&&Tg(e,t)?vm(l,r):(e.flags=e.flags&-4097|2,Ne=!1,Dt=e)}}else{if(qc(e))throw Error(H(418));e.flags=e.flags&-4097|2,Ne=!1,Dt=e}}}function Ag(e){for(e=e
Line truncated
|
||||
Error generating stack: `+s.message+`
|
||||
`+s.stack}return{value:e,source:t,stack:o,digest:null}}function pc(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function Jc(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var Ck=typeof WeakMap=="function"?WeakMap:Map;function Gm(e,t,r){r=Fn(-1,r),r.tag=3,r.payload={element:null};var l=t.value;return r.callback=function(){bu||(bu=!0,af=l),Jc(e,t)},r}function Qm(e,t,r){r=Fn(-1,r),r.tag=3;var l=e.type.getDerivedStateFromError;if(typeof l=="function"){var o=t.value;r.payload=function(){return l(o)},r.callback=function(){Jc(e,t)}}var s=e.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(r.callback=function(){Jc(e,t),typeof l!="function"&&(gr===null?gr=new Set([this]):gr.add(this));var c=t.stack;this.componentDidCatch(t.value,{componentStack:c!==null?c:""})}),r}function Dg(e,t,r){var l=e.pingCache;if(l===null){l=e.pingCache=new Ck;var o=new Set;l.set(t,o)}else o=l.get(t),o===void 0&&(o=new Set,l.set(t,o));o.has(r)||(o.add(r),e=zk.bind(null,e,t,r),t.then(e,e))}function $g(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Fg(e,t,r,l,o){return e.mode&1?(e.flags|=65536,e.lanes=o,e):(e===t?e.flags|=65536:(e.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(t=Fn(-1,1),t.tag=2,hr(r,t,1))),r.lanes|=1),e)}var Ek=Gn.ReactCurrentOwner,kt=!1;function mt(e,t,r,l){t.child=e===null?Em(t,null,r,l):Bi(t,e.child,r,l)}function Ug(e,t,r,l,o){r=r.render;var s=t.ref;return Ai(t,o),l=Kf(e,t,r,l,s,o),r=Yf(),e!==null&&!kt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Vn(e,t,o)):(Ne&&r&&Wf(t),t.flags|=1,mt(e,t,l,o),t.child)}function jg(e,t,r,l,o){if(e===null){var s=r.type;return typeof s=="function"&&!ld(s)&&s.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=s,qm(e,t,s,l,o)):(e=Pu(r.type,null,l,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(s=e.child,!(e.lanes&o)){var c=s.memoizedProps;if(r=r.compare,r=r!==null?r:Vl,r(c,l)&&e.ref===t.ref)return Vn(e,t,o)}return t.flags|=1,e=vr(s,l),e.ref=t.ref,e.return=t,t.child=e}function qm(e,t,r,l,o){if(e!==null){var s=e.memoizedProps;if(Vl(s,l)&&e.ref===t.ref)if(kt=!1,t.pendingProps=l=s,(e.lanes&o)!==0)e.flags&131072&&(kt=!0);else return t.lanes=e.lanes,Vn(e,t,o)}return bc(e,t,r,l,o)}function Km(e,t,r){var l=t.pendingProps,o=l.children,s=e!==null?e.memoizedState:null;if(l.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ie(ki,Wt),Wt|=r;else{if(!(r&1073741824))return e=s!==null?s.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Ie(ki,Wt),Wt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},l=s!==null?s.baseLanes:r,Ie(ki,Wt),Wt|=l}else s!==null?(l=s.baseLanes|r,t.memoizedState=null):l=r,Ie(ki,Wt),Wt|=l;return mt(e,t,o,r),t.child}function Ym(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function bc(e,t,r,l,o){var s=It(r)?jr:dt.current;return s=Ni(t,s),Ai(t,o),r=Kf(e,t,r,l,s,o),l=Yf(),e!==null&&!kt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Vn(e,t,o)):(Ne&&l&&Wf(t),t.flags|=1,mt(e,t,r,o),t.child)}function Hg(e,t,r,l,o){if(It(r)){var s=!0;Hu(t)}else s=!1;if(Ai(t,o),t.stateNode===null)Tu(e,t),xm(t,r,l),Xc(t,r,l,o),l=!0;else if(e===null){var c=t.stateNode,f=t.memoizedProps;c.props=f;var d=c.context,m=r.contextType;typeof m=="object"&&m!==null?m=en(m):(m=It(r)?jr:dt.current,m=Ni(t,m));var y=r.getDerivedStateFromProps,w=typeof y=="function"||typeof c.getSnapshotBeforeUpdate=="function";w||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(f!==l||d!==m)&&Mg(t,c,l,m),ir=!1;var x=t.memoizedState;c.state=x,Ku(t,l,c,o),d=t.memoizedState,f!==l||x!==d||Lt.current||ir?(typeof y=="function"&&(Zc(t,r,y,l),d=t.memoizedState),(f=ir||Ng(t,r,f,l,x,d,m))?(w||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount()),typeof c.componentDidMount=="function"&&(t.flags|=4194308)):(typeof c.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=l,t.memoizedState=d),c.props=l,c.state=d,c.context=m,l=f):(typeof c.componentDidMount=="function"&&(t.flags|=4194308),l=!1)}else{c=t.stateNode,_m(e,t),f=t.memoizedProps,m=t.type===t.elementType?f:fn(t.type,f),c.props=m,w=t.pendingProps,x=c.context,d=r.contextType,typeof d=="object"&&d!==null?d=en(d):(d=It(r)?jr:dt.current,d=Ni(t,d));var k=r.getDerivedStateFromProps;(y=typeof k=="function"||typeof c.getSnapshotBeforeUpdate=="function")||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(f!==w||x!==d)&&Mg(t,c,l,d),ir=!1,x=t.memoizedState,c.state=x,Ku(t,l,c,o);var O=t.memoizedS
Line truncated
|
||||
* @license
|
||||
* Lodash <https://lodash.com/>
|
||||
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
||||
* Released under MIT license <https://lodash.com/license>
|
||||
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
||||
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
||||
*/rs.exports;(function(e,t){(function(){var r,l="4.17.21",o=200,s="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",c="Expected a function",f="Invalid `variable` option passed into `_.template`",d="__lodash_hash_undefined__",m=500,y="__lodash_placeholder__",w=1,x=2,k=4,O=1,I=2,P=1,v=2,_=4,C=8,M=16,z=32,U=64,A=128,B=256,b=512,Q=30,te="...",ie=800,le=16,ce=1,se=2,Fe=3,pe=1/0,F=9007199254740991,V=17976931348623157e292,G=0/0,X=4294967295,we=X-1,Re=X>>>1,Ee=[["ary",A],["bind",P],["bindKey",v],["curry",C],["curryRight",M],["flip",b],["partial",z],["partialRight",U],["rearg",B]],Ye="[object Arguments]",Ze="[object Array]",Tt="[object AsyncFunction]",Hi="[object Boolean]",Vi="[object Date]",Nv="[object DOMException]",co="[object Error]",fo="[object Function]",gd="[object GeneratorFunction]",nn="[object Map]",Gi="[object Number]",Mv="[object Null]",Ln="[object Object]",md="[object Promise]",Bv="[object Proxy]",Qi="[object RegExp]",rn="[object Set]",qi="[object String]",po="[object Symbol]",Wv="[object Undefined]",Ki="[object WeakMap]",zv="[object WeakSet]",Yi="[object ArrayBuffer]",Zr="[object DataView]",Es="[object Float32Array]",ks="[object Float64Array]",Ls="[object Int8Array]",Is="[object Int16Array]",Rs="[object Int32Array]",Ts="[object Uint8Array]",As="[object Uint8ClampedArray]",Os="[object Uint16Array]",Ps="[object Uint32Array]",Dv=/\b__p \+= '';/g,$v=/\b(__p \+=) '' \+/g,Fv=/(__e\(.*?\)|\b__t\)) \+\n'';/g,vd=/&(?:amp|lt|gt|quot|#39);/g,wd=/[&<>"']/g,Uv=RegExp(vd.source),jv=RegExp(wd.source),Hv=/<%-([\s\S]+?)%>/g,Vv=/<%([\s\S]+?)%>/g,yd=/<%=([\s\S]+?)%>/g,Gv=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Qv=/^\w*$/,qv=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ns=/[\\^$.*+?()[\]{}|]/g,Kv=RegExp(Ns.source),Ms=/^\s+/,Yv=/\s/,Zv=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Xv=/\{\n\/\* \[wrapped with (.+)\] \*/,Jv=/,? & /,bv=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,e1=/[()=,{}\[\]\/\s]/,t1=/\\(\\)?/g,n1=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,_d=/\w*$/,r1=/^[-+]0x[0-9a-f]+$/i,i1=/^0b[01]+$/i,l1=/^\[object .+?Constructor\]$/,o1=/^0o[0-7]+$/i,u1=/^(?:0|[1-9]\d*)$/,s1=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ho=/($^)/,a1=/['\n\r\u2028\u2029\\]/g,go="\\ud800-\\udfff",c1="\\u0300-\\u036f",f1="\\ufe20-\\ufe2f",d1="\\u20d0-\\u20ff",Sd=c1+f1+d1,xd="\\u2700-\\u27bf",Cd="a-z\\xdf-\\xf6\\xf8-\\xff",p1="\\xac\\xb1\\xd7\\xf7",h1="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",g1="\\u2000-\\u206f",m1=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ed="A-Z\\xc0-\\xd6\\xd8-\\xde",kd="\\ufe0e\\ufe0f",Ld=p1+h1+g1+m1,Bs="['’]",v1="["+go+"]",Id="["+Ld+"]",mo="["+Sd+"]",Rd="\\d+",w1="["+xd+"]",Td="["+Cd+"]",Ad="[^"+go+Ld+Rd+xd+Cd+Ed+"]",Ws="\\ud83c[\\udffb-\\udfff]",y1="(?:"+mo+"|"+Ws+")",Od="[^"+go+"]",zs="(?:\\ud83c[\\udde6-\\uddff]){2}",Ds="[\\ud800-\\udbff][\\udc00-\\udfff]",Xr="["+Ed+"]",Pd="\\u200d",Nd="(?:"+Td+"|"+Ad+")",_1="(?:"+Xr+"|"+Ad+")",Md="(?:"+Bs+"(?:d|ll|m|re|s|t|ve))?",Bd="(?:"+Bs+"(?:D|LL|M|RE|S|T|VE))?",Wd=y1+"?",zd="["+kd+"]?",S1="(?:"+Pd+"(?:"+[Od,zs,Ds].join("|")+")"+zd+Wd+")*",x1="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",C1="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Dd=zd+Wd+S1,E1="(?:"+[w1,zs,Ds].join("|")+")"+Dd,k1="(?:"+[Od+mo+"?",mo,zs,Ds,v1].join("|")+")",L1=RegExp(Bs,"g"),I1=RegExp(mo,"g"),$s=RegExp(Ws+"(?="+Ws+")|"+k1+Dd,"g"),R1=RegExp([Xr+"?"+Td+"+"+Md+"(?="+[Id,Xr,"$"].join("|")+")",_1+"+"+Bd+"(?="+[Id,Xr+Nd,"$"].join("|")+")",Xr+"?"+Nd+"+"+Md,Xr+"+"+Bd,C1,x1,Rd,E1].join("|"),"g"),T1=RegExp("["+Pd+go+Sd+kd+"]"),A1=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,O1=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],P1=-1,Te={};Te[Es]=Te[ks]=Te[Ls]=Te[Is]=Te[Rs]=Te[Ts]=Te[As]=Te[Os]=Te[Ps]=!0,Te[Ye]=Te[Ze]=Te[Yi]=Te[Hi]=Te[Zr]=Te[Vi]=Te[co]=Te[fo]=Te[nn]=Te[Gi]=Te[Ln]=Te[Qi]=Te[rn]=Te[qi]=Te[Ki]=!1;var Le={};Le[Ye]=Le[Ze]=Le[Yi]=Le[Zr]=Le[Hi]=Le[Vi]=Le[Es]=Le[ks]=Le[Ls]=Le[Is]=Le[Rs]=Le[nn]=Le[Gi]=Le[Ln]=Le[Qi]=Le[rn]=Le[qi]=Le[po]=Le[Ts]=Le[As]=Le[Os]=Le[Ps]=!0,Le[co]=Le[fo]=Le[Ki]=!1;var N1={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",Line truncated
|
||||
/* [wrapped with `+i+`] */
|
||||
`)}function Yy(n){return ue(n)||Mr(n)||!!(up&&n&&n[up])}function Pn(n,i){var u=typeof n;return i=i??F,!!i&&(u=="number"||u!="symbol"&&u1.test(n))&&n>-1&&n%1==0&&n<i}function ht(n,i,u){if(!Me(u))return!1;var a=typeof i;return(a=="number"?St(u)&&Pn(i,u.length):a=="string"&&i in u)?un(u[i],n):!1}function La(n,i){if(ue(n))return!1;var u=typeof n;return u=="number"||u=="symbol"||u=="boolean"||n==null||Nt(n)?!0:Qv.test(n)||!Gv.test(n)||i!=null&&n in ke(i)}function Zy(n){var i=typeof n;return i=="string"||i=="number"||i=="symbol"||i=="boolean"?n!=="__proto__":n===null}function Ia(n){var i=Go(n),u=h[i];if(typeof u!="function"||!(i in ge.prototype))return!1;if(n===u)return!0;var a=Ca(u);return!!a&&n===a[0]}function Xy(n){return!!rp&&rp in n}var Jy=So?Nn:Va;function sl(n){var i=n&&n.constructor,u=typeof i=="function"&&i.prototype||ni;return n===u}function rh(n){return n===n&&!Me(n)}function ih(n,i){return function(u){return u==null?!1:u[n]===i&&(i!==r||n in ke(u))}}function by(n){var i=Xo(n,function(a){return u.size===m&&u.clear(),a}),u=i.cache;return i}function e_(n,i){var u=n[1],a=i[1],p=u|a,g=p<(P|v|A),S=a==A&&u==C||a==A&&u==B&&n[7].length<=i[8]||a==(A|B)&&i[7].length<=i[8]&&u==C;if(!(g||S))return n;a&P&&(n[2]=i[2],p|=u&P?0:_);var E=i[3];if(E){var R=n[3];n[3]=R?Fp(R,E,i[4]):E,n[4]=R?Yn(n[3],y):i[4]}return E=i[5],E&&(R=n[5],n[5]=R?Up(R,E,i[6]):E,n[6]=R?Yn(n[5],y):i[6]),E=i[7],E&&(n[7]=E),a&A&&(n[8]=n[8]==null?i[8]:ut(n[8],i[8])),n[9]==null&&(n[9]=i[9]),n[0]=i[0],n[1]=p,n}function t_(n){var i=[];if(n!=null)for(var u in ke(n))i.push(u);return i}function n_(n){return Co.call(n)}function lh(n,i,u){return i=Qe(i===r?n.length-1:i,0),function(){for(var a=arguments,p=-1,g=Qe(a.length-i,0),S=N(g);++p<g;)S[p]=a[i+p];p=-1;for(var E=N(i+1);++p<i;)E[p]=a[p];return E[i]=u(S),At(n,this,E)}}function oh(n,i){return i.length<2?n:Or(n,qt(i,0,-1))}function r_(n,i){for(var u=n.length,a=ut(i.length,u),p=_t(n);a--;){var g=i[a];n[a]=Pn(g,u)?p[g]:r}return n}function Ra(n,i){if(!(i==="constructor"&&typeof n[i]=="function")&&i!="__proto__")return n[i]}var uh=ah(Ap),al=ww||function(n,i){return tt.setTimeout(n,i)},Ta=ah(Ly);function sh(n,i,u){var a=i+"";return Ta(n,Ky(a,i_(Gy(a),u)))}function ah(n){var i=0,u=0;return function(){var a=xw(),p=le-(a-u);if(u=a,p>0){if(++i>=ie)return arguments[0]}else i=0;return n.apply(r,arguments)}}function qo(n,i){var u=-1,a=n.length,p=a-1;for(i=i===r?a:i;++u<i;){var g=fa(u,p),S=n[g];n[g]=n[u],n[u]=S}return n.length=i,n}var ch=by(function(n){var i=[];return n.charCodeAt(0)===46&&i.push(""),n.replace(qv,function(u,a,p,g){i.push(p?g.replace(t1,"$1"):a||u)}),i});function yn(n){if(typeof n=="string"||Nt(n))return n;var i=n+"";return i=="0"&&1/n==-pe?"-0":i}function Nr(n){if(n!=null){try{return xo.call(n)}catch{}try{return n+""}catch{}}return""}function i_(n,i){return Ht(Ee,function(u){var a="_."+u[0];i&u[1]&&!vo(n,a)&&n.push(a)}),n.sort()}function fh(n){if(n instanceof ge)return n.clone();var i=new Gt(n.__wrapped__,n.__chain__);return i.__actions__=_t(n.__actions__),i.__index__=n.__index__,i.__values__=n.__values__,i}function l_(n,i,u){(u?ht(n,i,u):i===r)?i=1:i=Qe(ae(i),0);var a=n==null?0:n.length;if(!a||i<1)return[];for(var p=0,g=0,S=N(To(a/i));p<a;)S[g++]=qt(n,p,p+=i);return S}function o_(n){for(var i=-1,u=n==null?0:n.length,a=0,p=[];++i<u;){var g=n[i];g&&(p[a++]=g)}return p}function u_(){var n=arguments.length;if(!n)return[];for(var i=N(n-1),u=arguments[0],a=n;a--;)i[a-1]=arguments[a];return Kn(ue(u)?_t(u):[u],nt(i,1))}var s_=de(function(n,i){return Ue(n)?rl(n,nt(i,1,Ue,!0)):[]}),a_=de(function(n,i){var u=Kt(i);return Ue(u)&&(u=r),Ue(n)?rl(n,nt(i,1,Ue,!0),ee(u,2)):[]}),c_=de(function(n,i){var u=Kt(i);return Ue(u)&&(u=r),Ue(n)?rl(n,nt(i,1,Ue,!0),r,u):[]});function f_(n,i,u){var a=n==null?0:n.length;return a?(i=u||i===r?1:ae(i),qt(n,i<0?0:i,a)):[]}function d_(n,i,u){var a=n==null?0:n.length;return a?(i=u||i===r?1:ae(i),i=a-i,qt(n,0,i<0?0:i)):[]}function p_(n,i){return n&&n.length?$o(n,ee(i,3),!0,!0):[]}function h_(n,i){return n&&n.length?$o(n,ee(i,3),!0):[]}function g_(n,i,u,a){var p=n==null?0:n.length;return p?(u&&typeof u!="number"&&ht(n,i,u)&&(u=0,a=p),uy(n,i,u,a)):[]}function dh(n,i,u){var a=n==null?0:n.length;if(!a)return-1;var p=u==null?0:ae(u);return p<0&&(p=Qe(a+p,0)),wo(n,ee(i,3),p)}function ph(n,i,u){var a=n==null?0:n.length;if(!a)return-1;var p=a-1;return u!==r&&(p=ae(u),p=u<0?Qe(a+p,0):ut(p,a-1)),wo(n,ee(i,3),p,!0)}function hh(n){var i=n==null?0:n.length;return i?nt(n,1):[]}function m_(n){var i=n==null?0:n.length;return i?nt(n,pe):[]}function v_(n,i){var u=n==null?0:n.length;return u?(i=i===r?1:ae(i),nt(n,i)):[]}function w_(n){for(var i=-1,u=n==null?0:n.length,a={};++i<u;){var p=n[i];a[p[0]]=p[1]}return a}function gh(n){return n&&n.length?n[0]:r}function y_(n,i,u){var a=n==null?0:n.length;if(!a)return-1;var p=u==null?0:ae(u);return p<0&&(p=Qe(a+p,0)),Jr(n,i,p)}function __(n){var i=n==null?0:n.length;return i?qt(n,0,-1):[]}var S_=de(function(n){var i=Pe(n,ma);return i.length&&i[0]===n[0]?oa(i):[]}),x_=d
Line truncated
|
||||
`;n.replace(q,function(re,he,ve,Mt,gt,Bt){return ve||(ve=Mt),j+=n.slice(D,Bt).replace(a1,J1),he&&(E=!0,j+=`' +
|
||||
__e(`+he+`) +
|
||||
'`),gt&&(R=!0,j+=`';
|
||||
`+gt+`;
|
||||
__p += '`),ve&&(j+=`' +
|
||||
((__t = (`+ve+`)) == null ? '' : __t) +
|
||||
'`),D=Bt+re.length,re}),j+=`';
|
||||
`;var ne=xe.call(i,"variable")&&i.variable;if(!ne)j=`with (obj) {
|
||||
`+j+`
|
||||
}
|
||||
`;else if(e1.test(ne))throw new oe(f);j=(R?j.replace(Dv,""):j).replace($v,"$1").replace(Fv,"$1;"),j="function("+(ne||"obj")+`) {
|
||||
`+(ne?"":`obj || (obj = {});
|
||||
`)+"var __t, __p = ''"+(E?", __e = _.escape":"")+(R?`, __j = Array.prototype.join;
|
||||
function print() { __p += __j.call(arguments, '') }
|
||||
`:`;
|
||||
`)+j+`return __p
|
||||
}`;var fe=Hh(function(){return _e(g,J+"return "+j).apply(r,S)});if(fe.source=j,Ma(fe))throw fe;return fe}function EC(n){return Se(n).toLowerCase()}function kC(n){return Se(n).toUpperCase()}function LC(n,i,u){if(n=Se(n),n&&(u||i===r))return Jd(n);if(!n||!(i=Pt(i)))return n;var a=ln(n),p=ln(i),g=bd(a,p),S=ep(a,p)+1;return er(a,g,S).join("")}function IC(n,i,u){if(n=Se(n),n&&(u||i===r))return n.slice(0,np(n)+1);if(!n||!(i=Pt(i)))return n;var a=ln(n),p=ep(a,ln(i))+1;return er(a,0,p).join("")}function RC(n,i,u){if(n=Se(n),n&&(u||i===r))return n.replace(Ms,"");if(!n||!(i=Pt(i)))return n;var a=ln(n),p=bd(a,ln(i));return er(a,p).join("")}function TC(n,i){var u=Q,a=te;if(Me(i)){var p="separator"in i?i.separator:p;u="length"in i?ae(i.length):u,a="omission"in i?Pt(i.omission):a}n=Se(n);var g=n.length;if(br(n)){var S=ln(n);g=S.length}if(u>=g)return n;var E=u-ei(a);if(E<1)return a;var R=S?er(S,0,E).join(""):n.slice(0,E);if(p===r)return R+a;if(S&&(E+=R.length-E),Ba(p)){if(n.slice(E).search(p)){var D,$=R;for(p.global||(p=Xs(p.source,Se(_d.exec(p))+"g")),p.lastIndex=0;D=p.exec($);)var j=D.index;R=R.slice(0,j===r?E:j)}}else if(n.indexOf(Pt(p),E)!=E){var q=R.lastIndexOf(p);q>-1&&(R=R.slice(0,q))}return R+a}function AC(n){return n=Se(n),n&&Uv.test(n)?n.replace(vd,lw):n}var OC=ui(function(n,i,u){return n+(u?" ":"")+i.toUpperCase()}),Da=Vp("toUpperCase");function jh(n,i,u){return n=Se(n),i=u?r:i,i===r?ew(n)?sw(n):G1(n):n.match(i)||[]}var Hh=de(function(n,i){try{return At(n,r,i)}catch(u){return Ma(u)?u:new oe(u)}}),PC=On(function(n,i){return Ht(i,function(u){u=yn(u),Tn(n,u,Pa(n[u],n))}),n});function NC(n){var i=n==null?0:n.length,u=ee();return n=i?Pe(n,function(a){if(typeof a[1]!="function")throw new Vt(c);return[u(a[0]),a[1]]}):[],de(function(a){for(var p=-1;++p<i;){var g=n[p];if(At(g[0],this,a))return At(g[1],this,a)}})}function MC(n){return ly(Qt(n,w))}function $a(n){return function(){return n}}function BC(n,i){return n==null||n!==n?i:n}var WC=Qp(),zC=Qp(!0);function Ct(n){return n}function Fa(n){return xp(typeof n=="function"?n:Qt(n,w))}function DC(n){return Ep(Qt(n,w))}function $C(n,i){return kp(n,Qt(i,w))}var FC=de(function(n,i){return function(u){return il(u,n,i)}}),UC=de(function(n,i){return function(u){return il(n,u,i)}});function Ua(n,i,u){var a=Xe(i),p=Wo(i,a);u==null&&!(Me(i)&&(p.length||!a.length))&&(u=i,i=n,n=this,p=Wo(i,Xe(i)));var g=!(Me(u)&&"chain"in u)||!!u.chain,S=Nn(n);return Ht(p,function(E){var R=i[E];n[E]=R,S&&(n.prototype[E]=function(){var D=this.__chain__;if(g||D){var $=n(this.__wrapped__),j=$.__actions__=_t(this.__actions__);return j.push({func:R,args:arguments,thisArg:n}),$.__chain__=D,$}return R.apply(n,Kn([this.value()],arguments))})}),n}function jC(){return tt._===this&&(tt._=hw),this}function ja(){}function HC(n){return n=ae(n),de(function(i){return Lp(i,n)})}var VC=ya(Pe),GC=ya(qd),QC=ya(Vs);function Vh(n){return La(n)?Gs(yn(n)):xy(n)}function qC(n){return function(i){return n==null?r:Or(n,i)}}var KC=Kp(),YC=Kp(!0);function Ha(){return[]}function Va(){return!1}function ZC(){return{}}function XC(){return""}function JC(){return!0}function bC(n,i){if(n=ae(n),n<1||n>F)return[];var u=X,a=ut(n,X);i=ee(i),n-=X;for(var p=Ks(a,i);++u<n;)i(u);return p}function e2(n){return ue(n)?Pe(n,yn):Nt(n)?[n]:_t(ch(Se(n)))}function t2(n){var i=++dw;return Se(n)+i}var n2=jo(function(n,i){return n+i},0),r2=_a("ceil"),i2=jo(function(n,i){return n/i},1),l2=_a("floor");function o2(n){return n&&n.length?Bo(n,Ct,la):r}function u2(n,i){return n&&n.length?Bo(n,ee(i,2),la):r}function s2(n){return Zd(n,Ct)}function a2(n,i){return Zd(n,ee(i,2))}function c2(n){return n&&n.length?Bo(n,Ct,aa):r}function f2(n,i){return n&&n.length?Bo(n,ee(i,2),aa):r}var d2=jo(function(n,i){return n*i},1),p2=_a("round"),h2=jo(function(n,i){return n-i},0);function g2(n){return n&&n.length?qs(n,Ct):0}function m2(n,i){return n&&n.length?qs(n,ee(i,2)):0}return h.after=DS,h.ary=Sh,h.assign=kx,h.assignIn=Bh,h.assignInWith=tu,h.assignWith=Lx,h.at=Ix,h.before=xh,h.bind=Pa,h.bindAll=PC,h.bindKey=Ch,h.castArray=ZS,h.chain=wh,h.chunk=l_,h.compact=o_,h.concat=u_,h.cond=NC,h.conforms=MC,h.constant=$a,h.countBy=gS,h.create=Rx,h.curry=Eh,h.curryRight=kh,h.debounce=Lh,h.defaults=Tx,h.defaultsDeep=Ax,h.defer=$S,h.delay=FS,h.difference=s_,h.differenceBy=a_,h.differenceWith=c_,h.drop=f_,h.dropRight=d_,h.dropRightWhile=p_,h.dropWhile=h_,h.fill=g_,h.filter=vS,h.flatMap=_S,h.flatMapDeep=SS,h.flatMapDepth=xS,h.flatten=hh,h.flattenDeep=m_,h.flattenDepth=v_,h.flip=US,h.flow=WC,h.flowRight=zC,h.fromPairs=w_,h.functions=zx,h.functionsIn=Dx,h.groupBy=CS,h.initial=__,h.intersection=S_,h.intersectionBy=x_,h.intersectionWith=C_,h.invert=Fx,h.invertBy=Ux,h.invokeMap=kS,h.iteratee=Fa,h.keyBy=LS,h.keys=Xe,h.keysIn=xt,h.map=Yo,h.mapKeys=Hx,h.mapValues=Vx,h.matches=DC,h.matchesProperty=$C,h.memoize=Xo,h.merge=Gx,h.mergeWith=Wh,h.method=FC,h.methodOf=UC,h.mixin=Ua,h.negate=Jo,h.nthArg=HC,h.omit=Qx,h.omitBy=qx,h.once=jS,h.orderBy=IS,h.over=VC,h.overArgs=HS,h.overEvery=GC,h.overSome=QC,h.pa
Line truncated
|
||||
`;function ur({blocks:e=[],arrows:t=[],arrowId:r,rotate:l=!1,rotateNegative:o=!1,flip:s=!1,lines:c=[],children:f=[],includeInlineStyle:d=!1,effect:m,...y}){Z.useEffect(()=>m==null?void 0:m()),r=r||Math.floor(Math.random()*Math.pow(2,4*8)).toString(16),f?Symbol.iterator in f||(f=[f]):f=[],y.className||(y.className=""),y.className+=" cBuilderSvg";const w=()=>d?T.jsx("style",{children:Kk}):T.jsx(T.Fragment,{});return T.jsxs("svg",{viewBox:"0 0 100 100",...y,children:[T.jsx(w,{}),T.jsxs("defs",{children:[T.jsx("marker",{id:`arrow_${r}`,viewBox:"0 0 10 10",refX:"5",refY:"5",markerWidth:"2.5",markerHeight:"2.5",orient:"auto-start-reverse",fill:"currentColor",className:"cBuilderSvg__marker",markerUnits:"strokeWidth",children:T.jsx("path",{d:"M 0 0 L 10 5 L 0 10 Z"})}),T.jsx("clipPath",{id:`main_clip_${r}`,clipPathUnits:"userSpaceOnUse",children:T.jsx("rect",{x:5,y:5,width:90,height:90,rx:11.75})}),T.jsx("clipPath",{id:`clip1_${r}`,clipPathUnits:"userSpaceOnUse",children:T.jsx("path",{d:"M 0 0 L 25 0 L 25 100 L 0 100 Z"})}),T.jsx("clipPath",{id:`clip2_${r}`,clipPathUnits:"userSpaceOnUse",children:T.jsx("path",{d:"M72.5 0 L 97.5 0 L 97.5 100 L 72.5 100 Z"})}),T.jsx("clipPath",{id:`clip3_${r}`,clipPathUnits:"userSpaceOnUse",children:T.jsx("path",{d:"M75 25 L 80 25 A 5 5 0 0 0 85 30 L 85 80 A 5 5 0 0 0 80 85 L 30 85 A 5 5 0 0 0 25 80 L 25 75 L 70 75 A 5 5 0 0 0 75 70 Z"})}),T.jsx("clipPath",{id:`clip4_${r}`,clipPathUnits:"userSpaceOnUse",children:T.jsx("rect",{x:20,y:70,width:60,height:15,rx:5})})]}),T.jsx("g",{transform:l?void 0:`rotate(${o?"-":""}90)`,x:0,y:0,width:100,height:100,children:T.jsxs("g",{transform:l?void 0:`scale(${s?"1,-1":"1,1"})`,x:0,y:0,width:100,height:100,children:[T.jsx("rect",{width:95,height:95,x:2.5,y:2.5,rx:15,fill:"none",stroke:"none",strokeWidth:5,"data-role":"background"}),T.jsxs("g",{id:"mainarea",clipPath:`url(#main_clip_${r})`,children:[e.map((x,k)=>T.jsx("rect",{fill:"currentColor",rx:5,...x},k)),t.map(x=>T.jsx("path",{d:"M "+(x instanceof Array?x:x.points).map(({x:k,y:O})=>`${k} ${O}`).join(" L "),rx:20,fill:"none",strokeWidth:6,stroke:"currentColor",strokeLinejoin:"round",markerStart:["both","start"].includes(x.marker)?`url(#arrow_${r})`:void 0,markerEnd:["both","end",void 0].includes(x.marker)?`url(#arrow_${r})`:void 0,className:"cBuilderSvg__arrow"},JSON.stringify(x))),c.map(x=>T.jsx("path",{d:"M "+(x instanceof Array?x:x.points).map(({x:k,y:O})=>`${k} ${O}`).join(" L "),rx:20,fill:"none",strokeWidth:6,stroke:"currentColor",strokeLinejoin:"round",className:x.className||void 0},JSON.stringify(x))),f]}),T.jsx("rect",{width:95,height:95,x:2.5,y:2.5,rx:15,fill:"none",stroke:"currentColor",strokeWidth:5,"data-role":"outerborder"})]})})]})}function Yk({pattern:e="start",horizontal:t=!0,...r}){const o=[{width:60},{width:80},{width:40}].map((s,c)=>({...s,height:23.4,className:"cBuilderSvg__box--outlined",y:5+90*c/3+1.3+2,x:(()=>e==="end"?97.5-s.width:e==="center"?50-s.width/2:2.5)()}));return T.jsx(ur,{blocks:o,rotate:t,...r})}function cn({...e}){return e.className=[e.className||"","cBuilderSvg__image-icon"].join(" ").trim().replace(/\s+/," "),T.jsxs("svg",{...e,viewBox:"0 0 90 90",children:[T.jsx("rect",{x:0,y:0,className:"cBuilderSvg__box--secondaryColoring",width:90,height:90,rx:10,fill:"currentColor"}),T.jsx("path",{d:"M4 86 L 25 28 L 55 68 L 69 50 L 84 86Z",stroke:"currentColor",strokeWidth:"6",fill:"currentColor",strokeLinejoin:"round"}),T.jsx("circle",{r:"10",cx:"70",cy:"20",fill:"currentColor",stroke:"currentColor"})]})}const _l=[[{x:35,y:84},{x:16,y:84}],[{x:65,y:84},{x:84,y:84}]];function Zk({behavior:e="wrap",horizontal:t=!1,...r}){r.className=r.className||"",r.className+=" cBuilderSvg--wrap-icon";const l=[],o=[],s=[];let c=4,f=c,d=[57,31],m,y,w,x,k,O;switch(e){case"carousel":l.push({width:15,height:40,x:0,y:20,className:"cBuilderSvg__box--outlined"}),l.push({width:66,height:60,x:17,y:10,className:"cBuilderSvg__box--outlined"}),l.push({width:15,height:40,x:85,y:20,className:"cBuilderSvg__box--outlined"}),l.push({height:3,width:40,y:25,x:22,rx:0}),l.push({height:3,width:30,y:32,x:22,rx:0}),l.push({height:3,width:52,y:39,x:22,rx:0}),l.push({height:3,width:22,y:46,x:22,rx:0}),o.push([{x:35,y:84},{x:16,y:84}]),o.push([{x:65,y:84},{x:84,y:84}]);break;case"table":case"table-carousel":c=1.3,w=e==="table-carousel"?78:70,x=e==="table-carousel"?11:15,m=e==="table-carousel"?20:0,y=e==="table-carousel"?1:3;for(let I=0;I<y;I++)l.push({height:85/3-4-2*c,width:w,y:7.5+85*I/3+c+2+m,x,className:"cBuilderSvg__box--outlined"});e==="table-carousel"&&o.splice(0,0,..._l.map(I=>I.map(P=>({x:P.x,y:P.y-15}))));break;case"mini-grid":case"grid-carousel":case"mini-grid-carousel":case"grid":k=e.startsWith("mini")?3:2,y=e.startsWith("mini")?3:2,O=88,m=e==="grid-carousel"?7:0,e.startsWith("mini")&&(f=10,c=5),e==="grid-carousel"&&(y=1,k=3),e.endsWith("carousel")&&(O=e.startsWith("mini")?68:54,o.splice(o.length,0,..._l.map(I=>I.map(P=>({x:P.x,y:P.y-5}))))),e==="mini-grid"&&(m=10,O=68),e==="mini-grid-carousel"&
Line truncated
|
||||
<div
|
||||
class="ipsLoading"
|
||||
style="width:${le.width}px; height:${le.height}px; position:static !important;"
|
||||
>
|
||||
<div class="ipsRichText ipsWidget__content ipsWidget__padding">
|
||||
${ie}
|
||||
</div>
|
||||
</div>`)}else c.current.style.height=`${le.height}px`,c.current.style.width=`${le.width}px`;setTimeout(async()=>{let se;try{se=await window.ips.fetch(U.action,{data:b,method:"post",bypassRedirect:!0})}catch(Fe){window.Debug.error(Fe)}_.hide(),z.remove(),t("default"),d({}),s(se)},100)})),_.addContentProcessor(U=>{var b,Q;const A=(b=z.parentElement)==null?void 0:b.getBoundingClientRect();if(A){const te=z.parentElement;te.style.width=A.width+"px",te.style.height=A.height+"px";const ie=(Q=U.closest(".ipsDialog"))==null?void 0:Q.getAttribute("id");if(ie){const le=(ce,{dialogID:se})=>{ie===se&&(te.style.width="",te.style.height="",te.appendChild(z),P(z),window.$(document).off("hideDialog",le))};window.$(document).on("hideDialog",le)}}let B=z;for(;B;){if(B.parentElement===U)return;B=B.parentElement}U.innerHTML="",U.appendChild(z),P(z,!0)}),d({element:z,configId:M,dialogRef:_})}t("editing")}}}}function eo(e){return(e instanceof Element?e:document).querySelector("[data-ipsconfigform]")}function _3(e){return!1}function S3({blockID:e,title:t,config:r,update:l,defaultConfiguration:o,blank:s,getArea:c,contentRaw:f,selectArea:d},m){const[y,w]=Z.useState("default"),x=Z.useRef(null),k=Q=>{y==="default"&&Q==="editing"&&e.startsWith("app_cms_Wysiwyg")&&(_==null||_()),w(Q)};let O=!1;const{area:I}=Z.useContext(Yr),{setEditing:P,editForm:v,captureHeight:_,blockUsesInlineEditing:C,toolList:M,tiptapRef:z,toolListWrap:U}=y3({blockID:e,setState:k,state:y,blockArea:I,title:t,reloadContent:B,contentRaw:f},m);Z.useEffect(()=>{if(y==="default"){const Q=e.split("_");(!Q[3]||s)&&(O=!Q[3],O&&(e+=`_${Math.random().toString(36).slice(2,9)}`),B(),k("loading"))}}),Z.useEffect(()=>{var Q;r&&x.current&&((Q=x.current)==null?void 0:Q.dataset.menuListenerSet)!=="true"&&(x.current.dataset.menuListenerSet="true",window.$(document).trigger("contentChange",[window.$(x.current.parentElement)]),x.current.addEventListener("ipsMenuOpened",async te=>{if(await new Promise(le=>setTimeout(le,1)),C){await d(),b(),await P();return}let ie=`${window.ips.getSetting("baseURL")}index.php?${Object.entries(so()).map(([le,ce])=>`${encodeURIComponent(le)}=${encodeURIComponent(ce)}`).join("&")}&do=getConfiguration&block=${encodeURIComponent(e)}&pageApp=${encodeURIComponent(document.body.dataset.pageapp)}&pageModule=${encodeURIComponent(document.body.dataset.pagemodule)}&pageController=${encodeURIComponent(document.body.dataset.pagecontroller)}&pageArea=${encodeURIComponent(I)}&area=${encodeURIComponent(I)}`;try{if(A()==="modal"){b();const le=window.ips.ui.dialog.create({title:t,url:ie,forceReload:!0,destructOnClose:!0,remoteSubmit:!0});le.show(),document.querySelectorAll(`[id="${e}_edit_menu"]`).ipsHide();const ce=Qn.throttle(se=>{se.dialogID===le.dialogID&&(se.stopImmediatePropagation(),se.preventDefault(),B(se.response))},200);document.addEventListener("dialogSubmission",ce,{once:!0})}else te.menu.html(window.$("<div/>").addClass("ipsLoading").css({height:"100px"})),setTimeout(async()=>{const le=await window.ips.fetch(ie),ce=te.menu.get(0);if(ce.id)for(const se of document.querySelectorAll(`[id="${ce.id}"]`))se!==ce&&se.remove();te.menu.html(le).find("form").on("submit",async se=>{var Fe;se.preventDefault();try{const pe=await window.ips.fetch(window.$(se.currentTarget).attr("action"),{data:window.$(se.currentTarget).serialize(),type:"post"});typeof pe=="object"||((Fe=pe==null?void 0:pe.toLowerCase)==null?void 0:Fe.call(pe))==="ok"?(await B(pe),te.menu.trigger("closeMenu")):typeof pe=="string"&&te.menu.html(pe)}catch(pe){window.Debug.warn(pe),window.ips.ui.alert.show({type:"alert",icon:"warn",message:window.ips.getString("sidebarConfigError"),callbacks:{}})}}),te.menu.trigger("contentChange",[te.menu])},10);document.body.dispatchEvent(new is(null))}catch(le){window.Debug.warn(le),window.ips.ui.alert("Something went wrong when loading the configuration settings")}await d()}))});function A(){var Q;return((Q=xr(e))==null?void 0:Q.dataset.menustyle)||"none"}async function B(Q){const te={blockID:e,title:t,config:r,blank:!1,contentRaw:"Error"};(Q==null?void 0:Q.areaClasses)instanceof Array&&(te.areaClasses=Array.from(new Set(Q.areaClasses)));try{const ie=await Tv(e,o,I,O,c().wrapBehavior);te.contentRaw=ie,te.defaultConfiguration=void 0,l==null||l(te),k("default")}catch(ie){l==null||l(te),k("contentLoadError"),window.Debug.log("something went wrong when loading a block's content."),window.Debug.error(ie)}}function b(){document.querySelectorAll(`[id="${e}_edit_menu"]`).ipsHide()}return{reloadContent:B,state:y,setState:k,editForm:v,blockUsesInlineEditing:C,manageBlockRef:x,toolList:M,tiptapRef:z,toolListWrap:U}}function ao(e){return e.split("_").slice(0,3).join("_")}function xr(e){if(typeof e!="string")return window.Debug.warn("Could not get a block base because the id is not a string"),null;const t=ao(e);return t?document.querySelector(`[data-role="availableBlocks"] :is([data-blockID="${t}"],[data-blockID*="${t}_"])`):(window.Debug.warn(`The block id ${JSON.stringify(e)} does
Line truncated
|
||||
`)),await window.ips.ui.editorv5.whenLoaded();const se=document.createElement("div");se.setAttribute("hidden",""),document.body.appendChild(se);const[Fe,pe]=await window.ips.utils.tiptap.editorInstance(se,{...window.ips.ui.editorv5.buildConfig({}),content:ce});if(await new Promise(F=>setTimeout(F)),ce=Fe.getHTML(),Fe.destroy(),pe.unmount(),se.remove(),ce){A={orientation:e==="horizontal"?"vertical":"horizontal",children:[],wrapBehavior:"table",otherOptions:{},widgets:[{title:"WYSIWYG Editor",blockID:"app_cms_Wysiwyg",config:!0,blank:!1,contentRaw:ce,defaultConfiguration:{content:ce}}]};break}throw new Error(`The data from the drop event did not include ${le}, so the block could not be inserted in the widget area tree`)}const b=(B==null?void 0:B.blockID)||((O=A==null?void 0:A.widgets)==null?void 0:O[0].blockID),Q=b?xr(b):null;if(new Set(((P=(I=Q==null?void 0:Q.dataset)==null?void 0:I.widgetDisallowedAreas)==null?void 0:P.split(",").map(le=>le.trim()))||[]).has(w)){document.querySelectorAll("section.cWidgetContainer:not([data-controller])").forEach(le=>{le.removeAttribute("hidden"),le.querySelectorAll(":scope > .cWidgetContainer__menu_region").forEach(ce=>ce.style.display="")});return}const ie=y.current;if(ie){if(B.blockID.startsWith("app_cms_Blocks:")){const F=xr(B.blockID),V=F==null?void 0:F.dataset.customblockid;if(!V)throw new Error("The dropped block is a custom block but the block id is invalid");const G=await window.ips.fetch(window.ips.getSetting("baseURL"),{method:"get",data:{app:"cms",module:"pages",controller:"builder",do:"getCustomBlockContent",id:V}});if(typeof G.content!="string"||typeof G.block_key!="string"||typeof((v=G.configuration)==null?void 0:v.blocktitle)!="string")throw new TypeError("Could not add a custom block because the server didn't return a string for it's content, blocktitle data attribute, or block key (as in the key of the custom block)");B.contentRaw=G.content,B.defaultConfiguration={cms_widget_custom_block:G.block_key},B.blockID=`app_cms_Blocks_${Math.round(Math.random()*Math.pow(16,8)).toString(16)}`,B.blockTitle=G.configuration.blocktitle}const le=Lv(ie,k.clientX,k.clientY),ce=B.areaDetails,se={title:B.blockTitle,blockID:B.blockID,config:B.config,blank:B.blank,contentRaw:B.contentRaw||"<div class='ipsLoading'></div>"};B.defaultConfiguration&&(se.defaultConfiguration=se.configuration=B.defaultConfiguration),A=A||{orientation:e==="horizontal"?"vertical":"horizontal",children:[],wrapBehavior:(ce==null?void 0:ce.wrapBehavior)||B.ipsWrapBehavior||((M=(C=(_=hd(B.blockID))==null?void 0:_.values())==null?void 0:C.next())==null?void 0:M.value)||"table",otherOptions:{...ce==null?void 0:ce.otherOptions},widgets:[se]};const Fe=await Av(),pe=[];if(Number.isInteger(B==null?void 0:B.areaId)&&B.area===w&&B.pageHash===Fe&&pe.push(B.areaId),pe.includes(f))return;if(ao(A.widgets[0].blockID)===A.widgets[0].blockID){A.widgets[0].blockID+="_";for(let F=0;F<6;F++)A.widgets[0].blockID+=Math.round(Math.random()*16).toString(16);A.widgets[0].contentRaw=await Tv(A.widgets[0].blockID,A.widgets[0].defaultConfiguration,w,!0,A.wrapBehavior),A.widgets[0].blank=!1}if((z=y==null?void 0:y.current)!=null&&z.closest(".cWidgetContainer--carousel")&&A.wrapBehavior in be&&(A.wrapBehavior=be[A.wrapBehavior],A.widgets.length&&(A.widgets[0].blank=!0,A.widgets[0].contentRaw=`<div class="ipsLoading">${A.widgets[0].contentRaw||""}</div>`)),["before","after"].includes(le))A.orientation=e,c==null||c(A,le==="before",pe);else if(!t.length&&s.length){const F={orientation:e==="horizontal"?"vertical":"horizontal",children:[],wrapBehavior:r,otherOptions:o,widgets:s,areaId:f};l({newState:{children:le===0?[A,F]:[F,A],wrapBehavior:"wrap",widgets:[],otherOptions:{}},toRemove:pe})}else t.splice(le,0,A),l({newState:{children:t},toRemove:pe});(U=y.current)==null||U.dispatchEvent(new to({widget:A.widgets[0],area:w}))}}catch(A){window.Debug.warn(A),window.Debug.log("Could not insert the content dropped inside a widget area"),window.ips.ui.alert.show({message:"This content cannot be dropped in the page"})}document.querySelectorAll("section.cWidgetContainer:not([data-controller])").forEach(A=>{A.removeAttribute("hidden"),A.querySelectorAll(":scope > .cWidgetContainer__menu_region").forEach(B=>B.style.display="")})},onDragOver:k=>{k.preventDefault(),k.stopPropagation(),A3({e:k,ref:y,orientation:e,wrapBehavior:r,getParent:d,children:t,clientX:k.clientX,clientY:k.clientY,blockArea:w})}}}function R3(e,t){if(e!=null&&e.classList.contains("cWidgetContainer--dragInside")){const r=e.getBoundingClientRect();let l;if(e.scrollWidth<=r.width)return!1;if(t<r.left+Math.min(r.width/10,70))l="prev";else if(t>r.right-Math.max(r.width/10,70))l="next";else return!1;if(l&&!window.ips.ui.carousel.containerAtEnd(e,l))return T3(e,l),!0}return!1}const T3=Qn.throttle((e,t)=>{e.dispatchEvent(new CustomEvent("scrollPanels",{detail:{direction:t,loop:!1}}))},1e3),A3=Qn.throttle(function({ref:e,orientation:t,wrapBehavior:r,getParent:l,children:o,clientX:s,clientY:c,Line truncated
|
||||
|
||||
`+k.message,window.Debug.warn(k)}}},200);function pi(e,t,r=400){var l;rt.has(e)||rt.set(e,new Map);for(const o of t.split(/\s+/).filter(s=>!!s)){rt.get(e).has(o)&&(clearTimeout(rt.get(e).get(o)),rt.get(e).delete(o)),e.classList.add(o),document.querySelectorAll(`.${o}`).forEach(c=>{var f;if(c!==e){c.classList.remove(o);const d=(f=rt.get(c))==null?void 0:f.get(o);d&&(clearTimeout(d),rt.get(c).delete(o))}});const s=setTimeout(()=>{var f;e.classList.remove(o);const c=(f=rt.get(e))==null?void 0:f.get(o);c&&(clearTimeout(c),rt.get(e).delete(o),rt.get(e).size||rt.delete(e))},r);rt.get(e).set(o,s)}(l=rt.get(e))!=null&&l.size||rt.delete(e)}setInterval(()=>{for(const e of rt.keys())if(e.closest("body")!==document.body){for(const t of rt.get(e).values())clearTimeout(t);rt.delete(e)}},5e3);const rt=new Map;function O3({wrapBehavior:e,widgets:t,scrollRef:r}){const l=Z.useRef(null),o=e==="carousel"&&!t.length;Z.useEffect(()=>{if(o&&(d(),r.current)){const y=r.current;os.set(y,d);const w=k=>{var M;const[O,I,P]=c(),v=((M=k==null?void 0:k.detail)==null?void 0:M.direction)||"next",_=v!=="prev"&&(O>=I-1||P[I-1].getBoundingClientRect().right<=y.getBoundingClientRect().right);if(v==="prev"&&O===0||v!=="prev"&&_)return;const C=y.querySelector(`[data-carousel-arrow="${v}"]`);C instanceof HTMLElement&&m({target:C})};y.addEventListener("scrollPanels",w);const x=new ResizeObserver(Qn.debounce(d,100));return x.observe(r.current),()=>{os.delete(y),y.removeEventListener("scrollPanels",w),x.disconnect()}}});function s(){var y;return(y=r.current)!=null&&y.classList.contains("cWidgetContainer--carousel")?r.current:null}function c(){var I;const y=s(),w=y==null?void 0:y.querySelectorAll(":scope > .cWidgetContainer");if(!w)throw new ReferenceError;const x=w.length;if(gf.has(y))return[parseInt(((I=l.current)==null?void 0:I.dataset.actualOffset)||"0"),x,w];const k=y.getBoundingClientRect();let O;for(O=0;O<x;O++)if(w[O].getBoundingClientRect().left>=k.left-1)return[O,x,w];return[x-1,x,w]}function f(){var k,O;const y=(k=r.current)==null?void 0:k.getBoundingClientRect(),w=(O=r.current)==null?void 0:O.querySelectorAll(":scope > .cWidgetContainer");if(!y||!(w!=null&&w.length)||w.length===1)return 1;const x=Math.abs(w[w.length-1].getBoundingClientRect().right-w[0].getBoundingClientRect().left);if(x){let I=Math.ceil(x/y.width);return w.length>2&&w[w.length-1].getBoundingClientRect().right-w[w.length-2].getBoundingClientRect().left>y.width&&I++,I}return 1}function d(){if(!l.current)return;let[y,w]=c();const x=f();y=Math.min(y,x),w=Math.min(w,x),l.current.innerText=`${y+1}/${w}`,l.current.closest(".cWidgetContainer__carousel-buttons").querySelectorAll("button").forEach(k=>w<=1?k.setAttribute("disabled",""):k.removeAttribute("disabled"))}function m(y){const w=s();if(!w)return;const x=y.target instanceof HTMLElement&&y.target.dataset.carouselArrow||"next",[k,O,I]=c();if(I.length<=1)return;const P=w.getBoundingClientRect(),v=x!=="prev"&&(k+1>=O||I[O-1].getBoundingClientRect().right<=P.right),_=(x==="prev"&&k===0?O-1:v?0:k+(x==="prev"?-1:1))%O;let C=(_===O-1?I[_].getBoundingClientRect().right:I[_].getBoundingClientRect().left)-P.left;l.current.dataset.actualOffset=`${_}`,gf.add(w),w.scrollTo({left:r.current.scrollLeft+C,behavior:"smooth"}),d()}return{indicatorRef:l,scroll:m}}const gf=new WeakSet,os=new WeakMap;function Ov(e,t=!1){var r,l;if((r=e.classList)!=null&&r.contains("cWidgetContainer--carousel")&&e.querySelector(".ipsWidget__content--wrap--editing")){const o=e.querySelector(".ipsWidget__content--wrap--editing"),s=(l=window.ips.ui.editorv5.getObj(window.$(o.querySelector("[data-ipseditorv5]"))))==null?void 0:l.getInstance();t?o==null||o.dispatchEvent(new CustomEvent("ips:editorHidePanes",{detail:{instance:s},bubbles:!0,cancelable:!0})):o.dispatchEvent(new CustomEvent("ips:editorShowPanes",{detail:{instance:s},bubbles:!0,cancelable:!0}))}}function l0(e){let t=e.target;for(;t instanceof HTMLElement;){if(Ov(t),os.has(t)){let r=!1;const l=e.stopPropagation;if(e.stopPropagation=(function(){r=!0,l.call(this)}).bind(e),os.get(t)(e),gf.delete(t),r)break;e.stopPropagation=l.bind(e)}t=t.parentElement}}"onscrollend"in HTMLElement.prototype?window.addEventListener("scrollend",l0,{capture:!0}):window.addEventListener("scroll",Qn.debounce(l0,200),{capture:!0});window.addEventListener("scroll",e=>{var r;let t=e.target;(r=t==null?void 0:t.classList)!=null&&r.contains("cWidgetContainer--carousel")&&Ov(t,!0)},{capture:!0});function P3({widgets:e,scrollRef:t,wrapBehavior:r}){const{indicatorRef:l,scroll:o}=O3({widgets:e,scrollRef:t,wrapBehavior:r});return T.jsxs("div",{className:"cWidgetContainer__carousel-buttons","data-controller":"core.front.widgets.carouselControls",children:[T.jsx("div",{className:"cWidgetContainer__carousel-indicator",ref:l}),[["prev","left"],["next","right"]].map(([s,c])=>T.jsx("button",{onClick:o,"data-carousel-arrow":s,children:T.jsx("i",{className:`fa-solid fa-chevron-${c}`})},s))]})}function Pv({...e}){var A,B,b,Q,te,ie,le,ce,se,Fe,pe;const{
Line truncated
|
||||
@@ -11,7 +11,7 @@
|
||||
"css": [
|
||||
"assets/main-51be5621.css"
|
||||
],
|
||||
"file": "assets/main-30bc7f27.js",
|
||||
"file": "assets/main-b6d5f44d.js",
|
||||
"isEntry": true,
|
||||
"src": "src/main.jsx"
|
||||
}
|
||||
|
||||
@@ -0,0 +1,207 @@
|
||||
var Ql=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function am(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var AO={exports:{}},sm={},IO={exports:{}},Ge={};/**
|
||||
* @license React
|
||||
* react.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/var Eu=Symbol.for("react.element"),zU=Symbol.for("react.portal"),WU=Symbol.for("react.fragment"),qU=Symbol.for("react.strict_mode"),KU=Symbol.for("react.profiler"),QU=Symbol.for("react.provider"),XU=Symbol.for("react.context"),jU=Symbol.for("react.forward_ref"),ZU=Symbol.for("react.suspense"),JU=Symbol.for("react.memo"),eF=Symbol.for("react.lazy"),KC=Symbol.iterator;function tF(e){return e===null||typeof e!="object"?null:(e=KC&&e[KC]||e["@@iterator"],typeof e=="function"?e:null)}var DO={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},wO=Object.assign,xO={};function _l(e,t,n){this.props=e,this.context=t,this.refs=xO,this.updater=n||DO}_l.prototype.isReactComponent={};_l.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};_l.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function MO(){}MO.prototype=_l.prototype;function mS(e,t,n){this.props=e,this.context=t,this.refs=xO,this.updater=n||DO}var fS=mS.prototype=new MO;fS.constructor=mS;wO(fS,_l.prototype);fS.isPureReactComponent=!0;var QC=Array.isArray,LO=Object.prototype.hasOwnProperty,gS={current:null},kO={key:!0,ref:!0,__self:!0,__source:!0};function PO(e,t,n){var r,i={},o=null,a=null;if(t!=null)for(r in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(o=""+t.key),t)LO.call(t,r)&&!kO.hasOwnProperty(r)&&(i[r]=t[r]);var s=arguments.length-2;if(s===1)i.children=n;else if(1<s){for(var c=Array(s),d=0;d<s;d++)c[d]=arguments[d+2];i.children=c}if(e&&e.defaultProps)for(r in s=e.defaultProps,s)i[r]===void 0&&(i[r]=s[r]);return{$$typeof:Eu,type:e,key:o,ref:a,props:i,_owner:gS.current}}function nF(e,t){return{$$typeof:Eu,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function hS(e){return typeof e=="object"&&e!==null&&e.$$typeof===Eu}function rF(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var XC=/\/+/g;function pg(e,t){return typeof e=="object"&&e!==null&&e.key!=null?rF(""+e.key):t.toString(36)}function Ep(e,t,n,r,i){var o=typeof e;(o==="undefined"||o==="boolean")&&(e=null);var a=!1;if(e===null)a=!0;else switch(o){case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case Eu:case zU:a=!0}}if(a)return a=e,i=i(a),e=r===""?"."+pg(a,0):r,QC(i)?(n="",e!=null&&(n=e.replace(XC,"$&/")+"/"),Ep(i,t,n,"",function(d){return d})):i!=null&&(hS(i)&&(i=nF(i,n+(!i.key||a&&a.key===i.key?"":(""+i.key).replace(XC,"$&/")+"/")+e)),t.push(i)),1;if(a=0,r=r===""?".":r+":",QC(e))for(var s=0;s<e.length;s++){o=e[s];var c=r+pg(o,s);a+=Ep(o,t,n,c,i)}else if(c=tF(e),typeof c=="function")for(e=c.call(e),s=0;!(o=e.next()).done;)o=o.value,c=r+pg(o,s++),a+=Ep(o,t,n,c,i);else if(o==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return a}function Id(e,t,n){if(e==null)return e;var r=[],i=0;return Ep(e,r,"","",function(o){return t.call(n,o,i++)}),r}function iF(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Dn={current:null},Sp={transition:null},oF={ReactCurrentDispatcher:Dn,ReactCurrentBatchConfig:Sp,ReactCurrentOwner:gS};function UO(){throw Error("act(...) is not supported in production builds of React.")}Ge.Children={map:Id,forEach:function(e,t,n){Id(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Id(e,function(){t++}),t},toArray:function(e){return Id(e,function(t){return t})||[]},only:function(e){if(!hS(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};Ge.Component=_l;Ge.Fragment=WU;Ge.Profiler=KU;Ge.PureComponent=mS;Ge.StrictMode=qU;Ge.Suspense=ZU;Ge.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=oF;Ge.act=UO;Ge.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=wO({},e.props),i=e.key,o=e.ref,a=e._owner;if(t!=null){if(t.ref!==void 0&&(o=t.ref,a=gS.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var s=e.type.defaultProps;for(c in t)LO.call(t,c)&&!kO.hasOwnProperty(c)&&(r[c]=t[c]===void 0&&s!==void 0?s[c]:t[c])}var c=arguments.length-2;if(c===1)r.children=n;else if(1<c){s=Array(c);for(var d=0;d<c;d++)s[d]=arguments[d+2];r.children=s}return{$$typeof:Eu,type:e.type,key:i,ref:o,props:r,_owner:a}};Ge.createContext=function(e){return e={$$typeof:XU,_currentValue:e,_currentValue2:e,_threadCountLine truncated
|
||||
* @license React
|
||||
* react-jsx-runtime.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/var aF=B,sF=Symbol.for("react.element"),lF=Symbol.for("react.fragment"),cF=Object.prototype.hasOwnProperty,uF=aF.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,dF={key:!0,ref:!0,__self:!0,__source:!0};function FO(e,t,n){var r,i={},o=null,a=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(a=t.ref);for(r in t)cF.call(t,r)&&!dF.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:sF,type:e,key:o,ref:a,props:i,_owner:uF.current}}sm.Fragment=lF;sm.jsx=FO;sm.jsxs=FO;AO.exports=sm;var N=AO.exports,wh={},BO={exports:{}},dr={},GO={exports:{}},YO={};/**
|
||||
* @license React
|
||||
* scheduler.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/(function(e){function t(D,Y){var V=D.length;D.push(Y);e:for(;0<V;){var Z=V-1>>>1,oe=D[Z];if(0<i(oe,Y))D[Z]=Y,D[V]=oe,V=Z;else break e}}function n(D){return D.length===0?null:D[0]}function r(D){if(D.length===0)return null;var Y=D[0],V=D.pop();if(V!==Y){D[0]=V;e:for(var Z=0,oe=D.length,Oe=oe>>>1;Z<Oe;){var ze=2*(Z+1)-1,be=D[ze],Ce=ze+1,yt=D[Ce];if(0>i(be,V))Ce<oe&&0>i(yt,be)?(D[Z]=yt,D[Ce]=V,Z=Ce):(D[Z]=be,D[ze]=V,Z=ze);else if(Ce<oe&&0>i(yt,V))D[Z]=yt,D[Ce]=V,Z=Ce;else break e}}return Y}function i(D,Y){var V=D.sortIndex-Y.sortIndex;return V!==0?V:D.id-Y.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var a=Date,s=a.now();e.unstable_now=function(){return a.now()-s}}var c=[],d=[],p=1,_=null,f=3,g=!1,h=!1,S=!1,b=typeof setTimeout=="function"?setTimeout:null,T=typeof clearTimeout=="function"?clearTimeout:null,y=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function R(D){for(var Y=n(d);Y!==null;){if(Y.callback===null)r(d);else if(Y.startTime<=D)r(d),Y.sortIndex=Y.expirationTime,t(c,Y);else break;Y=n(d)}}function O(D){if(S=!1,R(D),!h)if(n(c)!==null)h=!0,se(I);else{var Y=n(d);Y!==null&&M(O,Y.startTime-D)}}function I(D,Y){h=!1,S&&(S=!1,T($),$=-1),g=!0;var V=f;try{for(R(Y),_=n(c);_!==null&&(!(_.expirationTime>Y)||D&&!ae());){var Z=_.callback;if(typeof Z=="function"){_.callback=null,f=_.priorityLevel;var oe=Z(_.expirationTime<=Y);Y=e.unstable_now(),typeof oe=="function"?_.callback=oe:_===n(c)&&r(c),R(Y)}else r(c);_=n(c)}if(_!==null)var Oe=!0;else{var ze=n(d);ze!==null&&M(O,ze.startTime-Y),Oe=!1}return Oe}finally{_=null,f=V,g=!1}}var x=!1,k=null,$=-1,z=5,H=-1;function ae(){return!(e.unstable_now()-H<z)}function _e(){if(k!==null){var D=e.unstable_now();H=D;var Y=!0;try{Y=k(!0,D)}finally{Y?ue():(x=!1,k=null)}}else x=!1}var ue;if(typeof y=="function")ue=function(){y(_e)};else if(typeof MessageChannel<"u"){var me=new MessageChannel,Ee=me.port2;me.port1.onmessage=_e,ue=function(){Ee.postMessage(null)}}else ue=function(){b(_e,0)};function se(D){k=D,x||(x=!0,ue())}function M(D,Y){$=b(function(){D(e.unstable_now())},Y)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(D){D.callback=null},e.unstable_continueExecution=function(){h||g||(h=!0,se(I))},e.unstable_forceFrameRate=function(D){0>D||125<D?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):z=0<D?Math.floor(1e3/D):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return n(c)},e.unstable_next=function(D){switch(f){case 1:case 2:case 3:var Y=3;break;default:Y=f}var V=f;f=Y;try{return D()}finally{f=V}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(D,Y){switch(D){case 1:case 2:case 3:case 4:case 5:break;default:D=3}var V=f;f=D;try{return Y()}finally{f=V}},e.unstable_scheduleCallback=function(D,Y,V){var Z=e.unstable_now();switch(typeof V=="object"&&V!==null?(V=V.delay,V=typeof V=="number"&&0<V?Z+V:Z):V=Z,D){case 1:var oe=-1;break;case 2:oe=250;break;case 5:oe=1073741823;break;case 4:oe=1e4;break;default:oe=5e3}return oe=V+oe,D={id:p++,callback:Y,priorityLevel:D,startTime:V,expirationTime:oe,sortIndex:-1},V>Z?(D.sortIndex=V,t(d,D),n(c)===null&&D===n(d)&&(S?(T($),$=-1):S=!0,M(O,V-Z))):(D.sortIndex=oe,t(c,D),h||g||(h=!0,se(I))),D},e.unstable_shouldYield=ae,e.unstable_wrapCallback=function(D){var Y=f;return function(){var V=f;f=Y;try{return D.apply(this,arguments)}finally{f=V}}}})(YO);GO.exports=YO;var pF=GO.exports;/**
|
||||
* @license React
|
||||
* react-dom.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/var _F=B,ur=pF;function ee(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 HO=new Set,kc={};function $a(e,t){Xs(e,t),Xs(e+"Capture",t)}function Xs(e,t){for(kc[e]=t,e=0;e<t.length;e++)HO.add(t[e])}var Bi=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),xh=Object.prototype.hasOwnProperty,mF=/^[: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]*$/,jC={},ZC={};function fF(e){return xh.call(ZC,e)?!0:xh.call(jC,e)?!1:mF.test(e)?ZC[e]=!0:(jC[e]=!0,!1)}function gF(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function hF(e,t,n,r){if(t===null||typeof t>"u"||gF(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function wn(e,t,n,r,i,o,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var rn={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){rn[e]=new wn(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];rn[t]=new wn(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){rn[e]=new wn(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){rn[e]=new wn(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){rn[e]=new wn(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){rn[e]=new wn(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){rn[e]=new wn(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){rn[e]=new wn(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){rn[e]=new wn(e,5,!1,e.toLowerCase(),null,!1,!1)});var ES=/[\-:]([a-z])/g;function SS(e){return e[1].toUpperCase()}"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(ES,SS);rn[t]=new wn(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(ES,SS);rn[t]=new wn(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(ES,SS);rn[t]=new wn(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){rn[e]=new wn(e,1,!1,e.toLowerCase(),null,!1,!1)});rn.xlinkHref=new wn("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){rn[e]=new wn(e,1,!1,e.toLowerCase(),null,!0,!0)});function TS(e,t,n,r){var i=rn.hasOwnProperty(t)?rn[t]:null;(i!==null?i.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!==
Line truncated
|
||||
`+_g+e}var mg=!1;function fg(e,t){if(!e||mg)return"";mg=!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()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(d){var r=d}Reflect.construct(e,[],t)}else{try{t.call()}catch(d){r=d}e.call(t.prototype)}else{try{throw Error()}catch(d){r=d}e()}}catch(d){if(d&&r&&typeof d.stack=="string"){for(var i=d.stack.split(`
|
||||
`),o=r.stack.split(`
|
||||
`),a=i.length-1,s=o.length-1;1<=a&&0<=s&&i[a]!==o[s];)s--;for(;1<=a&&0<=s;a--,s--)if(i[a]!==o[s]){if(a!==1||s!==1)do if(a--,s--,0>s||i[a]!==o[s]){var c=`
|
||||
`+i[a].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),c}while(1<=a&&0<=s);break}}}finally{mg=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?uc(e):""}function EF(e){switch(e.tag){case 5:return uc(e.type);case 16:return uc("Lazy");case 13:return uc("Suspense");case 19:return uc("SuspenseList");case 0:case 2:case 15:return e=fg(e.type,!1),e;case 11:return e=fg(e.type.render,!1),e;case 1:return e=fg(e.type,!0),e;default:return""}}function Ph(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Rs:return"Fragment";case Cs:return"Portal";case Mh:return"Profiler";case bS:return"StrictMode";case Lh:return"Suspense";case kh:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case VO:return(e.displayName||"Context")+".Consumer";case $O:return(e._context.displayName||"Context")+".Provider";case yS:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case CS:return t=e.displayName||null,t!==null?t:Ph(e.type)||"Memo";case lo:t=e._payload,e=e._init;try{return Ph(e(t))}catch{}}return null}function SF(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Ph(t);case 8:return t===bS?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Fo(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function WO(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function TF(e){var t=WO(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(a){r=""+a,o.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function wd(e){e._valueTracker||(e._valueTracker=TF(e))}function qO(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=WO(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Bp(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Uh(e,t){var n=t.checked;return bt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function eR(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Fo(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function KO(e,t){t=t.checked,t!=null&&TS(e,"checked",t,!1)}function Fh(e,t){KO(e,t);var n=Fo(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Bh(e,t.type,n):t.hasOwnProperty("defaultValue")&&Bh(e,t.type,Fo(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function tR(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Bh(e,t,n){(t!=="number"||Bp(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var dc=Array.isArray;function Us(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Fo(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Gh(e,t){if(t.dan
Line truncated
|
||||
`).replace(DB,"")}function Bd(e,t,n){if(t=RR(t),RR(e)!==t&&n)throw Error(ee(425))}function qp(){}var Jh=null,eE=null;function tE(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var nE=typeof setTimeout=="function"?setTimeout:void 0,wB=typeof clearTimeout=="function"?clearTimeout:void 0,NR=typeof Promise=="function"?Promise:void 0,xB=typeof queueMicrotask=="function"?queueMicrotask:typeof NR<"u"?function(e){return NR.resolve(null).then(e).catch(MB)}:nE;function MB(e){setTimeout(function(){throw e})}function Ag(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(r===0){e.removeChild(i),Gc(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);Gc(t)}function Do(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function vR(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var fl=Math.random().toString(36).slice(2),ui="__reactFiber$"+fl,zc="__reactProps$"+fl,Gi="__reactContainer$"+fl,rE="__reactEvents$"+fl,LB="__reactListeners$"+fl,kB="__reactHandles$"+fl;function ga(e){var t=e[ui];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Gi]||n[ui]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=vR(e);e!==null;){if(n=e[ui])return n;e=vR(e)}return t}e=n,n=e.parentNode}return null}function bu(e){return e=e[ui]||e[Gi],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function As(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(ee(33))}function pm(e){return e[zc]||null}var iE=[],Is=-1;function zo(e){return{current:e}}function ut(e){0>Is||(e.current=iE[Is],iE[Is]=null,Is--)}function it(e,t){Is++,iE[Is]=e.current,e.current=t}var Bo={},pn=zo(Bo),zn=zo(!1),Ma=Bo;function js(e,t){var n=e.type.contextTypes;if(!n)return Bo;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Wn(e){return e=e.childContextTypes,e!=null}function Kp(){ut(zn),ut(pn)}function OR(e,t,n){if(pn.current!==Bo)throw Error(ee(168));it(pn,t),it(zn,n)}function PA(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(ee(108,SF(e)||"Unknown",i));return bt({},n,r)}function Qp(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Bo,Ma=pn.current,it(pn,e),it(zn,zn.current),!0}function AR(e,t,n){var r=e.stateNode;if(!r)throw Error(ee(169));n?(e=PA(e,t,Ma),r.__reactInternalMemoizedMergedChildContext=e,ut(zn),ut(pn),it(pn,e)):ut(zn),it(zn,n)}var xi=null,_m=!1,Ig=!1;function UA(e){xi===null?xi=[e]:xi.push(e)}function PB(e){_m=!0,UA(e)}function Wo(){if(!Ig&&xi!==null){Ig=!0;var e=0,t=Xe;try{var n=xi;for(Xe=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}xi=null,_m=!1}catch(i){throw xi!==null&&(xi=xi.slice(e+1)),lA(NS,Wo),i}finally{Xe=t,Ig=!1}}return null}var Ds=[],ws=0,Xp=null,jp=0,vr=[],Or=0,La=null,Li=1,ki="";function ua(e,t){Ds[ws++]=jp,Ds[ws++]=Xp,Xp=e,jp=t}function FA(e,t,n){vr[Or++]=Li,vr[Or++]=ki,vr[Or++]=La,La=e;var r=Li;e=ki;var i=32-qr(r)-1;r&=~(1<<i),n+=1;var o=32-qr(t)+i;if(30<o){var a=i-i%5;o=(r&(1<<a)-1).toString(32),r>>=a,i-=a,Li=1<<32-qr(t)+i|n<<i|r,ki=o+e}else Li=1<<o|n<<i|r,ki=e}function LS(e){e.return!==null&&(ua(e,1),FA(e,1,0))}function kS(e){for(;e===Xp;)Xp=Ds[--ws],Ds[ws]=null,jp=Ds[--ws],Ds[ws]=null;for(;e===La;)La=vr[--Or],vr[Or]=null,ki=vr[--Or],vr[Or]=null,Li=vr[--Or],vr[Or]=null}var lr=null,or=null,gt=!1,$r=null;function BA(e,t){var n=Ar(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function IR(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,lr=e,or=Do(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,lr=e,or=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=La!==null?{id:Li,overflow:ki}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Ar(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,lr=e,or=null,!0):!1;default:return!1}}function oE(e){return(e.mode&1)!==0&&(e.flags&128)===0}function aE(e){if(gt){var t=or;if(t){var n=t;if(!IR(e,t)){if(oE(e))throw Error(ee(418));t=Do(n.nextSibling);var r=lr;t&&IR(e,t)?BA(r,n):(e.flags=e.flags&-4097|2,gt=!1,lr=e)}}else{if(oE(e))throw Error(ee(418));e.flags=e.flags&-4097|2,gt=!1,lr=e}}}function DR(e){
Line truncated
|
||||
Error generating stack: `+o.message+`
|
||||
`+o.stack}return{value:e,source:t,stack:i,digest:null}}function Lg(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function uE(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var zB=typeof WeakMap=="function"?WeakMap:Map;function pI(e,t,n){n=Ui(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){o_||(o_=!0,TE=r),uE(e,t)},n}function _I(e,t,n){n=Ui(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){uE(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){uE(e,t),typeof r!="function"&&(xo===null?xo=new Set([this]):xo.add(this));var a=t.stack;this.componentDidCatch(t.value,{componentStack:a!==null?a:""})}),n}function FR(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new zB;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=oG.bind(null,e,t,n),t.then(e,e))}function BR(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function GR(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Ui(-1,1),t.tag=2,wo(n,t,1))),n.lanes|=1),e)}var WB=Vi.ReactCurrentOwner,Vn=!1;function Cn(e,t,n,r){t.child=e===null?HA(t,null,n,r):Js(t,e.child,n,r)}function YR(e,t,n,r,i){n=n.render;var o=t.ref;return Ys(t,i),r=WS(e,t,n,r,o,i),n=qS(),e!==null&&!Vn?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Hi(e,t,i)):(gt&&n&&LS(t),t.flags|=1,Cn(e,t,r,i),t.child)}function HR(e,t,n,r,i){if(e===null){var o=n.type;return typeof o=="function"&&!rT(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,mI(e,t,o,r,i)):(e=Ip(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!(e.lanes&i)){var a=o.memoizedProps;if(n=n.compare,n=n!==null?n:Hc,n(a,r)&&e.ref===t.ref)return Hi(e,t,i)}return t.flags|=1,e=Lo(o,r),e.ref=t.ref,e.return=t,t.child=e}function mI(e,t,n,r,i){if(e!==null){var o=e.memoizedProps;if(Hc(o,r)&&e.ref===t.ref)if(Vn=!1,t.pendingProps=r=o,(e.lanes&i)!==0)e.flags&131072&&(Vn=!0);else return t.lanes=e.lanes,Hi(e,t,i)}return dE(e,t,n,r,i)}function fI(e,t,n){var r=t.pendingProps,i=r.children,o=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},it(Ls,rr),rr|=n;else{if(!(n&1073741824))return e=o!==null?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,it(Ls,rr),rr|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,it(Ls,rr),rr|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,it(Ls,rr),rr|=r;return Cn(e,t,i,n),t.child}function gI(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function dE(e,t,n,r,i){var o=Wn(n)?Ma:pn.current;return o=js(t,o),Ys(t,i),n=WS(e,t,n,r,o,i),r=qS(),e!==null&&!Vn?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Hi(e,t,i)):(gt&&r&&LS(t),t.flags|=1,Cn(e,t,n,i),t.child)}function $R(e,t,n,r,i){if(Wn(n)){var o=!0;Qp(t)}else o=!1;if(Ys(t,i),t.stateNode===null)vp(e,t),dI(t,n,r),cE(t,n,r,i),r=!0;else if(e===null){var a=t.stateNode,s=t.memoizedProps;a.props=s;var c=a.context,d=n.contextType;typeof d=="object"&&d!==null?d=xr(d):(d=Wn(n)?Ma:pn.current,d=js(t,d));var p=n.getDerivedStateFromProps,_=typeof p=="function"||typeof a.getSnapshotBeforeUpdate=="function";_||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(s!==r||c!==d)&&UR(t,a,r,d),co=!1;var f=t.memoizedState;a.state=f,e_(t,r,a,i),c=t.memoizedState,s!==r||f!==c||zn.current||co?(typeof p=="function"&&(lE(t,n,p,r),c=t.memoizedState),(s=co||PR(t,n,s,r,f,c,d))?(_||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(t.flags|=4194308)):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=c),a.props=r,a.state=c,a.context=d,r=s):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,VA(e,t),s=t.memoizedProps,d=t.type===t.elementType?s:Yr(t.type,s),a.props=d,_=t.pendingProps,f=a.context,c=n.contextType,typeof c=="object"&&c!==null?c=xr(c):(c=Wn(n)?Ma:pn.current,c=js(t,c));var g=n.getDerivedStateFromProps;(p=typeof g=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(s!==_||f!==c)&&UR(t,a,r,c),co=!1,f=t.memoizedState,a.state=f,e_(t,r,a,i);var h=t.memoizedS
Line truncated
|
||||
`)}}Fa.empty=new Fa(!0);class yG{constructor(t,n){this.string=t,this.nodeTypes=n,this.inline=null,this.pos=0,this.tokens=t.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(t){return this.next==t&&(this.pos++||!0)}err(t){throw new SyntaxError(t+" (in content expression '"+this.string+"')")}}function KI(e){let t=[];do t.push(CG(e));while(e.eat("|"));return t.length==1?t[0]:{type:"choice",exprs:t}}function CG(e){let t=[];do t.push(RG(e));while(e.next&&e.next!=")"&&e.next!="|");return t.length==1?t[0]:{type:"seq",exprs:t}}function RG(e){let t=OG(e);for(;;)if(e.eat("+"))t={type:"plus",expr:t};else if(e.eat("*"))t={type:"star",expr:t};else if(e.eat("?"))t={type:"opt",expr:t};else if(e.eat("{"))t=NG(e,t);else break;return t}function iN(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");let t=Number(e.next);return e.pos++,t}function NG(e,t){let n=iN(e),r=n;return e.eat(",")&&(e.next!="}"?r=iN(e):r=-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:t}}function vG(e,t){let n=e.nodeTypes,r=n[t];if(r)return[r];let i=[];for(let o in n){let a=n[o];a.groups.indexOf(t)>-1&&i.push(a)}return i.length==0&&e.err("No node type or group '"+t+"' found"),i}function OG(e){if(e.eat("(")){let t=KI(e);return e.eat(")")||e.err("Missing closing paren"),t}else if(/\W/.test(e.next))e.err("Unexpected token '"+e.next+"'");else{let t=vG(e,e.next).map(n=>(e.inline==null?e.inline=n.isInline:e.inline!=n.isInline&&e.err("Mixing inline and block content"),{type:"name",value:n}));return e.pos++,t.length==1?t[0]:{type:"choice",exprs:t}}}function AG(e){let t=[[]];return i(o(e,0),n()),t;function n(){return t.push([])-1}function r(a,s,c){let d={term:c,to:s};return t[a].push(d),d}function i(a,s){a.forEach(c=>c.to=s)}function o(a,s){if(a.type=="choice")return a.exprs.reduce((c,d)=>c.concat(o(d,s)),[]);if(a.type=="seq")for(let c=0;;c++){let d=o(a.exprs[c],s);if(c==a.exprs.length-1)return d;i(d,s=n())}else if(a.type=="star"){let c=n();return r(s,c),i(o(a.expr,c),c),[r(c)]}else if(a.type=="plus"){let c=n();return i(o(a.expr,s),c),i(o(a.expr,c),c),[r(c)]}else{if(a.type=="opt")return[r(s)].concat(o(a.expr,s));if(a.type=="range"){let c=s;for(let d=0;d<a.min;d++){let p=n();i(o(a.expr,c),p),c=p}if(a.max==-1)i(o(a.expr,c),c);else for(let d=a.min;d<a.max;d++){let p=n();r(c,p),i(o(a.expr,c),p),c=p}return[r(c)]}else{if(a.type=="name")return[r(s,void 0,a.value)];throw new Error("Unknown expr type")}}}}function QI(e,t){return t-e}function oN(e,t){let n=[];return r(t),n.sort(QI);function r(i){let o=e[i];if(o.length==1&&!o[0].term)return r(o[0].to);n.push(i);for(let a=0;a<o.length;a++){let{term:s,to:c}=o[a];!s&&n.indexOf(c)==-1&&r(c)}}}function IG(e){let t=Object.create(null);return n(oN(e,0));function n(r){let i=[];r.forEach(a=>{e[a].forEach(({term:s,to:c})=>{if(!s)return;let d;for(let p=0;p<i.length;p++)i[p][0]==s&&(d=i[p][1]);oN(e,c).forEach(p=>{d||i.push([s,d=[]]),d.indexOf(p)==-1&&d.push(p)})})});let o=t[r.join(",")]=new Fa(r.indexOf(e.length-1)>-1);for(let a=0;a<i.length;a++){let s=i[a][1].sort(QI);o.next.push({type:i[a][0],next:t[s.join(",")]||n(s)})}return o}}function DG(e,t){for(let n=0,r=[e];n<r.length;n++){let i=r[n],o=!i.validEnd,a=[];for(let s=0;s<i.next.length;s++){let{type:c,next:d}=i.next[s];a.push(c.name),o&&!(c.isText||c.hasRequiredAttrs())&&(o=!1),r.indexOf(d)==-1&&r.push(d)}o&&t.err("Only non-generatable nodes ("+a.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function XI(e){let t=Object.create(null);for(let n in e){let r=e[n];if(!r.hasDefault)return null;t[n]=r.default}return t}function jI(e,t){let n=Object.create(null);for(let r in e){let i=t&&t[r];if(i===void 0){let o=e[r];if(o.hasDefault)i=o.default;else throw new RangeError("No value supplied for attribute "+r)}n[r]=i}return n}function ZI(e,t,n,r){for(let i in t)if(!(i in e))throw new RangeError(`Unsupported attribute ${i} for ${n} of type ${i}`);for(let i in e){let o=e[i];o.validate&&o.validate(t[i])}}function JI(e){let t=Object.create(null);if(e)for(let n in e)t[n]=new xG(e[n]);return t}let aN=class eD{constructor(t,n,r){this.name=t,this.schema=n,this.spec=r,this.markSet=null,this.groups=r.group?r.group.split(" "):[],this.attrs=JI(r.attrs),this.defaultAttrs=XI(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(r.inline||t=="text"),this.isText=t=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==Fa.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let t in this.attrs)if(this.attrs[t].isRequired)return!0;return!1}compatibleContent(t){return this==t||this.contentMatch.compatible(t.contentMatch)}computeAttrs(t){return!t&&this.defaultAttrs?this.defaultAttrs:jI(this.attrs,t)}create
Line truncated
|
||||
`):n=n.replace(/\r?\n|\r/g," ");else if(n=n.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(n)&&this.open==this.nodes.length-1){let i=r.content[r.content.length-1],o=t.previousSibling;(!i||o&&o.nodeName=="BR"||i.isText&&/[ \t\r\n\u000c]$/.test(i.text))&&(n=n.slice(1))}n&&this.insertNode(this.parser.schema.text(n)),this.findInText(t)}else this.findInside(t)}addElement(t,n){let r=t.nodeName.toLowerCase(),i;rD.hasOwnProperty(r)&&this.parser.normalizeLists&&PG(t);let o=this.options.ruleFromNode&&this.options.ruleFromNode(t)||(i=this.parser.matchTag(t,this,n));if(o?o.ignore:kG.hasOwnProperty(r))this.findInside(t),this.ignoreFallback(t);else if(!o||o.skip||o.closeParent){o&&o.closeParent?this.open=Math.max(0,this.open-1):o&&o.skip.nodeType&&(t=o.skip);let a,s=this.top,c=this.needsBlock;if(nD.hasOwnProperty(r))s.content.length&&s.content[0].isInline&&this.open&&(this.open--,s=this.top),a=!0,s.type||(this.needsBlock=!0);else if(!t.firstChild){this.leafFallback(t);return}o&&o.skip?this.addAll(t):this.withStyleRules(t,()=>this.addAll(t)),a&&this.sync(s),this.needsBlock=c}else this.withStyleRules(t,()=>{this.addElementByRule(t,o,o.consuming===!1?i:void 0)})}leafFallback(t){t.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(t.ownerDocument.createTextNode(`
|
||||
`))}ignoreFallback(t){t.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"))}readStyles(t){let n=je.none,r=je.none;if(t.length)for(let i=0;i<this.parser.matchedStyles.length;i++){let o=this.parser.matchedStyles[i],a=t.getPropertyValue(o);if(a)for(let s=void 0;;){let c=this.parser.matchStyle(o,a,this,s);if(!c)break;if(c.ignore)return null;if(c.clearMark?this.top.pendingMarks.concat(this.top.activeMarks).forEach(d=>{c.clearMark(d)&&(r=d.addToSet(r))}):n=this.parser.schema.marks[c.mark].create(c.attrs).addToSet(n),c.consuming===!1)s=c;else break}}return[n,r]}addElementByRule(t,n,r){let i,o,a;n.node?(o=this.parser.schema.nodes[n.node],o.isLeaf?this.insertNode(o.create(n.attrs))||this.leafFallback(t):i=this.enter(o,n.attrs||null,n.preserveWhitespace)):(a=this.parser.schema.marks[n.mark].create(n.attrs),this.addPendingMark(a));let s=this.top;if(o&&o.isLeaf)this.findInside(t);else if(r)this.addElement(t,r);else if(n.getContent)this.findInside(t),n.getContent(t,this.parser.schema).forEach(c=>this.insertNode(c));else{let c=t;typeof n.contentElement=="string"?c=t.querySelector(n.contentElement):typeof n.contentElement=="function"?c=n.contentElement(t):n.contentElement&&(c=n.contentElement),this.findAround(t,c,!0),this.addAll(c)}i&&this.sync(s)&&this.open--,a&&this.removePendingMark(a,s)}addAll(t,n,r){let i=n||0;for(let o=n?t.childNodes[n]:t.firstChild,a=r==null?null:t.childNodes[r];o!=a;o=o.nextSibling,++i)this.findAtPoint(t,i),this.addDOM(o);this.findAtPoint(t,i)}findPlace(t){let n,r;for(let i=this.open;i>=0;i--){let o=this.nodes[i],a=o.findWrapping(t);if(a&&(!n||n.length>a.length)&&(n=a,r=o,!a.length)||o.solid)break}if(!n)return!1;this.sync(r);for(let i=0;i<n.length;i++)this.enterInner(n[i],null,!1);return!0}insertNode(t){if(t.isInline&&this.needsBlock&&!this.top.type){let n=this.textblockFromContext();n&&this.enterInner(n)}if(this.findPlace(t)){this.closeExtra();let n=this.top;n.applyPending(t.type),n.match&&(n.match=n.match.matchType(t.type));let r=n.activeMarks;for(let i=0;i<t.marks.length;i++)(!n.type||n.type.allowsMarkType(t.marks[i].type))&&(r=t.marks[i].addToSet(r));return n.content.push(t.mark(r)),!0}return!1}enter(t,n,r){let i=this.findPlace(t.create(n));return i&&this.enterInner(t,n,!0,r),i}enterInner(t,n=null,r=!1,i){this.closeExtra();let o=this.top;o.applyPending(t),o.match=o.match&&o.match.matchType(t);let a=lN(t,i,o.options);o.options&Oc&&o.content.length==0&&(a|=Oc),this.nodes.push(new qd(t,n,o.activeMarks,o.pendingMarks,r,null,a)),this.open++}closeExtra(t=!1){let n=this.nodes.length-1;if(n>this.open){for(;n>this.open;n--)this.nodes[n-1].content.push(this.nodes[n].finish(t));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(this.isOpen||this.options.topOpen)}sync(t){for(let n=this.open;n>=0;n--)if(this.nodes[n]==t)return this.open=n,!0;return!1}get currentPos(){this.closeExtra();let t=0;for(let n=this.open;n>=0;n--){let r=this.nodes[n].content;for(let i=r.length-1;i>=0;i--)t+=r[i].nodeSize;n&&t++}return t}findAtPoint(t,n){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].node==t&&this.find[r].offset==n&&(this.find[r].pos=this.currentPos)}findInside(t){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].pos==null&&t.nodeType==1&&t.contains(this.find[n].node)&&(this.find[n].pos=this.currentPos)}findAround(t,n,r){if(t!=n&&this.find)for(let i=0;i<this.find.length;i++)this.find[i].pos==null&&t.nodeType==1&&t.contains(this.find[i].node)&&n.compareDocumentPosition(this.find[i].node)&(r?2:4)&&(this.find[i].pos=this.currentPos)}findInText(t){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==t&&(this.find[n].pos=this.currentPos-(t.nodeValue.length-this.find[n].offset))}matchesContext(t){if(t.indexOf("|")>-1)return t.split(/\s*\|\s*/).some(this.matchesContext,this);let n=t.split("/"),r=this.options.context,i=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),o=-(r?r.depth+1:0)+(i?0:1),a=(s,c)=>{for(;s>=0;s--){let d=n[s];if(d==""){if(s==n.length-1||s==0)continue;for(;c>=o;c--)if(a(s-1,c))return!0;return!1}else{let p=c>0||c==0&&i?this.nodes[c].type:r&&c>=o?r.node(c-o).type:null;if(!p||p.name!=d&&p.groups.indexOf(d)==-1)return!1;c--}}return!0};return a(n.length-1,this.open)}textblockFromContext(){let t=this.options.context;if(t)for(let n=t.depth;n>=0;n--){let r=t.node(n).contentMatchAt(t.indexAfter(n)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let n in this.parser.schema.nodes){let r=this.parser.schema.nodes[n];if(r.isTextblock&&r.defaultAttrs)return r}}addPendingMark(t){let n=BG(t,this.top.pendingMarks);n&&this.top.stashMarks.push(n),this.top.pendingMarks=t.addToSet(this.top.pendingMarks)}removePendingMark(t,n){for(let r=this.open;r>=0;r--){let i=this.nodes[r];if(i.pendingMarks.lastIndexOf(t)>-1)i.pendingMarks=t.removeFromSet(i.pendingMarks);else{i.activeMarks=t.removeFromSet(i.activeMarks);let a=i.popFromStashMark(t);a&&i.type&&i.type.allow
Line truncated
|
||||
`))}})}function eY(e,t,n){let r=e.resolve(t),i=r.index();return r.parent.canReplaceWith(i,i+1,n)}function tY(e,t,n,r,i){let o=e.doc.nodeAt(t);if(!o)throw new RangeError("No node at given position");n||(n=o.type);let a=n.create(r,null,i||o.marks);if(o.isLeaf)return e.replaceWith(t,t+o.nodeSize,a);if(!n.validContent(o.content))throw new RangeError("Invalid content for node type "+n.name);e.step(new Wt(t,t+o.nodeSize,t+1,t+o.nodeSize-1,new le(J.from(a),0,0),1,!0))}function Vs(e,t,n=1,r){let i=e.resolve(t),o=i.depth-n,a=r&&r[r.length-1]||i.parent;if(o<0||i.parent.type.spec.isolating||!i.parent.canReplace(i.index(),i.parent.childCount)||!a.type.validContent(i.parent.content.cutByIndex(i.index(),i.parent.childCount)))return!1;for(let d=i.depth-1,p=n-2;d>o;d--,p--){let _=i.node(d),f=i.index(d);if(_.type.spec.isolating)return!1;let g=_.content.cutByIndex(f,_.childCount),h=r&&r[p+1];h&&(g=g.replaceChild(0,h.type.create(h.attrs)));let S=r&&r[p]||_;if(!_.canReplace(f+1,_.childCount)||!S.type.validContent(g))return!1}let s=i.indexAfter(o),c=r&&r[0];return i.node(o).canReplaceWith(s,s,c?c.type:i.node(o+1).type)}function nY(e,t,n=1,r){let i=e.doc.resolve(t),o=J.empty,a=J.empty;for(let s=i.depth,c=i.depth-n,d=n-1;s>c;s--,d--){o=J.from(i.node(s).copy(o));let p=r&&r[d];a=J.from(p?p.type.create(p.attrs,a):i.node(s).copy(a))}e.step(new $t(t,t,new le(o.append(a),n,n),!0))}function qo(e,t){let n=e.resolve(t),r=n.index();return uD(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function uD(e,t){return!!(e&&t&&!e.isLeaf&&e.canAppend(t))}function Rm(e,t,n=-1){let r=e.resolve(t);for(let i=r.depth;;i--){let o,a,s=r.index(i);if(i==r.depth?(o=r.nodeBefore,a=r.nodeAfter):n>0?(o=r.node(i+1),s++,a=r.node(i).maybeChild(s)):(o=r.node(i).maybeChild(s-1),a=r.node(i+1)),o&&!o.isTextblock&&uD(o,a)&&r.node(i).canReplace(s,s+1))return t;if(i==0)break;t=n<0?r.before(i):r.after(i)}}function rY(e,t,n){let r=new $t(t-n,t+n,le.empty,!0);e.step(r)}function iY(e,t,n){let r=e.resolve(t);if(r.parent.canReplaceWith(r.index(),r.index(),n))return t;if(r.parentOffset==0)for(let i=r.depth-1;i>=0;i--){let o=r.index(i);if(r.node(i).canReplaceWith(o,o,n))return r.before(i+1);if(o>0)return null}if(r.parentOffset==r.parent.content.size)for(let i=r.depth-1;i>=0;i--){let o=r.indexAfter(i);if(r.node(i).canReplaceWith(o,o,n))return r.after(i+1);if(o<r.node(i).childCount)return null}return null}function oY(e,t,n){let r=e.resolve(t);if(!n.content.size)return t;let i=n.content;for(let o=0;o<n.openStart;o++)i=i.firstChild.content;for(let o=1;o<=(n.openStart==0&&n.size?2:1);o++)for(let a=r.depth;a>=0;a--){let s=a==r.depth?0:r.pos<=(r.start(a+1)+r.end(a+1))/2?-1:1,c=r.index(a)+(s>0?1:0),d=r.node(a),p=!1;if(o==1)p=d.canReplace(c,c,i);else{let _=d.contentMatchAt(c).findWrapping(i.firstChild.type);p=_&&d.canReplaceWith(c,c,_[0])}if(p)return s==0?r.pos:s<0?r.before(a+1):r.after(a+1)}return null}function Nm(e,t,n=t,r=le.empty){if(t==n&&!r.size)return null;let i=e.resolve(t),o=e.resolve(n);return dD(i,o,r)?new $t(t,n,r):new aY(i,o,r).fit()}function dD(e,t,n){return!n.openStart&&!n.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),n.content)}class aY{constructor(t,n,r){this.$from=t,this.$to=n,this.unplaced=r,this.frontier=[],this.placed=J.empty;for(let i=0;i<=t.depth;i++){let o=t.node(i);this.frontier.push({type:o.type,match:o.contentMatchAt(t.indexAfter(i))})}for(let i=t.depth;i>0;i--)this.placed=J.from(t.node(i).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let d=this.findFittable();d?this.placeNodes(d):this.openMore()||this.dropNode()}let t=this.mustMoveInline(),n=this.placed.size-this.depth-this.$from.depth,r=this.$from,i=this.close(t<0?this.$to:r.doc.resolve(t));if(!i)return null;let o=this.placed,a=r.depth,s=i.depth;for(;a&&s&&o.childCount==1;)o=o.firstChild.content,a--,s--;let c=new le(o,a,s);return t>-1?new Wt(r.pos,t,this.$to.pos,this.$to.end(),c,n):c.size||r.pos!=this.$to.pos?new $t(r.pos,i.pos,c):null}findFittable(){let t=this.unplaced.openStart;for(let n=this.unplaced.content,r=0,i=this.unplaced.openEnd;r<t;r++){let o=n.firstChild;if(n.childCount>1&&(i=0),o.type.spec.isolating&&i<=r){t=r;break}n=o.content}for(let n=1;n<=2;n++)for(let r=n==1?t:this.unplaced.openStart;r>=0;r--){let i,o=null;r?(o=Yg(this.unplaced.content,r-1).firstChild,i=o.content):i=this.unplaced.content;let a=i.firstChild;for(let s=this.depth;s>=0;s--){let{type:c,match:d}=this.frontier[s],p,_=null;if(n==1&&(a?d.matchType(a.type)||(_=d.fillBefore(J.from(a),!1)):o&&c.compatibleContent(o.type)))return{sliceDepth:r,frontierDepth:s,parent:o,inject:_};if(n==2&&a&&(p=d.findWrapping(a.type)))return{sliceDepth:r,frontierDepth:s,parent:o,wrap:p};if(o&&d.matchType(o.type))break}}}openMore(){let{content:t,openStart:n,openEnd:r}=this.unplaced,i=Yg(t,n);return!i.childCount||i.firstChild.isLeaf?!1:(this.unplaced=new le(t,n+1,Math.max(r,i.size+n>=t.size-r?n+1:0)),!0)}dropNode(){let{content:t,openStart:n,openEnd:r}=this.unplaced,i=Yg(t,n);if(i.c
Line truncated
|
||||
`),p&&g==f.nodeValue.length)for(let h=f,S;h;h=h.parentNode){if(S=h.nextSibling){S.nodeName=="BR"&&(s=c={node:S.parentNode,offset:Jt(S)+1});break}let b=h.pmViewDesc;if(b&&b.node&&b.node.isBlock)break}}else{let h=f.childNodes[g-1];p=h&&(h.nodeName=="BR"||h.contentEditable=="false")}}if(Zr&&d.focusNode&&d.focusNode!=c.node&&d.focusNode.nodeType==1){let f=d.focusNode.childNodes[d.focusOffset];f&&f.contentEditable=="false"&&(i=!0)}if(!(i||p&&On)&&Ba(s.node,s.offset,d.anchorNode,d.anchorOffset)&&Ba(c.node,c.offset,d.focusNode,d.focusOffset))return;let _=!1;if((d.extend||t==n)&&!p){d.collapse(s.node,s.offset);try{t!=n&&d.extend(c.node,c.offset),_=!0}catch{}}if(!_){if(t>n){let g=s;s=c,c=g}let f=document.createRange();f.setEnd(c.node,c.offset),f.setStart(s.node,s.offset),d.removeAllRanges(),d.addRange(f)}}ignoreMutation(t){return!this.contentDOM&&t.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(t,n){for(let r=0,i=0;i<this.children.length;i++){let o=this.children[i],a=r+o.size;if(r==a?t<=a&&n>=r:t<a&&n>r){let s=r+o.border,c=a-o.border;if(t>=s&&n<=c){this.dirty=t==r||n==a?Sa:AN,t==s&&n==c&&(o.contentLost||o.dom.parentNode!=this.contentDOM)?o.dirty=hi:o.markDirty(t-s,n-s);return}else o.dirty=o.dom==o.contentDOM&&o.dom.parentNode==this.contentDOM&&!o.children.length?Sa:hi}r=a}this.dirty=Sa}markParentsDirty(){let t=1;for(let n=this.parent;n;n=n.parent,t++){let r=t==1?Sa:AN;n.dirty<r&&(n.dirty=r)}}get domAtom(){return!1}get ignoreForCoords(){return!1}isText(t){return!1}}class ND extends vu{constructor(t,n,r,i){let o,a=n.type.toDOM;if(typeof a=="function"&&(a=a(r,()=>{if(!o)return i;if(o.parent)return o.parent.posBeforeChild(o)})),!n.type.spec.raw){if(a.nodeType!=1){let s=document.createElement("span");s.appendChild(a),a=s}a.contentEditable="false",a.classList.add("ProseMirror-widget")}super(t,[],a,null),this.widget=n,this.widget=n,o=this}matchesWidget(t){return this.dirty==wr&&t.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(t){let n=this.widget.spec.stopEvent;return n?n(t):!1}ignoreMutation(t){return t.type!="selection"||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get side(){return this.widget.type.side}}class YY extends vu{constructor(t,n,r,i){super(t,[],n,null),this.textDOM=r,this.text=i}get size(){return this.text.length}localPosFromDOM(t,n){return t!=this.textDOM?this.posAtStart+(n?this.size:0):this.posAtStart+n}domFromPos(t){return{node:this.textDOM,offset:t}}ignoreMutation(t){return t.type==="characterData"&&t.target.nodeValue==t.oldValue}}class Ga extends vu{constructor(t,n,r,i){super(t,[],r,i),this.mark=n}static create(t,n,r,i){let o=i.nodeViews[n.type.name],a=o&&o(n,i,r);return(!a||!a.dom)&&(a=za.renderSpec(document,n.type.spec.toDOM(n,r))),new Ga(t,n,a.dom,a.contentDOM||a.dom)}parseRule(){return this.dirty&hi||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(t){return this.dirty!=hi&&this.mark.eq(t)}markDirty(t,n){if(super.markDirty(t,n),this.dirty!=wr){let r=this.parent;for(;!r.node;)r=r.parent;r.dirty<this.dirty&&(r.dirty=this.dirty),this.dirty=wr}}slice(t,n,r){let i=Ga.create(this.parent,this.mark,!0,r),o=this.children,a=this.size;n<a&&(o=PE(o,n,a,r)),t>0&&(o=PE(o,0,t,r));for(let s=0;s<o.length;s++)o[s].parent=i;return i.children=o,i}}class Po extends vu{constructor(t,n,r,i,o,a,s,c,d){super(t,[],o,a),this.node=n,this.outerDeco=r,this.innerDeco=i,this.nodeDOM=s}static create(t,n,r,i,o,a){let s=o.nodeViews[n.type.name],c,d=s&&s(n,o,()=>{if(!c)return a;if(c.parent)return c.parent.posBeforeChild(c)},r,i),p=d&&d.dom,_=d&&d.contentDOM;if(n.isText){if(!p)p=document.createTextNode(n.text);else if(p.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else p||({dom:p,contentDOM:_}=za.renderSpec(document,n.type.spec.toDOM(n)));!_&&!n.isText&&p.nodeName!="BR"&&(p.hasAttribute("contenteditable")||(p.contentEditable="false"),n.type.spec.draggable&&(p.draggable=!0));let f=p;return p=ID(p,r,n),d?c=new HY(t,n,r,i,p,_||null,f,d,o,a+1):n.isText?new Am(t,n,r,i,p,f,o):new Po(t,n,r,i,p,_||null,f,o,a+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let t={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace=="pre"&&(t.preserveWhitespace="full"),!this.contentDOM)t.getContent=()=>this.node.content;else if(!this.contentLost)t.contentElement=this.contentDOM;else{for(let n=this.children.length-1;n>=0;n--){let r=this.children[n];if(this.dom.contains(r.dom.parentNode)){t.contentElement=r.dom.parentNode;break}}t.contentElement||(t.getContent=()=>J.empty)}return t}matchesNode(t,n,r){return this.dirty==wr&&t.eq(this.node)&&kE(n,this.outerDeco)&&r.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(t,n){let r=this.node.inlineContent,i=n,o=t.composing?this.localCom
Line truncated
|
||||
|
||||
`);return{dom:c,text:f,slice:t}}function kD(e,t,n,r,i){let o=i.parent.type.spec.code,a,s;if(!n&&!t)return null;let c=t&&(r||o||!n);if(c){if(e.someProp("transformPastedText",f=>{t=f(t,o||r,e)}),o)return t?new le(J.from(e.state.schema.text(t.replace(/\r\n?/g,`
|
||||
`))),0,0):le.empty;let _=e.someProp("clipboardTextParser",f=>f(t,i,r,e));if(_)s=_;else{let f=i.marks(),{schema:g}=e.state,h=za.fromSchema(g);a=document.createElement("div"),t.split(/(?:\r\n?|\n)+/).forEach(S=>{let b=a.appendChild(document.createElement("p"));S&&b.appendChild(h.serializeNode(g.text(S,f)))})}}else e.someProp("transformPastedHTML",_=>{n=_(n,e)}),a=lH(n),Nu&&cH(a);let d=a&&a.querySelector("[data-pm-slice]"),p=d&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(d.getAttribute("data-pm-slice")||"");if(p&&p[3])for(let _=+p[3];_>0;_--){let f=a.firstChild;for(;f&&f.nodeType!=1;)f=f.nextSibling;if(!f)break;a=f}if(s||(s=(e.someProp("clipboardParser")||e.someProp("domParser")||lT.fromSchema(e.state.schema)).parseSlice(a,{preserveWhitespace:!!(c||p),context:i,ruleFromNode(f){return f.nodeName=="BR"&&!f.nextSibling&&f.parentNode&&!aH.test(f.parentNode.nodeName)?{ignore:!0}:null}})),p)s=uH(YN(s,+p[1],+p[2]),p[4]);else if(s=le.maxOpen(sH(s.content,i),!0),s.openStart||s.openEnd){let _=0,f=0;for(let g=s.content.firstChild;_<s.openStart&&!g.type.spec.isolating;_++,g=g.firstChild);for(let g=s.content.lastChild;f<s.openEnd&&!g.type.spec.isolating;f++,g=g.lastChild);s=YN(s,_,f)}return e.someProp("transformPasted",_=>{s=_(s,e)}),s}const aH=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function sH(e,t){if(e.childCount<2)return e;for(let n=t.depth;n>=0;n--){let i=t.node(n).contentMatchAt(t.index(n)),o,a=[];if(e.forEach(s=>{if(!a)return;let c=i.findWrapping(s.type),d;if(!c)return a=null;if(d=a.length&&o.length&&UD(c,o,s,a[a.length-1],0))a[a.length-1]=d;else{a.length&&(a[a.length-1]=FD(a[a.length-1],o.length));let p=PD(s,c);a.push(p),i=i.matchType(p.type),o=c}}),a)return J.from(a)}return e}function PD(e,t,n=0){for(let r=t.length-1;r>=n;r--)e=t[r].create(null,J.from(e));return e}function UD(e,t,n,r,i){if(i<e.length&&i<t.length&&e[i]==t[i]){let o=UD(e,t,n,r.lastChild,i+1);if(o)return r.copy(r.content.replaceChild(r.childCount-1,o));if(r.contentMatchAt(r.childCount).matchType(i==e.length-1?n.type:e[i+1]))return r.copy(r.content.append(J.from(PD(n,e,i+1))))}}function FD(e,t){if(t==0)return e;let n=e.content.replaceChild(e.childCount-1,FD(e.lastChild,t-1)),r=e.contentMatchAt(e.childCount).fillBefore(J.empty,!0);return e.copy(n.append(r))}function BE(e,t,n,r,i,o){let a=t<0?e.firstChild:e.lastChild,s=a.content;return e.childCount>1&&(o=0),i<r-1&&(s=BE(s,t,n,r,i+1,o)),i>=n&&(s=t<0?a.contentMatchAt(0).fillBefore(s,o<=i).append(s):s.append(a.contentMatchAt(a.childCount).fillBefore(J.empty,!0))),e.replaceChild(t<0?0:e.childCount-1,a.copy(s))}function YN(e,t,n){return t<e.openStart&&(e=new le(BE(e.content,-1,t,e.openStart,0,e.openEnd),t,e.openEnd)),n<e.openEnd&&(e=new le(BE(e.content,1,n,e.openEnd,0,0),e.openStart,n)),e}const BD={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]};let HN=null;function GD(){return HN||(HN=document.implementation.createHTMLDocument("title"))}function lH(e){let t=/^(\s*<meta [^>]*>)*/.exec(e);t&&(e=e.slice(t[0].length));let n=GD().createElement("div"),r=/<([a-z][^>\s]+)/i.exec(e),i;if((i=r&&BD[r[1].toLowerCase()])&&(e=i.map(o=>"<"+o+">").join("")+e+i.map(o=>"</"+o+">").reverse().join("")),n.innerHTML=e,i)for(let o=0;o<i.length;o++)n=n.querySelector(i[o])||n;return n}function cH(e){let t=e.querySelectorAll(Nn?"span:not([class]):not([style])":"span.Apple-converted-space");for(let n=0;n<t.length;n++){let r=t[n];r.childNodes.length==1&&r.textContent==" "&&r.parentNode&&r.parentNode.replaceChild(e.ownerDocument.createTextNode(" "),r)}}function uH(e,t){if(!e.size)return e;let n=e.content.firstChild.type.schema,r;try{r=JSON.parse(t)}catch{return e}let{content:i,openStart:o,openEnd:a}=e;for(let s=r.length-2;s>=0;s-=2){let c=n.nodes[r[s]];if(!c||c.hasRequiredAttrs())break;i=J.from(c.create(r[s+1],i)),o++,a++}return new le(i,o,a)}const An={},In={},dH={touchstart:!0,touchmove:!0};class pH{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:""},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastAndroidDelete=0,this.composing=!1,this.compositionNode=null,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}}function _H(e){for(let t in An){let n=An[t];e.dom.addEventListener(t,e.input.eventHandlers[t]=r=>{fH(e,r)&&!fT(e,r)&&(e.editable||!(r.type in In))&&n(e,r)},dH[t]?{passive:!0}:void 0)}On&&e.dom.addEventListener("input",()=>null),GE(e)}function bo(e,t){e.input.lastSelectionOrigin=t,e.input.lastSelectionTime=Date.now()}function mH(e){e.domObserver.stop();for(let t in e.input.event
Line truncated
|
||||
`).scrollIntoView()),!0)};function ew(e){for(let t=0;t<e.edgeCount;t++){let{type:n}=e.edge(t);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}const f2=(e,t)=>{let{$head:n,$anchor:r}=e.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let i=n.node(-1),o=n.indexAfter(-1),a=ew(i.contentMatchAt(o));if(!a||!i.canReplaceWith(o,o,a))return!1;if(t){let s=n.after(),c=e.tr.replaceWith(s,s,a.createAndFill());c.setSelection(He.near(c.doc.resolve(s),1)),t(c.scrollIntoView())}return!0},g2=(e,t)=>{let n=e.selection,{$from:r,$to:i}=n;if(n instanceof Qr||r.parent.inlineContent||i.parent.inlineContent)return!1;let o=ew(i.parent.contentMatchAt(i.indexAfter()));if(!o||!o.isTextblock)return!1;if(t){let a=(!r.parentOffset&&i.index()<i.parent.childCount?r:i).pos,s=e.tr.insert(a,o.createAndFill());s.setSelection(Ie.create(s.doc,a+1)),t(s.scrollIntoView())}return!0},h2=(e,t)=>{let{$cursor:n}=e.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let o=n.before();if(Vs(e.doc,o))return t&&t(e.tr.split(o).scrollIntoView()),!0}let r=n.blockRange(),i=r&&gl(r);return i==null?!1:(t&&t(e.tr.lift(r,i).scrollIntoView()),!0)},E2=(e,t)=>{let{$from:n,to:r}=e.selection,i,o=n.sharedDepth(r);return o==0?!1:(i=n.before(o),t&&t(e.tr.setSelection(Te.create(e.doc,i))),!0)};function S2(e,t,n){let r=t.nodeBefore,i=t.nodeAfter,o=t.index();return!r||!i||!r.type.compatibleContent(i.type)?!1:!r.content.size&&t.parent.canReplace(o-1,o)?(n&&n(e.tr.delete(t.pos-r.nodeSize,t.pos).scrollIntoView()),!0):!t.parent.canReplace(o,o+1)||!(i.isTextblock||qo(e.doc,t.pos))?!1:(n&&n(e.tr.clearIncompatible(t.pos,r.type,r.contentMatchAt(r.childCount)).join(t.pos).scrollIntoView()),!0)}function tw(e,t,n){let r=t.nodeBefore,i=t.nodeAfter,o,a;if(r.type.spec.isolating||i.type.spec.isolating)return!1;if(S2(e,t,n))return!0;let s=t.parent.canReplace(t.index(),t.index()+1);if(s&&(o=(a=r.contentMatchAt(r.childCount)).findWrapping(i.type))&&a.matchType(o[0]||i.type).validEnd){if(n){let _=t.pos+i.nodeSize,f=J.empty;for(let S=o.length-1;S>=0;S--)f=J.from(o[S].create(null,f));f=J.from(r.copy(f));let g=e.tr.step(new Wt(t.pos-1,_,t.pos,_,new le(f,1,0),o.length,!0)),h=_+2*o.length;qo(g.doc,h)&&g.join(h),n(g.scrollIntoView())}return!0}let c=He.findFrom(t,1),d=c&&c.$from.blockRange(c.$to),p=d&&gl(d);if(p!=null&&p>=t.depth)return n&&n(e.tr.lift(d,p).scrollIntoView()),!0;if(s&&al(i,"start",!0)&&al(r,"end")){let _=r,f=[];for(;f.push(_),!_.isTextblock;)_=_.lastChild;let g=i,h=1;for(;!g.isTextblock;g=g.firstChild)h++;if(_.canReplace(_.childCount,_.childCount,g.content)){if(n){let S=J.empty;for(let T=f.length-1;T>=0;T--)S=J.from(f[T].copy(S));let b=e.tr.step(new Wt(t.pos-f.length,t.pos+i.nodeSize,t.pos+h,t.pos+i.nodeSize-h,new le(S,f.length,0),0,!0));n(b.scrollIntoView())}return!0}}return!1}function nw(e){return function(t,n){let r=t.selection,i=e<0?r.$from:r.$to,o=i.depth;for(;i.node(o).isInline;){if(!o)return!1;o--}return i.node(o).isTextblock?(n&&n(t.tr.setSelection(Ie.create(t.doc,e<0?i.start(o):i.end(o)))),!0):!1}}const T2=nw(-1),b2=nw(1);function y2(e,t=null){return function(n,r){let{$from:i,$to:o}=n.selection,a=i.blockRange(o),s=a&&uT(a,e,t);return s?(r&&r(n.tr.wrap(a,s).scrollIntoView()),!0):!1}}function ev(e,t=null){return function(n,r){let i=!1;for(let o=0;o<n.selection.ranges.length&&!i;o++){let{$from:{pos:a},$to:{pos:s}}=n.selection.ranges[o];n.doc.nodesBetween(a,s,(c,d)=>{if(i)return!1;if(!(!c.isTextblock||c.hasMarkup(e,t)))if(c.type==e)i=!0;else{let p=n.doc.resolve(d),_=p.index();i=p.parent.canReplaceWith(_,_+1,e)}})}if(!i)return!1;if(r){let o=n.tr;for(let a=0;a<n.selection.ranges.length;a++){let{$from:{pos:s},$to:{pos:c}}=n.selection.ranges[a];o.setBlockType(s,c,e,t)}r(o.scrollIntoView())}return!0}}typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):typeof os<"u"&&os.platform&&os.platform()=="darwin";function C2(e,t=null){return function(n,r){let{$from:i,$to:o}=n.selection,a=i.blockRange(o),s=!1,c=a;if(!a)return!1;if(a.depth>=2&&i.node(a.depth-1).type.compatibleContent(e)&&a.startIndex==0){if(i.index(a.depth-1)==0)return!1;let p=n.doc.resolve(a.start-2);c=new p_(p,p,a.depth),a.endIndex<a.parent.childCount&&(a=new p_(i,n.doc.resolve(o.end(a.depth)),a.depth)),s=!0}let d=uT(c,e,t,a);return d?(r&&r(R2(n.tr,a,d,s,e).scrollIntoView()),!0):!1}}function R2(e,t,n,r,i){let o=J.empty;for(let p=n.length-1;p>=0;p--)o=J.from(n[p].type.create(n[p].attrs,o));e.step(new Wt(t.start-(r?2:0),t.end,t.start,t.end,new le(o,0,0),n.length,!0));let a=0;for(let p=0;p<n.length;p++)n[p].type==i&&(a=p+1);let s=n.length-a,c=t.start+n.length-(r?2:0),d=t.parent;for(let p=t.startIndex,_=t.endIndex,f=!0;p<_;p++,f=!1)!f&&Vs(e.doc,c,s)&&(e.split(c,s),c+=2*s),c+=d.child(p).nodeSize;return e}function N2(e){return function(t,n){let{$from:r,$to:i}=t.selection,o=r.blockRange(i,a=>a.childCount>0&&a.firstChild.type==e);return o?n?r.node(o.depth-1).type==e?v2(t,n,e,o):O2(t,n,o):!0:!1}}function v2(e,t,n,r){let i=e.tr,o=r.end,a=r.$to.end(r.depth);o<a&&(i.
Line truncated
|
||||
`,rules:n,plugin:r}):!1}},isInputRules:!0});return r}function P2(e){return typeof e=="number"}class U2{constructor(t){this.find=t.find,this.handler=t.handler}}const F2=(e,t,n)=>{if(yT(t))return[...e.matchAll(t)];const r=t(e,n);return r?r.map(i=>{const o=[i.text];return o.index=i.index,o.input=e,o.data=i.data,i.replaceWith&&(i.text.includes(i.replaceWith)||console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'),o.push(i.replaceWith)),o}):[]};function B2(e){const{editor:t,state:n,from:r,to:i,rule:o,pasteEvent:a,dropEvent:s}=e,{commands:c,chain:d,can:p}=new wm({editor:t,state:n}),_=[];return n.doc.nodesBetween(r,i,(g,h)=>{if(!g.isTextblock||g.type.spec.code)return;const S=Math.max(r,h),b=Math.min(i,h+g.content.size),T=g.textBetween(S-h,b-h,void 0,"");F2(T,o.find,a).forEach(R=>{if(R.index===void 0)return;const O=S+R.index+1,I=O+R[0].length,x={from:n.tr.mapping.map(O),to:n.tr.mapping.map(I)},k=o.handler({state:n,range:x,match:R,commands:c,chain:d,can:p,pasteEvent:a,dropEvent:s});_.push(k)})}),_.every(g=>g!==null)}const G2=e=>{var t;const n=new ClipboardEvent("paste",{clipboardData:new DataTransfer});return(t=n.clipboardData)===null||t===void 0||t.setData("text/html",e),n};function Y2(e){const{editor:t,rules:n}=e;let r=null,i=!1,o=!1,a=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,s=typeof DragEvent<"u"?new DragEvent("drop"):null;const c=({state:p,from:_,to:f,rule:g,pasteEvt:h})=>{const S=p.tr,b=Dm({state:p,transaction:S});if(!(!B2({editor:t,state:b,from:Math.max(_-1,0),to:f.b-1,rule:g,pasteEvent:h,dropEvent:s})||!S.steps.length))return s=typeof DragEvent<"u"?new DragEvent("drop"):null,a=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,S};return n.map(p=>new pt({view(_){const f=g=>{var h;r=!((h=_.dom.parentElement)===null||h===void 0)&&h.contains(g.target)?_.dom.parentElement:null};return window.addEventListener("dragstart",f),{destroy(){window.removeEventListener("dragstart",f)}}},props:{handleDOMEvents:{drop:(_,f)=>(o=r===_.dom.parentElement,s=f,!1),paste:(_,f)=>{var g;const h=(g=f.clipboardData)===null||g===void 0?void 0:g.getData("text/html");return a=f,i=!!(h!=null&&h.includes("data-pm-slice")),!1}}},appendTransaction:(_,f,g)=>{const h=_[0],S=h.getMeta("uiEvent")==="paste"&&!i,b=h.getMeta("uiEvent")==="drop"&&!o,T=h.getMeta("applyPasteRules"),y=!!T;if(!S&&!b&&!y)return;if(y){const{from:I,text:x}=T,k=I+x.length,$=G2(x);return c({rule:p,state:g,from:I,to:{b:k},pasteEvt:$})}const R=f.doc.content.findDiffStart(g.doc.content),O=f.doc.content.findDiffEnd(g.doc.content);if(!(!P2(R)||!O||R===O.b))return c({rule:p,state:g,from:R,to:O,pasteEvt:a})}}))}function H2(e){const t=e.filter((n,r)=>e.indexOf(n)!==r);return[...new Set(t)]}class Ps{constructor(t,n){this.splittableMarks=[],this.editor=n,this.extensions=Ps.resolve(t),this.schema=x2(this.extensions,n),this.setupExtensions()}static resolve(t){const n=Ps.sort(Ps.flatten(t)),r=H2(n.map(i=>i.name));return r.length&&console.warn(`[tiptap warn]: Duplicate extension names found: [${r.map(i=>`'${i}'`).join(", ")}]. This can lead to issues.`),n}static flatten(t){return t.map(n=>{const r={name:n.name,options:n.options,storage:n.storage},i=fe(n,"addExtensions",r);return i?[n,...this.flatten(i())]:n}).flat(10)}static sort(t){return t.sort((r,i)=>{const o=fe(r,"priority")||100,a=fe(i,"priority")||100;return o>a?-1:o<a?1:0})}get commands(){return this.extensions.reduce((t,n)=>{const r={name:n.name,options:n.options,storage:n.storage,editor:this.editor,type:Zg(n.name,this.schema)},i=fe(n,"addCommands",r);return i?{...t,...i()}:t},{})}get plugins(){const{editor:t}=this,n=Ps.sort([...this.extensions].reverse()),r=[],i=[],o=n.map(a=>{const s={name:a.name,options:a.options,storage:a.storage,editor:t,type:Zg(a.name,this.schema)},c=[],d=fe(a,"addKeyboardShortcuts",s);let p={};if(a.type==="mark"&&fe(a,"exitable",s)&&(p.ArrowRight=()=>Ft.handleExit({editor:t,mark:a})),d){const S=Object.fromEntries(Object.entries(d()).map(([b,T])=>[b,()=>T({editor:t})]));p={...p,...S}}const _=n2(p);c.push(_);const f=fe(a,"addInputRules",s);rv(a,t.options.enableInputRules)&&f&&r.push(...f());const g=fe(a,"addPasteRules",s);rv(a,t.options.enablePasteRules)&&g&&i.push(...g());const h=fe(a,"addProseMirrorPlugins",s);if(h){const S=h();c.push(...S)}return c}).flat();return[k2({editor:t,rules:r}),...Y2({editor:t,rules:i}),...o]}get attributes(){return rw(this.extensions)}get nodeViews(){const{editor:t}=this,{nodeExtensions:n}=xm(this.extensions);return Object.fromEntries(n.filter(r=>!!fe(r,"addNodeView")).map(r=>{const i=this.attributes.filter(c=>c.type===r.name),o={name:r.name,options:r.options,storage:r.storage,editor:t,type:Kt(r.name,this.schema)},a=fe(r,"addNodeView",o);if(!a)return[];const s=(c,d,p,_)=>{const f=YE(c,i);return a()({editor:t,node:c,getPos:p,decorations:_,HTMLAttributes:f,extension:r})};return[r.name,s]}))}setupExtensions(){this.extensions.forEach(t=>{var n;this.editor.extensionStorage[t.name]=t.storage;const r={name:t.name,
Line truncated
|
||||
|
||||
`,textSerializers:a={}}=n||{};let s="";return e.nodesBetween(r,i,(c,d,p,_)=>{var f;c.isBlock&&d>r&&(s+=o);const g=a==null?void 0:a[c.type.name];if(g)return p&&(s+=g({node:c,pos:d,parent:p,index:_,range:t})),!1;c.isText&&(s+=(f=c==null?void 0:c.text)===null||f===void 0?void 0:f.slice(Math.max(r,d)-d,i-d))}),s}function aw(e){return Object.fromEntries(Object.entries(e.nodes).filter(([,t])=>t.spec.toText).map(([t,n])=>[t,n.spec.toText]))}const V2=vt.create({name:"clipboardTextSerializer",addOptions(){return{blockSeparator:void 0}},addProseMirrorPlugins(){return[new pt({key:new at("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{const{editor:e}=this,{state:t,schema:n}=e,{doc:r,selection:i}=t,{ranges:o}=i,a=Math.min(...o.map(p=>p.$from.pos)),s=Math.max(...o.map(p=>p.$to.pos)),c=aw(n);return ow(r,{from:a,to:s},{...this.options.blockSeparator!==void 0?{blockSeparator:this.options.blockSeparator}:{},textSerializers:c})}}})]}}),z2=()=>({editor:e,view:t})=>(requestAnimationFrame(()=>{var n;e.isDestroyed||(t.dom.blur(),(n=window==null?void 0:window.getSelection())===null||n===void 0||n.removeAllRanges())}),!0),W2=(e=!1)=>({commands:t})=>t.setContent("",e),q2=()=>({state:e,tr:t,dispatch:n})=>{const{selection:r}=t,{ranges:i}=r;return n&&i.forEach(({$from:o,$to:a})=>{e.doc.nodesBetween(o.pos,a.pos,(s,c)=>{if(s.type.isText)return;const{doc:d,mapping:p}=t,_=d.resolve(p.map(c)),f=d.resolve(p.map(c+s.nodeSize)),g=_.blockRange(f);if(!g)return;const h=gl(g);if(s.type.isTextblock){const{defaultType:S}=_.parent.contentMatchAt(_.index());t.setNodeMarkup(g.start,S)}(h||h===0)&&t.lift(g,h)})}),!0},K2=e=>t=>e(t),Q2=()=>({state:e,dispatch:t})=>g2(e,t),X2=(e,t)=>({editor:n,tr:r})=>{const{state:i}=n,o=i.doc.slice(e.from,e.to);r.deleteRange(e.from,e.to);const a=r.mapping.map(t);return r.insert(a,o.content),r.setSelection(new Ie(r.doc.resolve(a-1))),!0},j2=()=>({tr:e,dispatch:t})=>{const{selection:n}=e,r=n.$anchor.node();if(r.content.size>0)return!1;const i=e.selection.$anchor;for(let o=i.depth;o>0;o-=1)if(i.node(o).type===r.type){if(t){const s=i.before(o),c=i.after(o);e.delete(s,c).scrollIntoView()}return!0}return!1},Z2=e=>({tr:t,state:n,dispatch:r})=>{const i=Kt(e,n.schema),o=t.selection.$anchor;for(let a=o.depth;a>0;a-=1)if(o.node(a).type===i){if(r){const c=o.before(a),d=o.after(a);t.delete(c,d).scrollIntoView()}return!0}return!1},J2=e=>({tr:t,dispatch:n})=>{const{from:r,to:i}=e;return n&&t.delete(r,i),!0},e$=()=>({state:e,dispatch:t})=>i2(e,t),t$=()=>({commands:e})=>e.keyboardShortcut("Enter"),n$=()=>({state:e,dispatch:t})=>f2(e,t);function b_(e,t,n={strict:!0}){const r=Object.keys(t);return r.length?r.every(i=>n.strict?t[i]===e[i]:yT(t[i])?t[i].test(e[i]):t[i]===e[i]):!0}function HE(e,t,n={}){return e.find(r=>r.type===t&&b_(r.attrs,n))}function r$(e,t,n={}){return!!HE(e,t,n)}function CT(e,t,n={}){if(!e||!t)return;let r=e.parent.childAfter(e.parentOffset);if(e.parentOffset===r.offset&&r.offset!==0&&(r=e.parent.childBefore(e.parentOffset)),!r.node)return;const i=HE([...r.node.marks],t,n);if(!i)return;let o=r.index,a=e.start()+r.offset,s=o+1,c=a+r.node.nodeSize;for(HE([...r.node.marks],t,n);o>0&&i.isInSet(e.parent.child(o-1).marks);)o-=1,a-=e.parent.child(o).nodeSize;for(;s<e.parent.childCount&&r$([...e.parent.child(s).marks],t,n);)c+=e.parent.child(s).nodeSize,s+=1;return{from:a,to:c}}function Qo(e,t){if(typeof e=="string"){if(!t.marks[e])throw Error(`There is no mark type named '${e}'. Maybe you forgot to add the extension?`);return t.marks[e]}return e}const i$=(e,t={})=>({tr:n,state:r,dispatch:i})=>{const o=Qo(e,r.schema),{doc:a,selection:s}=n,{$from:c,from:d,to:p}=s;if(i){const _=CT(c,o,t);if(_&&_.from<=d&&_.to>=p){const f=Ie.create(a,_.from,_.to);n.setSelection(f)}}return!0},o$=e=>t=>{const n=typeof e=="function"?e(t):e;for(let r=0;r<n.length;r+=1)if(n[r](t))return!0;return!1};function sw(e){return e instanceof Ie}function yo(e=0,t=0,n=0){return Math.min(Math.max(e,t),n)}function lw(e,t=null){if(!t)return null;const n=He.atStart(e),r=He.atEnd(e);if(t==="start"||t===!0)return n;if(t==="end")return r;const i=n.from,o=r.to;return t==="all"?Ie.create(e,yo(0,i,o),yo(e.content.size,i,o)):Ie.create(e,yo(t,i,o),yo(t,i,o))}function Lm(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}const a$=(e=null,t={})=>({editor:n,view:r,tr:i,dispatch:o})=>{t={scrollIntoView:!0,...t};const a=()=>{Lm()&&r.dom.focus(),requestAnimationFrame(()=>{n.isDestroyed||(r.focus(),t!=null&&t.scrollIntoView&&n.commands.scrollIntoView())})};if(r.hasFocus()&&e===null||e===!1)return!0;if(o&&e===null&&!sw(n.state.selection))return a(),!0;const s=lw(i.doc,e)||n.state.selection,c=n.state.selection.eq(s);return o&&(c||i.setSelection(s),c&&i.storedMarks&&i.setStoredMarks(i.storedMarks),a()),!0},s$=(e,t)=>n=>e.every((r,i)=>t(r,{...n,index:i})),l$=(e,t)=>({tr:n,commands:r})=>r.insertContentAt({from:n.selection.from,to:n.selection.to},e,t
Line truncated
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.ProseMirror {
|
||||
word-wrap: break-word;
|
||||
white-space: pre-wrap;
|
||||
white-space: break-spaces;
|
||||
-webkit-font-variant-ligatures: none;
|
||||
font-variant-ligatures: none;
|
||||
font-feature-settings: "liga" 0; /* the above doesn't seem to work in Edge */
|
||||
}
|
||||
|
||||
.ProseMirror [contenteditable="false"] {
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
.ProseMirror [contenteditable="false"] [contenteditable="true"] {
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
|
||||
.ProseMirror pre {
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
|
||||
img.ProseMirror-separator {
|
||||
display: inline !important;
|
||||
border: none !important;
|
||||
margin: 0 !important;
|
||||
width: 1px !important;
|
||||
height: 1px !important;
|
||||
}
|
||||
|
||||
.ProseMirror-gapcursor {
|
||||
display: none;
|
||||
pointer-events: none;
|
||||
position: absolute;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.ProseMirror-gapcursor:after {
|
||||
content: "";
|
||||
display: block;
|
||||
position: absolute;
|
||||
top: -2px;
|
||||
width: 20px;
|
||||
border-top: 1px solid black;
|
||||
animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;
|
||||
}
|
||||
|
||||
@keyframes ProseMirror-cursor-blink {
|
||||
to {
|
||||
visibility: hidden;
|
||||
}
|
||||
}
|
||||
|
||||
.ProseMirror-hideselection *::selection {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.ProseMirror-hideselection *::-moz-selection {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.ProseMirror-hideselection * {
|
||||
caret-color: transparent;
|
||||
}
|
||||
|
||||
.ProseMirror-focused .ProseMirror-gapcursor {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.tippy-box[data-animation=fade][data-state=hidden] {
|
||||
opacity: 0
|
||||
}`;function SV(e,t,n){const r=document.querySelector("style[data-tiptap-style]");if(r!==null)return r;const i=document.createElement("style");return t&&i.setAttribute("nonce",t),i.setAttribute("data-tiptap-style",""),i.innerHTML=e,document.getElementsByTagName("head")[0].appendChild(i),i}let TV=class extends I2{constructor(t={}){super(),this.isFocused=!1,this.extensionStorage={},this.options={element:document.createElement("div"),content:"",injectCSS:!0,injectNonce:void 0,extensions:[],autofocus:!1,editable:!0,editorProps:{},parseOptions:{},coreExtensionOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,enableContentCheck:!1,onBeforeCreate:()=>null,onCreate:()=>null,onUpdate:()=>null,onSelectionUpdate:()=>null,onTransaction:()=>null,onFocus:()=>null,onBlur:()=>null,onDestroy:()=>null,onContentError:({error:n})=>{throw n}},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.setOptions(t),this.createExtensionManager(),this.createCommandManager(),this.createSchema(),this.on("beforeCreate",this.options.onBeforeCreate),this.emit("beforeCreate",{editor:this}),this.on("contentError",this.options.onContentError),this.createView(),this.injectCSS(),this.on("create",this.options.onCreate),this.on("update",this.options.onUpdate),this.on("selectionUpdate",this.options.onSelectionUpdate),this.on("transaction",this.options.onTransaction),this.on("focus",this.options.onFocus),this.on("blur",this.options.onBlur),this.on("destroy",this.options.onDestroy),window.setTimeout(()=>{this.isDestroyed||(this.commands.focus(this.options.autofocus),this.emit("create",{editor:this}))},0)}get storage(){return this.extensionStorage}get commands(){return this.commandManager.commands}chain(){return this.commandManager.chain()}can(){return this.commandManager.can()}injectCSS(){this.options.injectCSS&&document&&(this.css=SV(EV,this.options.injectNonce))}setOptions(t={}){this.options={...this.options,...t},!(!this.view||!this.state||this.isDestroyed)&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}setEditable(t,n=!0){this.setOptions({editable:t}),n&&this.emit("update",{editor:this,transaction:this.state.tr})}get isEditable(){return this.options.editable&&this.view&&this.view.editable}get state(){return this.view.state}registerPlugin(t,n){const r=iw(n)?n(t,[...this.state.plugins]):[...this.state.plugins,t],i=this.state.reconfigure({plugins:r});this.view.updateState(i)}unregisterPlugin(t){if(this.isDestroyed)return;const n=typeof t=="string"?`${t}$`:t.key,r=this.state.reconfigure({plugins:this.state.plugins.filter(i=>!i.key.startsWith(n))});this.view.updateState(r)}createExtensionManager(){var t,n;const i=[...this.options.enableCoreExtensions?[mV,V2.configure({blockSeparator:(n=(t=this.options.coreExtensionOptions)===null||t===void 0?void 0:t.clipboardTextSerializer)===null||n===void 0?void 0:n.blockSeparator}),_V,fV,gV,hV]:[],...this.options.extensions].filter(o=>["extension","node","mark"].includes(o==null?void 0:o.type));this.extensionManager=new Ps(i,this)}createCommandManager(){this.commandManager=new wm({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createView(){let t;try{t=$E(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:this.options.enableContentCheck})}catch(o){if(!(o instanceof Error)||!["[tiptap error]: Invalid JSON content","[tiptap error]: Invalid HTML content"].includes(o.message))throw o;this.emit("contentError",{editor:this,error:o,disableCollaboration:()=>{this.options.extensions=this.options.extensions.filter(a=>a.name!=="collaboration"),this.createExtensionManager()}}),t=$E(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:!1})}const n=lw(t,this.options.autofocus);this.view=new qH(this.options.element,{...this.options.editorProps,dispatchTransaction:this.dispatchTransaction.bind(this),state:ks.create({doc:t,selection:n||void 0})});const r=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(r),this.createNodeViews(),this.prependClass();const i=this.view.dom;i.editor=this}createNodeViews(){this.view.setProps({nodeViews:this.extensionManager.nodeViews})}prependClass(){this.view.dom.className=`tiptap ${this.view.dom.className}`}captureTransaction(t){this.isCapturingTransaction=!0,t(),this.isCapturingTransaction=!1;const n=this.capturedTransaction;return this.capturedTransaction=null,n}dispatchTransaction(t){if(this.view.isDestroyed)return;if(this.isCapturingTransaction){if(!this.capturedTransaction){this.capturedTransaction=t;return}t.steps.forEach(a=>{var s;return(s=this.capturedTransaction)===null||s===void 0?void 0:s.step(a)});return}const n=this.state.apply(t),r=!this.state.selection.eq(n.selection);this.view.updateState(n),this.emit("transaction",{editor:this,transaction:t}),r&&this.emit("selectionUpdate",{editor:this,transaction:t});const i=t.getMeta("focus"),o=t.getMeta("blur");i&&this.emit("focus",{ed
Line truncated
|
||||
|
||||
`,textSerializers:r={}}=t||{};return B$(this.state.doc,{blockSeparator:n,textSerializers:{...aw(this.schema),...r}})}get isEmpty(){return z$(this.state.doc)}getCharacterCount(){return console.warn('[tiptap warn]: "editor.getCharacterCount()" is deprecated. Please use "editor.storage.characterCount.characters()" instead.'),this.state.doc.content.size-2}destroy(){this.emit("destroy"),this.view&&this.view.destroy(),this.removeAllListeners()}get isDestroyed(){var t;return!(!((t=this.view)===null||t===void 0)&&t.docView)}$node(t,n){var r;return((r=this.$doc)===null||r===void 0?void 0:r.querySelector(t,n))||null}$nodes(t,n){var r;return((r=this.$doc)===null||r===void 0?void 0:r.querySelectorAll(t,n))||null}$pos(t){const n=this.state.doc.resolve(t);return new ma(n,this)}get $doc(){return this.$pos(0)}};function Ya(e){return new Ou({find:e.find,handler:({state:t,range:n,match:r})=>{const i=Be(e.getAttributes,void 0,r);if(i===!1||i===null)return null;const{tr:o}=t,a=r[r.length-1],s=r[0];if(a){const c=s.search(/\S/),d=n.from+s.indexOf(a),p=d+a.length;if(OT(n.from,n.to,t.doc).filter(g=>g.mark.type.excluded.find(S=>S===e.type&&S!==g.mark.type)).filter(g=>g.to>d).length)return null;p<n.to&&o.delete(p,n.to),d>n.from&&o.delete(n.from+c,d);const f=n.from+c+a.length;o.addMark(n.from+c,f,e.type.create(i||{})),o.removeStoredMark(e.type)}}})}function dw(e){return new Ou({find:e.find,handler:({state:t,range:n,match:r})=>{const i=Be(e.getAttributes,void 0,r)||{},{tr:o}=t,a=n.from;let s=n.to;const c=e.type.create(i);if(r[1]){const d=r[0].lastIndexOf(r[1]);let p=a+d;p>s?p=s:s=p+r[1].length;const _=r[0][r[0].length-1];o.insertText(_,a+r[0].length-1),o.replaceWith(p,s,c)}else if(r[0]){const d=e.type.isInline?a:a-1;o.insert(d,e.type.create(i)).delete(o.mapping.map(a),o.mapping.map(s))}o.scrollIntoView()}})}function WE(e){return new Ou({find:e.find,handler:({state:t,range:n,match:r})=>{const i=t.doc.resolve(n.from),o=Be(e.getAttributes,void 0,r)||{};if(!i.node(-1).canReplaceWith(i.index(-1),i.indexAfter(-1),e.type))return null;t.tr.delete(n.from,n.to).setBlockType(n.from,n.from,e.type,o)}})}function Ot(e){return new Ou({find:e.find,handler:({state:t,range:n,match:r})=>{let i=e.replace,o=n.from;const a=n.to;if(r[1]){const s=r[0].lastIndexOf(r[1]);i+=r[0].slice(s+r[1].length),o+=s;const c=o-a;c>0&&(i=r[0].slice(s-c,s)+i,o=a)}t.tr.insertText(i,o,a)}})}function ou(e){return new Ou({find:e.find,handler:({state:t,range:n,match:r,chain:i})=>{const o=Be(e.getAttributes,void 0,r)||{},a=t.tr.delete(n.from,n.to),c=a.doc.resolve(n.from).blockRange(),d=c&&uT(c,e.type,o);if(!d)return null;if(a.wrap(c,d),e.keepMarks&&e.editor){const{selection:_,storedMarks:f}=t,{splittableMarks:g}=e.editor.extensionManager,h=f||_.$to.parentOffset&&_.$from.marks();if(h){const S=h.filter(b=>g.includes(b.type.name));a.ensureMarks(S)}}if(e.keepAttributes){const _=e.type.name==="bulletList"||e.type.name==="orderedList"?"listItem":"taskList";i().updateAttributes(_,o).run()}const p=a.doc.resolve(n.from-1).nodeBefore;p&&p.type===e.type&&qo(a.doc,n.from-1)&&(!e.joinPredicate||e.joinPredicate(r,p))&&a.join(n.from-1)}})}class Ft{constructor(t={}){this.type="mark",this.name="mark",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...t},this.name=this.config.name,t.defaultOptions&&Object.keys(t.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=Be(fe(this,"addOptions",{name:this.name}))),this.storage=Be(fe(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(t={}){return new Ft(t)}configure(t={}){const n=this.extend({...this.config,addOptions(){var r;return Mm(((r=this.parent)===null||r===void 0?void 0:r.call(this))||{},t)}});return n.name=this.name,n.parent=this.parent,n}extend(t={}){const n=new Ft(t);return n.parent=this,this.child=n,n.name=t.name?t.name:n.parent.name,t.defaultOptions&&Object.keys(t.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${n.name}".`),n.options=Be(fe(n,"addOptions",{name:n.name})),n.storage=Be(fe(n,"addStorage",{name:n.name,options:n.options})),n}static handleExit({editor:t,mark:n}){const{tr:r}=t.state,i=t.state.selection.$from;if(i.pos===i.end()){const a=i.marks();if(!!!a.find(d=>(d==null?void 0:d.type.name)===n.name))return!1;const c=a.find(d=>(d==null?void 0:d.type.name)===n.name);return c&&r.removeStoredMark(c),r.insertText(" ",i.pos),t.view.dispatch(r),!0}return!1}}class dt{constructor(t={}){this.type="node",this.name="node",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...t},this.name=this.config.name,t.defaultOptions&&Object.keys(t.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHLine truncated
|
||||
* @license React
|
||||
* use-sync-external-store-shim.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/var lv;function IV(){if(lv)return ih;lv=1;var e=ct;function t(_,f){return _===f&&(_!==0||1/_===1/f)||_!==_&&f!==f}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,i=e.useEffect,o=e.useLayoutEffect,a=e.useDebugValue;function s(_,f){var g=f(),h=r({inst:{value:g,getSnapshot:f}}),S=h[0].inst,b=h[1];return o(function(){S.value=g,S.getSnapshot=f,c(S)&&b({inst:S})},[_,g,f]),i(function(){return c(S)&&b({inst:S}),_(function(){c(S)&&b({inst:S})})},[_]),a(g),g}function c(_){var f=_.getSnapshot;_=_.value;try{var g=f();return!n(_,g)}catch{return!0}}function d(_,f){return f()}var p=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?d:s;return ih.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:p,ih}var cv;function DV(){return cv||(cv=1,rh.exports=IV()),rh.exports}/**
|
||||
* @license React
|
||||
* use-sync-external-store-shim/with-selector.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/var uv;function wV(){if(uv)return nh;uv=1;var e=ct,t=DV();function n(d,p){return d===p&&(d!==0||1/d===1/p)||d!==d&&p!==p}var r=typeof Object.is=="function"?Object.is:n,i=t.useSyncExternalStore,o=e.useRef,a=e.useEffect,s=e.useMemo,c=e.useDebugValue;return nh.useSyncExternalStoreWithSelector=function(d,p,_,f,g){var h=o(null);if(h.current===null){var S={hasValue:!1,value:null};h.current=S}else S=h.current;h=s(function(){function T(x){if(!y){if(y=!0,R=x,x=f(x),g!==void 0&&S.hasValue){var k=S.value;if(g(k,x))return O=k}return O=x}if(k=O,r(R,x))return k;var $=f(x);return g!==void 0&&g(k,$)?k:(R=x,O=$)}var y=!1,R,O,I=_===void 0?null:_;return[function(){return T(p())},I===null?void 0:function(){return T(I())}]},[p,_,f,g]);var b=i(d,h[0],h[1]);return a(function(){S.hasValue=!0,S.value=b},[b]),c(b),b},nh}pw.exports=wV();var xV=pw.exports;function MV(e){let t=0,n=0,r={editor:e,transactionNumber:0},i=e;const o=new Set;return{getSnapshot(){return t===n||(n=t,r={editor:i,transactionNumber:t}),r},getServerSnapshot(){return{editor:null,transactionNumber:0}},subscribe(s){return o.add(s),()=>{o.delete(s)}},watch(s){if(i=s,i){const c=()=>{t+=1,o.forEach(p=>p())},d=i;return d.on("transaction",c),()=>{d.off("transaction",c)}}}}}function LV(e){const[t]=B.useState(()=>MV(e.editor)),n=xV.useSyncExternalStoreWithSelector(t.subscribe,t.getSnapshot,t.getServerSnapshot,e.selector,e.equalityFn);return B.useEffect(()=>t.watch(e.editor),[e.editor]),B.useDebugValue(n),n}const kV=!1,qE=typeof window>"u",PV=qE||!!(typeof window<"u"&&window.next);function UV(e={},t=[]){const n=B.useRef(!1),[r,i]=B.useState(()=>{if(e.immediatelyRender===void 0)return qE||PV?null:new th(e);if(e.immediatelyRender&&qE&&kV)throw new Error("Tiptap Error: SSR has been detected, and `immediatelyRender` has been set to `true` this is an unsupported configuration that may result in errors, explicitly set `immediatelyRender` to `false` to avoid hydration mismatches.");return e.immediatelyRender?new th(e):null});B.useDebugValue(r),B.useEffect(()=>{let k=r;k?k.setOptions(e):(k=new th(e),i(k))},t);const{onBeforeCreate:o,onBlur:a,onCreate:s,onDestroy:c,onFocus:d,onSelectionUpdate:p,onTransaction:_,onUpdate:f,onContentError:g}=e,h=B.useRef(o),S=B.useRef(a),b=B.useRef(s),T=B.useRef(c),y=B.useRef(d),R=B.useRef(p),O=B.useRef(_),I=B.useRef(f),x=B.useRef(g);return B.useEffect(()=>{r&&(o&&(r.off("beforeCreate",h.current),r.on("beforeCreate",o),h.current=o),a&&(r.off("blur",S.current),r.on("blur",a),S.current=a),s&&(r.off("create",b.current),r.on("create",s),b.current=s),c&&(r.off("destroy",T.current),r.on("destroy",c),T.current=c),d&&(r.off("focus",y.current),r.on("focus",d),y.current=d),p&&(r.off("selectionUpdate",R.current),r.on("selectionUpdate",p),R.current=p),_&&(r.off("transaction",O.current),r.on("transaction",_),O.current=_),f&&(r.off("update",I.current),r.on("update",f),I.current=f),g&&(r.off("contentError",x.current),r.on("contentError",g),x.current=g))},[o,a,s,c,d,p,_,f,g,r]),B.useEffect(()=>(n.current=!0,()=>{n.current=!1,r&&setTimeout(()=>{!n.current&&!r.isDestroyed&&r.destroy()})}),[]),LV({editor:r,selector:({transactionNumber:k})=>e.shouldRerenderOnTransaction===!1?null:e.immediatelyRender&&k===0?0:k+1}),r}const Ue=B.createContext({editor:null}),FV=Ue.Consumer;function BV({children:e,slotAfter:t,slotBefore:n,...r}){const i=UV(r);return i?ct.createElement(Ue.Provider,{value:{editor:i}},n,ct.createElement(FV,null,({editor:o})=>ct.createElement(AV,{editor:o})),e,t):null}const _w=B.createContext({onDragStart:void 0}),mw=()=>B.useContext(_w),AT=e=>{const t=e.as||"div",{nodeViewContentRef:n}=mw();return ct.createElement(t,{...e,ref:n,"data-node-view-content":"",style:{whiteSpace:"pre-wrap",...e.style}})},hl=ct.forwardRef((e,t)=>{const{onDragStart:n}=mw(),r=e.as||"div";return ct.createElement(r,{...e,ref:t,"data-node-view-wrapper":"",onDragStart:n,style:{whiteSpace:"normal",...e.style}})});function GV(e){return!!(typeof e=="function"&&e.prototype&&e.prototype.isReactComponent)}function YV(e){var t;return typeof e=="object"&&((t=e.$$typeof)===null||t===void 0?void 0:t.toString())==="Symbol(react.forward_ref)"}class fw{constructor(t,{editor:n,props:r={},as:i="div",className:o="",attrs:a}){this.ref=null,this.id=Math.floor(Math.random()*4294967295).toString(),this.component=t,this.editor=n,this.props=r,this.element=document.createElement(i),this.element.classList.add("react-renderer"),o&&this.element.classList.add(...o.split(" ")),a&&Object.keys(a).forEach(s=>{this.element.setAttribute(s,a[s])}),this.render()}render(){var t,n;const r=this.component,i=this.props;(GV(r)||YV(r))&&(i.ref=o=>{this.ref=o}),this.reactElement=ct.createElement(r,{...i}),(n=(t=this.editor)===null||t===void 0?void 0:t.contentComponent)===null||n===void 0||n.setRenderer(this.id,this)}updateProps(t={}){this.props={...this.props,...t},this.render()}destroy(){var t,n;(n=(t=this.editor)===null||t===void 0?void 0:t.contentComponent)===null||n===void 0||n.removeRenderer(this.id)}}class HV extends yV{mount(Line truncated
|
||||
* @license
|
||||
* Lodash <https://lodash.com/>
|
||||
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
||||
* Released under MIT license <https://lodash.com/license>
|
||||
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
||||
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
||||
*/C_.exports;(function(e,t){(function(){var n,r="4.17.21",i=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",s="Invalid `variable` option passed into `_.template`",c="__lodash_hash_undefined__",d=500,p="__lodash_placeholder__",_=1,f=2,g=4,h=1,S=2,b=1,T=2,y=4,R=8,O=16,I=32,x=64,k=128,$=256,z=512,H=30,ae="...",_e=800,ue=16,me=1,Ee=2,se=3,M=1/0,D=9007199254740991,Y=17976931348623157e292,V=NaN,Z=4294967295,oe=Z-1,Oe=Z>>>1,ze=[["ary",k],["bind",b],["bindKey",T],["curry",R],["curryRight",O],["flip",z],["partial",I],["partialRight",x],["rearg",$]],be="[object Arguments]",Ce="[object Array]",yt="[object AsyncFunction]",ge="[object Boolean]",we="[object Date]",Mn="[object DOMException]",fn="[object Error]",Ln="[object Function]",et="[object GeneratorFunction]",Ze="[object Map]",gn="[object Number]",_t="[object Null]",kn="[object Object]",Lr="[object Promise]",te="[object Proxy]",_r="[object RegExp]",ve="[object Set]",Se="[object String]",hn="[object Symbol]",Bt="[object Undefined]",Pn="[object WeakMap]",Jr="[object WeakSet]",G="[object ArrayBuffer]",K="[object DataView]",ne="[object Float32Array]",pe="[object Float64Array]",Pe="[object Int8Array]",mt="[object Int16Array]",zi="[object Int32Array]",Wi="[object Uint8Array]",wu="[object Uint8ClampedArray]",xu="[object Uint16Array]",Mu="[object Uint32Array]",ib=/\b__p \+= '';/g,ob=/\b(__p \+=) '' \+/g,ab=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Vm=/&(?:amp|lt|gt|quot|#39);/g,zm=/[&<>"']/g,sb=RegExp(Vm.source),lb=RegExp(zm.source),cb=/<%-([\s\S]+?)%>/g,ub=/<%([\s\S]+?)%>/g,Wm=/<%=([\s\S]+?)%>/g,db=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,pb=/^\w*$/,_b=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Lu=/[\\^$.*+?()[\]{}|]/g,mb=RegExp(Lu.source),ku=/^\s+/,fb=/\s/,gb=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,hb=/\{\n\/\* \[wrapped with (.+)\] \*/,Eb=/,? & /,Sb=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Tb=/[()=,{}\[\]\/\s]/,bb=/\\(\\)?/g,yb=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,qm=/\w*$/,Cb=/^[-+]0x[0-9a-f]+$/i,Rb=/^0b[01]+$/i,Nb=/^\[object .+?Constructor\]$/,vb=/^0o[0-7]+$/i,Ob=/^(?:0|[1-9]\d*)$/,Ab=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Cl=/($^)/,Ib=/['\n\r\u2028\u2029\\]/g,Rl="\\ud800-\\udfff",Db="\\u0300-\\u036f",wb="\\ufe20-\\ufe2f",xb="\\u20d0-\\u20ff",Km=Db+wb+xb,Qm="\\u2700-\\u27bf",Xm="a-z\\xdf-\\xf6\\xf8-\\xff",Mb="\\xac\\xb1\\xd7\\xf7",Lb="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",kb="\\u2000-\\u206f",Pb=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",jm="A-Z\\xc0-\\xd6\\xd8-\\xde",Zm="\\ufe0e\\ufe0f",Jm=Mb+Lb+kb+Pb,Pu="['’]",Ub="["+Rl+"]",ef="["+Jm+"]",Nl="["+Km+"]",tf="\\d+",Fb="["+Qm+"]",nf="["+Xm+"]",rf="[^"+Rl+Jm+tf+Qm+Xm+jm+"]",vl="\\ud83c[\\udffb-\\udfff]",of="(?:"+Nl+"|"+vl+")",Uu="[^"+Rl+"]",Ol="(?:\\ud83c[\\udde6-\\uddff]){2}",Al="[\\ud800-\\udbff][\\udc00-\\udfff]",qi="["+jm+"]",Fu="\\u200d",Il="(?:"+nf+"|"+rf+")",Bu="(?:"+qi+"|"+rf+")",Dl="(?:"+Pu+"(?:d|ll|m|re|s|t|ve))?",Gu="(?:"+Pu+"(?:D|LL|M|RE|S|T|VE))?",Yu=of+"?",wl="["+Zm+"]?",Xa="(?:"+Fu+"(?:"+[Uu,Ol,Al].join("|")+")"+wl+Yu+")*",xl="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Hu="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Ml=wl+Yu+Xa,$u="(?:"+[Fb,Ol,Al].join("|")+")"+Ml,Bb="(?:"+[Uu+Nl+"?",Nl,Ol,Al,Ub].join("|")+")",Gb=RegExp(Pu,"g"),tM=RegExp(Nl,"g"),af=RegExp(vl+"(?="+vl+")|"+Bb+Ml,"g"),nM=RegExp([qi+"?"+nf+"+"+Dl+"(?="+[ef,qi,"$"].join("|")+")",Bu+"+"+Gu+"(?="+[ef,qi+Il,"$"].join("|")+")",qi+"?"+Il+"+"+Dl,qi+"+"+Gu,Hu,xl,tf,$u].join("|"),"g"),rM=RegExp("["+Fu+Rl+Km+Zm+"]"),iM=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,oM=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],aM=-1,st={};st[ne]=st[pe]=st[Pe]=st[mt]=st[zi]=st[Wi]=st[wu]=st[xu]=st[Mu]=!0,st[be]=st[Ce]=st[G]=st[ge]=st[K]=st[we]=st[fn]=st[Ln]=st[Ze]=st[gn]=st[kn]=st[_r]=st[ve]=st[Se]=st[Pn]=!1;var tt={};tt[be]=tt[Ce]=tt[G]=tt[K]=tt[ge]=tt[we]=tt[ne]=tt[pe]=tt[Pe]=tt[mt]=tt[zi]=tt[Ze]=tt[gn]=tt[kn]=tt[_r]=tt[ve]=tt[Se]=tt[hn]=tt[Wi]=tt[wu]=tt[xu]=tt[Mu]=!0,tt[fn]=tt[Ln]=tt[Pn]=!1;var sM={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",Line truncated
|
||||
/* [wrapped with `+u+`] */
|
||||
`)}function Ck(l){return De(l)||ia(l)||!!(cy&&l&&l[cy])}function Ci(l,u){var m=typeof l;return u=u??D,!!u&&(m=="number"||m!="symbol"&&Ob.test(l))&&l>-1&&l%1==0&&l<u}function Sn(l,u,m){if(!ht(m))return!1;var E=typeof u;return(E=="number"?Fn(m)&&Ci(u,m.length):E=="string"&&u in m)?Ur(m[u],l):!1}function qf(l,u){if(De(l))return!1;var m=typeof l;return m=="number"||m=="symbol"||m=="boolean"||l==null||er(l)?!0:pb.test(l)||!db.test(l)||u!=null&&l in Je(u)}function Rk(l){var u=typeof l;return u=="string"||u=="number"||u=="symbol"||u=="boolean"?l!=="__proto__":l===null}function Kf(l){var u=Ed(l),m=v[u];if(typeof m!="function"||!(u in Ye.prototype))return!1;if(l===m)return!0;var E=Vf(m);return!!E&&l===E[0]}function Nk(l){return!!oy&&oy in l}var vk=Ku?Ri:dg;function Wl(l){var u=l&&l.constructor,m=typeof u=="function"&&u.prototype||ts;return l===m}function oC(l){return l===l&&!ht(l)}function aC(l,u){return function(m){return m==null?!1:m[l]===u&&(u!==n||l in Je(m))}}function Ok(l){var u=Rd(l,function(E){return m.size===d&&m.clear(),E}),m=u.cache;return u}function Ak(l,u){var m=l[1],E=u[1],C=m|E,A=C<(b|T|k),w=E==k&&m==R||E==k&&m==$&&l[7].length<=u[8]||E==(k|$)&&u[7].length<=u[8]&&m==R;if(!(A||w))return l;E&b&&(l[2]=u[2],C|=m&b?0:y);var L=u[3];if(L){var F=l[3];l[3]=F?Hy(F,L,u[4]):L,l[4]=F?Xi(l[3],p):u[4]}return L=u[5],L&&(F=l[5],l[5]=F?$y(F,L,u[6]):L,l[6]=F?Xi(l[5],p):u[6]),L=u[7],L&&(l[7]=L),E&k&&(l[8]=l[8]==null?u[8]:on(l[8],u[8])),l[9]==null&&(l[9]=u[9]),l[0]=u[0],l[1]=C,l}function Ik(l){var u=[];if(l!=null)for(var m in Je(l))u.push(m);return u}function Dk(l){return Xu.call(l)}function sC(l,u,m){return u=kt(u===n?l.length-1:u,0),function(){for(var E=arguments,C=-1,A=kt(E.length-u,0),w=W(A);++C<A;)w[C]=E[u+C];C=-1;for(var L=W(u+1);++C<u;)L[C]=E[C];return L[u]=m(w),jn(l,this,L)}}function lC(l,u){return u.length<2?l:ta(l,Sr(u,0,-1))}function wk(l,u){for(var m=l.length,E=on(u.length,m),C=Un(l);E--;){var A=u[E];l[E]=Ci(A,m)?C[A]:n}return l}function Qf(l,u){if(!(u==="constructor"&&typeof l[u]=="function")&&u!="__proto__")return l[u]}var cC=dC(xy),ql=WM||function(l,u){return Qt.setTimeout(l,u)},Xf=dC(ek);function uC(l,u,m){var E=u+"";return Xf(l,yk(E,xk(Sk(E),m)))}function dC(l){var u=0,m=0;return function(){var E=XM(),C=ue-(E-m);if(m=E,C>0){if(++u>=_e)return arguments[0]}else u=0;return l.apply(n,arguments)}}function Td(l,u){var m=-1,E=l.length,C=E-1;for(u=u===n?E:u;++m<u;){var A=xf(m,C),w=l[A];l[A]=l[m],l[m]=w}return l.length=u,l}var pC=Ok(function(l){var u=[];return l.charCodeAt(0)===46&&u.push(""),l.replace(_b,function(m,E,C,A){u.push(C?A.replace(bb,"$1"):E||m)}),u});function ni(l){if(typeof l=="string"||er(l))return l;var u=l+"";return u=="0"&&1/l==-M?"-0":u}function ra(l){if(l!=null){try{return Qu.call(l)}catch{}try{return l+""}catch{}}return""}function xk(l,u){return fr(ze,function(m){var E="_."+m[0];u&m[1]&&!Vu(l,E)&&l.push(E)}),l.sort()}function _C(l){if(l instanceof Ye)return l.clone();var u=new hr(l.__wrapped__,l.__chain__);return u.__actions__=Un(l.__actions__),u.__index__=l.__index__,u.__values__=l.__values__,u}function Mk(l,u,m){(m?Sn(l,u,m):u===n)?u=1:u=kt(xe(u),0);var E=l==null?0:l.length;if(!E||u<1)return[];for(var C=0,A=0,w=W(nd(E/u));C<E;)w[A++]=Sr(l,C,C+=u);return w}function Lk(l){for(var u=-1,m=l==null?0:l.length,E=0,C=[];++u<m;){var A=l[u];A&&(C[E++]=A)}return C}function kk(){var l=arguments.length;if(!l)return[];for(var u=W(l-1),m=arguments[0],E=l;E--;)u[E-1]=arguments[E];return Qi(De(m)?Un(m):[m],Xt(u,1))}var Pk=ke(function(l,u){return At(l)?Yl(l,Xt(u,1,At,!0)):[]}),Uk=ke(function(l,u){var m=Tr(u);return At(m)&&(m=n),At(l)?Yl(l,Xt(u,1,At,!0),ye(m,2)):[]}),Fk=ke(function(l,u){var m=Tr(u);return At(m)&&(m=n),At(l)?Yl(l,Xt(u,1,At,!0),n,m):[]});function Bk(l,u,m){var E=l==null?0:l.length;return E?(u=m||u===n?1:xe(u),Sr(l,u<0?0:u,E)):[]}function Gk(l,u,m){var E=l==null?0:l.length;return E?(u=m||u===n?1:xe(u),u=E-u,Sr(l,0,u<0?0:u)):[]}function Yk(l,u){return l&&l.length?pd(l,ye(u,3),!0,!0):[]}function Hk(l,u){return l&&l.length?pd(l,ye(u,3),!0):[]}function $k(l,u,m,E){var C=l==null?0:l.length;return C?(m&&typeof m!="number"&&Sn(l,u,m)&&(m=0,E=C),kL(l,u,m,E)):[]}function mC(l,u,m){var E=l==null?0:l.length;if(!E)return-1;var C=m==null?0:xe(m);return C<0&&(C=kt(E+C,0)),zu(l,ye(u,3),C)}function fC(l,u,m){var E=l==null?0:l.length;if(!E)return-1;var C=E-1;return m!==n&&(C=xe(m),C=m<0?kt(E+C,0):on(C,E-1)),zu(l,ye(u,3),C,!0)}function gC(l){var u=l==null?0:l.length;return u?Xt(l,1):[]}function Vk(l){var u=l==null?0:l.length;return u?Xt(l,M):[]}function zk(l,u){var m=l==null?0:l.length;return m?(u=u===n?1:xe(u),Xt(l,u)):[]}function Wk(l){for(var u=-1,m=l==null?0:l.length,E={};++u<m;){var C=l[u];E[C[0]]=C[1]}return E}function hC(l){return l&&l.length?l[0]:n}function qk(l,u,m){var E=l==null?0:l.length;if(!E)return-1;var C=m==null?0:xe(m);return C<0&&(C=kt(E+C,0)),ja(l,u,C)}function Kk(l){var u=l==null?0:l.length;return u?Sr(l,0,-1):[]}var Qk=ke(function(l){var u=ft(l,Uf);return u.length&&u[0]===l[0]?Of(u):[]}),Xk=ke(
Line truncated
|
||||
`;l.replace(ie,function(Ne,Fe,$e,tr,Tn,nr){return $e||($e=tr),j+=l.slice(Q,nr).replace(Ib,vM),Fe&&(L=!0,j+=`' +
|
||||
__e(`+Fe+`) +
|
||||
'`),Tn&&(F=!0,j+=`';
|
||||
`+Tn+`;
|
||||
__p += '`),$e&&(j+=`' +
|
||||
((__t = (`+$e+`)) == null ? '' : __t) +
|
||||
'`),Q=nr+Ne.length,Ne}),j+=`';
|
||||
`;var Re=Qe.call(u,"variable")&&u.variable;if(!Re)j=`with (obj) {
|
||||
`+j+`
|
||||
}
|
||||
`;else if(Tb.test(Re))throw new Ae(s);j=(F?j.replace(ib,""):j).replace(ob,"$1").replace(ab,"$1;"),j="function("+(Re||"obj")+`) {
|
||||
`+(Re?"":`obj || (obj = {});
|
||||
`)+"var __t, __p = ''"+(L?", __e = _.escape":"")+(F?`, __j = Array.prototype.join;
|
||||
function print() { __p += __j.call(arguments, '') }
|
||||
`:`;
|
||||
`)+j+`return __p
|
||||
}`;var Me=zC(function(){return qe(A,he+"return "+j).apply(n,w)});if(Me.source=j,tg(Me))throw Me;return Me}function Z1(l){return Ke(l).toLowerCase()}function J1(l){return Ke(l).toUpperCase()}function eU(l,u,m){if(l=Ke(l),l&&(m||u===n))return ey(l);if(!l||!(u=Jn(u)))return l;var E=kr(l),C=kr(u),A=ty(E,C),w=ny(E,C)+1;return to(E,A,w).join("")}function tU(l,u,m){if(l=Ke(l),l&&(m||u===n))return l.slice(0,iy(l)+1);if(!l||!(u=Jn(u)))return l;var E=kr(l),C=ny(E,kr(u))+1;return to(E,0,C).join("")}function nU(l,u,m){if(l=Ke(l),l&&(m||u===n))return l.replace(ku,"");if(!l||!(u=Jn(u)))return l;var E=kr(l),C=ty(E,kr(u));return to(E,C).join("")}function rU(l,u){var m=H,E=ae;if(ht(u)){var C="separator"in u?u.separator:C;m="length"in u?xe(u.length):m,E="omission"in u?Jn(u.omission):E}l=Ke(l);var A=l.length;if(Za(l)){var w=kr(l);A=w.length}if(m>=A)return l;var L=m-Ja(E);if(L<1)return E;var F=w?to(w,0,L).join(""):l.slice(0,L);if(C===n)return F+E;if(w&&(L+=F.length-L),ng(C)){if(l.slice(L).search(C)){var Q,X=F;for(C.global||(C=Ef(C.source,Ke(qm.exec(C))+"g")),C.lastIndex=0;Q=C.exec(X);)var j=Q.index;F=F.slice(0,j===n?L:j)}}else if(l.indexOf(Jn(C),L)!=L){var ie=F.lastIndexOf(C);ie>-1&&(F=F.slice(0,ie))}return F+E}function iU(l){return l=Ke(l),l&&sb.test(l)?l.replace(Vm,MM):l}var oU=ss(function(l,u,m){return l+(m?" ":"")+u.toUpperCase()}),og=Wy("toUpperCase");function VC(l,u,m){return l=Ke(l),u=m?n:u,u===n?AM(l)?PM(l):SM(l):l.match(u)||[]}var zC=ke(function(l,u){try{return jn(l,n,u)}catch(m){return tg(m)?m:new Ae(m)}}),aU=yi(function(l,u){return fr(u,function(m){m=ni(m),Ti(l,m,Jf(l[m],l))}),l});function sU(l){var u=l==null?0:l.length,m=ye();return l=u?ft(l,function(E){if(typeof E[1]!="function")throw new gr(a);return[m(E[0]),E[1]]}):[],ke(function(E){for(var C=-1;++C<u;){var A=l[C];if(jn(A[0],this,E))return jn(A[1],this,E)}})}function lU(l){return ML(Er(l,_))}function ag(l){return function(){return l}}function cU(l,u){return l==null||l!==l?u:l}var uU=Ky(),dU=Ky(!0);function Gn(l){return l}function sg(l){return Ry(typeof l=="function"?l:Er(l,_))}function pU(l){return vy(Er(l,_))}function _U(l,u){return Oy(l,Er(u,_))}var mU=ke(function(l,u){return function(m){return Hl(m,l,u)}}),fU=ke(function(l,u){return function(m){return Hl(l,m,u)}});function lg(l,u,m){var E=Gt(u),C=cd(u,E);m==null&&!(ht(u)&&(C.length||!E.length))&&(m=u,u=l,l=this,C=cd(u,Gt(u)));var A=!(ht(m)&&"chain"in m)||!!m.chain,w=Ri(l);return fr(C,function(L){var F=u[L];l[L]=F,w&&(l.prototype[L]=function(){var Q=this.__chain__;if(A||Q){var X=l(this.__wrapped__),j=X.__actions__=Un(this.__actions__);return j.push({func:F,args:arguments,thisArg:l}),X.__chain__=Q,X}return F.apply(l,Qi([this.value()],arguments))})}),l}function gU(){return Qt._===this&&(Qt._=HM),this}function cg(){}function hU(l){return l=xe(l),ke(function(u){return Ay(u,l)})}var EU=Gf(ft),SU=Gf(Qb),TU=Gf(df);function WC(l){return qf(l)?pf(ni(l)):XL(l)}function bU(l){return function(u){return l==null?n:ta(l,u)}}var yU=Xy(),CU=Xy(!0);function ug(){return[]}function dg(){return!1}function RU(){return{}}function NU(){return""}function vU(){return!0}function OU(l,u){if(l=xe(l),l<1||l>D)return[];var m=Z,E=on(l,Z);u=ye(u),l-=Z;for(var C=ff(E,u);++m<l;)u(m);return C}function AU(l){return De(l)?ft(l,ni):er(l)?[l]:Un(pC(Ke(l)))}function IU(l){var u=++GM;return Ke(l)+u}var DU=fd(function(l,u){return l+u},0),wU=Yf("ceil"),xU=fd(function(l,u){return l/u},1),MU=Yf("floor");function LU(l){return l&&l.length?ld(l,Gn,vf):n}function kU(l,u){return l&&l.length?ld(l,ye(u,2),vf):n}function PU(l){return Zb(l,Gn)}function UU(l,u){return Zb(l,ye(u,2))}function FU(l){return l&&l.length?ld(l,Gn,Df):n}function BU(l,u){return l&&l.length?ld(l,ye(u,2),Df):n}var GU=fd(function(l,u){return l*u},1),YU=Yf("round"),HU=fd(function(l,u){return l-u},0);function $U(l){return l&&l.length?mf(l,Gn):0}function VU(l,u){return l&&l.length?mf(l,ye(u,2)):0}return v.after=p0,v.ary=CC,v.assign=J0,v.assignIn=UC,v.assignInWith=Ad,v.assignWith=e1,v.at=t1,v.before=RC,v.bind=Jf,v.bindAll=aU,v.bindKey=NC,v.castArray=R0,v.chain=TC,v.chunk=Mk,v.compact=Lk,v.concat=kk,v.cond=sU,v.conforms=lU,v.constant=ag,v.countBy=$P,v.create=n1,v.curry=vC,v.curryRight=OC,v.debounce=AC,v.defaults=r1,v.defaultsDeep=i1,v.defer=_0,v.delay=m0,v.difference=Pk,v.differenceBy=Uk,v.differenceWith=Fk,v.drop=Bk,v.dropRight=Gk,v.dropRightWhile=Yk,v.dropWhile=Hk,v.fill=$k,v.filter=zP,v.flatMap=KP,v.flatMapDeep=QP,v.flatMapDepth=XP,v.flatten=gC,v.flattenDeep=Vk,v.flattenDepth=zk,v.flip=f0,v.flow=uU,v.flowRight=dU,v.fromPairs=Wk,v.functions=d1,v.functionsIn=p1,v.groupBy=jP,v.initial=Kk,v.intersection=Qk,v.intersectionBy=Xk,v.intersectionWith=jk,v.invert=m1,v.invertBy=f1,v.invokeMap=JP,v.iteratee=sg,v.keyBy=e0,v.keys=Gt,v.keysIn=Bn,v.map=yd,v.mapKeys=h1,v.mapValues=E1,v.matches=pU,v.matchesProperty=_U,v.memoize=Rd,v.merge=S1,v.mergeWith=FC,v.method=mU,v.methodOf=fU,v.mixin=lg,v.negate=Nd,v.nthArg=hU,v.omit=T1,v.omitBy=b1,v.once=g0,v.orderBy=t0,v.over=EU,v.overArgs=h0,v.overEvery=SU,v.overSome=TU,
Line truncated
|
||||
|
||||
`);return!o||!a?!1:e.chain().command(({tr:s})=>(s.delete(r.pos-2,r.pos),!0)).exitCode().run()},ArrowDown:({editor:e})=>{if(!this.options.exitOnArrowDown)return!1;const{state:t}=e,{selection:n,doc:r}=t,{$from:i,empty:o}=n;if(!o||i.parent.type!==this.type||!(i.parentOffset===i.parent.nodeSize-2))return!1;const s=i.after();return s===void 0||r.nodeAt(s)?!1:e.commands.exitCode()}}},addInputRules(){return[WE({find:rz,type:this.type,getAttributes:e=>({language:e[1]})}),WE({find:iz,type:this.type,getAttributes:e=>({language:e[1]})})]},addProseMirrorPlugins(){return[new pt({key:new at("codeBlockVSCodeHandler"),props:{handlePaste:(e,t)=>{if(!t.clipboardData||this.editor.isActive(this.type.name))return!1;const n=t.clipboardData.getData("text/plain"),r=t.clipboardData.getData("vscode-editor-data"),i=r?JSON.parse(r):void 0,o=i==null?void 0:i.mode;if(!n||!o)return!1;const{tr:a,schema:s}=e.state,c=s.text(n.replace(/\r\n?/g,`
|
||||
`));return a.replaceSelectionWith(this.type.create({language:o},c)),a.selection.$from.parent.type!==this.type&&a.setSelection(Ie.near(a.doc.resolve(Math.max(0,a.selection.from-2)))),a.setMeta("paste",!0),e.dispatch(a),!0}}})]}});function az(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function yw(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw new Error("map is read-only")}:e instanceof Set&&(e.add=e.clear=e.delete=function(){throw new Error("set is read-only")}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach(t=>{const n=e[t],r=typeof n;(r==="object"||r==="function")&&!Object.isFrozen(n)&&yw(n)}),e}let Tv=class{constructor(t){t.data===void 0&&(t.data={}),this.data=t.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}};function Cw(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function Co(e,...t){const n=Object.create(null);for(const r in e)n[r]=e[r];return t.forEach(function(r){for(const i in r)n[i]=r[i]}),n}const sz="</span>",bv=e=>!!e.scope,lz=(e,{prefix:t})=>{if(e.startsWith("language:"))return e.replace("language:","language-");if(e.includes(".")){const n=e.split(".");return[`${t}${n.shift()}`,...n.map((r,i)=>`${r}${"_".repeat(i+1)}`)].join(" ")}return`${t}${e}`};let cz=class{constructor(t,n){this.buffer="",this.classPrefix=n.classPrefix,t.walk(this)}addText(t){this.buffer+=Cw(t)}openNode(t){if(!bv(t))return;const n=lz(t.scope,{prefix:this.classPrefix});this.span(n)}closeNode(t){bv(t)&&(this.buffer+=sz)}value(){return this.buffer}span(t){this.buffer+=`<span class="${t}">`}};const yv=(e={})=>{const t={children:[]};return Object.assign(t,e),t};let uz=class Rw{constructor(){this.rootNode=yv(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(t){this.top.children.push(t)}openNode(t){const n=yv({scope:t});this.add(n),this.stack.push(n)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(t){return this.constructor._walk(t,this.rootNode)}static _walk(t,n){return typeof n=="string"?t.addText(n):n.children&&(t.openNode(n),n.children.forEach(r=>this._walk(t,r)),t.closeNode(n)),t}static _collapse(t){typeof t!="string"&&t.children&&(t.children.every(n=>typeof n=="string")?t.children=[t.children.join("")]:t.children.forEach(n=>{Rw._collapse(n)}))}},dz=class extends uz{constructor(t){super(),this.options=t}addText(t){t!==""&&this.add(t)}startScope(t){this.openNode(t)}endScope(){this.closeNode()}__addSublanguage(t,n){const r=t.root;n&&(r.scope=`language:${n}`),this.add(r)}toHTML(){return new cz(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}};function au(e){return e?typeof e=="string"?e:e.source:null}function Nw(e){return qa("(?=",e,")")}function pz(e){return qa("(?:",e,")*")}function _z(e){return qa("(?:",e,")?")}function qa(...e){return e.map(n=>au(n)).join("")}function mz(e){const t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function IT(...e){return"("+(mz(e).capture?"":"?:")+e.map(r=>au(r)).join("|")+")"}function vw(e){return new RegExp(e.toString()+"|").exec("").length-1}function fz(e,t){const n=e&&e.exec(t);return n&&n.index===0}const gz=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function DT(e,{joinWith:t}){let n=0;return e.map(r=>{n+=1;const i=n;let o=au(r),a="";for(;o.length>0;){const s=gz.exec(o);if(!s){a+=o;break}a+=o.substring(0,s.index),o=o.substring(s.index+s[0].length),s[0][0]==="\\"&&s[1]?a+="\\"+String(Number(s[1])+i):(a+=s[0],s[0]==="("&&n++)}return a}).map(r=>`(${r})`).join(t)}const hz=/\b\B/,Ow="[a-zA-Z]\\w*",wT="[a-zA-Z_]\\w*",Aw="\\b\\d+(\\.\\d+)?",Iw="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",Dw="\\b(0b[01]+)",Ez="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",Sz=(e={})=>{const t=/^#![ ]*\//;return e.binary&&(e.begin=qa(t,/.*\b/,e.binary,/\b.*/)),Co({scope:"meta",begin:t,end:/$/,relevance:0,"on:begin":(n,r)=>{n.index!==0&&r.ignoreMatch()}},e)},su={begin:"\\\\[\\s\\S]",relevance:0},Tz={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[su]},bz={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[su]},yz={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},Bm=function(e,t,n={}){const r=Co({scope:"comment",begin:e,end:t,contains:[]},n);r.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const i=IT("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return r.contains.push({begin:qa(/[ ]
Line truncated
|
||||
https://github.com/highlightjs/highlight.js/issues/2277`),Z=M,V=D),Y===void 0&&(Y=!0);const oe={code:V,language:Z};Ee("before:highlight",oe);const Oe=oe.result?oe.result:_(oe.language,oe.code,Y);return Oe.code=oe.code,Ee("after:highlight",Oe),Oe}function _(M,D,Y,V){const Z=Object.create(null);function oe(G,K){return G.keywords[K]}function Oe(){if(!te.keywords){ve.addText(Se);return}let G=0;te.keywordPatternRe.lastIndex=0;let K=te.keywordPatternRe.exec(Se),ne="";for(;K;){ne+=Se.substring(G,K.index);const pe=_t.case_insensitive?K[0].toLowerCase():K[0],Pe=oe(te,pe);if(Pe){const[mt,zi]=Pe;if(ve.addText(ne),ne="",Z[pe]=(Z[pe]||0)+1,Z[pe]<=Jz&&(hn+=zi),mt.startsWith("_"))ne+=K[0];else{const Wi=_t.classNameAliases[mt]||mt;Ce(K[0],Wi)}}else ne+=K[0];G=te.keywordPatternRe.lastIndex,K=te.keywordPatternRe.exec(Se)}ne+=Se.substring(G),ve.addText(ne)}function ze(){if(Se==="")return;let G=null;if(typeof te.subLanguage=="string"){if(!t[te.subLanguage]){ve.addText(Se);return}G=_(te.subLanguage,Se,!0,_r[te.subLanguage]),_r[te.subLanguage]=G._top}else G=g(Se,te.subLanguage.length?te.subLanguage:null);te.relevance>0&&(hn+=G.relevance),ve.__addSublanguage(G._emitter,G.language)}function be(){te.subLanguage!=null?ze():Oe(),Se=""}function Ce(G,K){G!==""&&(ve.startScope(K),ve.addText(G),ve.endScope())}function yt(G,K){let ne=1;const pe=K.length-1;for(;ne<=pe;){if(!G._emit[ne]){ne++;continue}const Pe=_t.classNameAliases[G[ne]]||G[ne],mt=K[ne];Pe?Ce(mt,Pe):(Se=mt,Oe(),Se=""),ne++}}function ge(G,K){return G.scope&&typeof G.scope=="string"&&ve.openNode(_t.classNameAliases[G.scope]||G.scope),G.beginScope&&(G.beginScope._wrap?(Ce(Se,_t.classNameAliases[G.beginScope._wrap]||G.beginScope._wrap),Se=""):G.beginScope._multi&&(yt(G.beginScope,K),Se="")),te=Object.create(G,{parent:{value:te}}),te}function we(G,K,ne){let pe=fz(G.endRe,ne);if(pe){if(G["on:end"]){const Pe=new Tv(G);G["on:end"](K,Pe),Pe.isMatchIgnored&&(pe=!1)}if(pe){for(;G.endsParent&&G.parent;)G=G.parent;return G}}if(G.endsWithParent)return we(G.parent,K,ne)}function Mn(G){return te.matcher.regexIndex===0?(Se+=G[0],1):(Jr=!0,0)}function fn(G){const K=G[0],ne=G.rule,pe=new Tv(ne),Pe=[ne.__beforeBegin,ne["on:begin"]];for(const mt of Pe)if(mt&&(mt(G,pe),pe.isMatchIgnored))return Mn(K);return ne.skip?Se+=K:(ne.excludeBegin&&(Se+=K),be(),!ne.returnBegin&&!ne.excludeBegin&&(Se=K)),ge(ne,G),ne.returnBegin?0:K.length}function Ln(G){const K=G[0],ne=D.substring(G.index),pe=we(te,G,ne);if(!pe)return vv;const Pe=te;te.endScope&&te.endScope._wrap?(be(),Ce(K,te.endScope._wrap)):te.endScope&&te.endScope._multi?(be(),yt(te.endScope,G)):Pe.skip?Se+=K:(Pe.returnEnd||Pe.excludeEnd||(Se+=K),be(),Pe.excludeEnd&&(Se=K));do te.scope&&ve.closeNode(),!te.skip&&!te.subLanguage&&(hn+=te.relevance),te=te.parent;while(te!==pe.parent);return pe.starts&&ge(pe.starts,G),Pe.returnEnd?0:K.length}function et(){const G=[];for(let K=te;K!==_t;K=K.parent)K.scope&&G.unshift(K.scope);G.forEach(K=>ve.openNode(K))}let Ze={};function gn(G,K){const ne=K&&K[0];if(Se+=G,ne==null)return be(),0;if(Ze.type==="begin"&&K.type==="end"&&Ze.index===K.index&&ne===""){if(Se+=D.slice(K.index,K.index+1),!i){const pe=new Error(`0 width match regex (${M})`);throw pe.languageName=M,pe.badRule=Ze.rule,pe}return 1}if(Ze=K,K.type==="begin")return fn(K);if(K.type==="illegal"&&!Y){const pe=new Error('Illegal lexeme "'+ne+'" for mode "'+(te.scope||"<unnamed>")+'"');throw pe.mode=te,pe}else if(K.type==="end"){const pe=Ln(K);if(pe!==vv)return pe}if(K.type==="illegal"&&ne==="")return 1;if(Pn>1e5&&Pn>K.index*3)throw new Error("potential infinite loop, way more iterations than matches");return Se+=ne,ne.length}const _t=z(M);if(!_t)throw Da(o.replace("{}",M)),new Error('Unknown language: "'+M+'"');const kn=Qz(_t);let Lr="",te=V||kn;const _r={},ve=new s.__emitter(s);et();let Se="",hn=0,Bt=0,Pn=0,Jr=!1;try{if(_t.__emitTokens)_t.__emitTokens(D,ve);else{for(te.matcher.considerAll();;){Pn++,Jr?Jr=!1:te.matcher.considerAll(),te.matcher.lastIndex=Bt;const G=te.matcher.exec(D);if(!G)break;const K=D.substring(Bt,G.index),ne=gn(K,G);Bt=G.index+ne}gn(D.substring(Bt))}return ve.finalize(),Lr=ve.toHTML(),{language:M,value:Lr,relevance:hn,illegal:!1,_emitter:ve,_top:te}}catch(G){if(G.message&&G.message.includes("Illegal"))return{language:M,value:sh(D),illegal:!0,relevance:0,_illegalBy:{message:G.message,index:Bt,context:D.slice(Bt-100,Bt+100),mode:G.mode,resultSoFar:Lr},_emitter:ve};if(i)return{language:M,value:sh(D),illegal:!1,relevance:0,errorRaised:G,_emitter:ve,_top:te};throw G}}function f(M){const D={value:sh(M),illegal:!1,relevance:0,_top:a,_emitter:new s.__emitter(s)};return D._emitter.addText(M),D}function g(M,D){D=D||s.languages||Object.keys(t);const Y=f(M),V=D.filter(z).filter(ae).map(be=>_(be,M,!1));V.unshift(Y);const Z=V.sort((be,Ce)=>{if(be.relevance!==Ce.relevance)return Ce.relevance-be.relevance;if(be.language&&Ce.language){if(z(be.language).supersetOf===Ce.language)return 1;if(z(Ce.language).supersetOf===be.language)return-1}return 0}),[oe,Oe]=Z,
Line truncated
|
||||
]*;`,relevance:0},{begin:"[vp][0-9]+"}]}}function HK(e){const t="[a-z][a-zA-Z0-9_]*",n={className:"string",begin:"\\$.{1}"},r={className:"symbol",begin:"#"+e.UNDERSCORE_IDENT_RE};return{name:"Smalltalk",aliases:["st"],keywords:["self","super","nil","true","false","thisContext"],contains:[e.COMMENT('"','"'),e.APOS_STRING_MODE,{className:"type",begin:"\\b[A-Z][A-Za-z0-9_]*",relevance:0},{begin:t+":",relevance:0},e.C_NUMBER_MODE,r,n,{begin:"\\|[ ]*"+t+"([ ]+"+t+")*[ ]*\\|",returnBegin:!0,end:/\|/,illegal:/\S/,contains:[{begin:"(\\|[ ]*)?"+t}]},{begin:"#\\(",end:"\\)",contains:[e.APOS_STRING_MODE,n,e.C_NUMBER_MODE,r]}]}}function $K(e){return{name:"SML (Standard ML)",aliases:["ml"],keywords:{$pattern:"[a-z_]\\w*!?",keyword:"abstype and andalso as case datatype do else end eqtype exception fn fun functor handle if in include infix infixr let local nonfix of op open orelse raise rec sharing sig signature struct structure then type val with withtype where while",built_in:"array bool char exn int list option order real ref string substring vector unit word",literal:"true false NONE SOME LESS EQUAL GREATER nil"},illegal:/\/\/|>>/,contains:[{className:"literal",begin:/\[(\|\|)?\]|\(\)/,relevance:0},e.COMMENT("\\(\\*","\\*\\)",{contains:["self"]}),{className:"symbol",begin:"'[A-Za-z_](?!')[\\w']*"},{className:"type",begin:"`[A-Z][\\w']*"},{className:"type",begin:"\\b[A-Z][\\w']*",relevance:0},{begin:"[a-z_]\\w*'[\\w']*"},e.inherit(e.APOS_STRING_MODE,{className:"string",relevance:0}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null}),{className:"number",begin:"\\b(0[xX][a-fA-F0-9_]+[Lln]?|0[oO][0-7_]+[Lln]?|0[bB][01_]+[Lln]?|[0-9][0-9_]*([Lln]|(\\.[0-9_]*)?([eE][-+]?[0-9_]+)?)?)",relevance:0},{begin:/[-=]>/}]}}function VK(e){const t={className:"variable",begin:/\b_+[a-zA-Z]\w*/},n={className:"title",begin:/[a-zA-Z][a-zA-Z_0-9]*_fnc_[a-zA-Z_0-9]+/},r={className:"string",variants:[{begin:'"',end:'"',contains:[{begin:'""',relevance:0}]},{begin:"'",end:"'",contains:[{begin:"''",relevance:0}]}]},i=["break","breakWith","breakOut","breakTo","case","catch","continue","continueWith","default","do","else","exit","exitWith","for","forEach","from","if","local","private","switch","step","then","throw","to","try","waitUntil","while","with"],o=["blufor","civilian","configNull","controlNull","displayNull","diaryRecordNull","east","endl","false","grpNull","independent","lineBreak","locationNull","nil","objNull","opfor","pi","resistance","scriptNull","sideAmbientLife","sideEmpty","sideEnemy","sideFriendly","sideLogic","sideUnknown","taskNull","teamMemberNull","true","west"],a=["abs","accTime","acos","action","actionIDs","actionKeys","actionKeysEx","actionKeysImages","actionKeysNames","actionKeysNamesArray","actionName","actionParams","activateAddons","activatedAddons","activateKey","activeTitleEffectParams","add3DENConnection","add3DENEventHandler","add3DENLayer","addAction","addBackpack","addBackpackCargo","addBackpackCargoGlobal","addBackpackGlobal","addBinocularItem","addCamShake","addCuratorAddons","addCuratorCameraArea","addCuratorEditableObjects","addCuratorEditingArea","addCuratorPoints","addEditorObject","addEventHandler","addForce","addForceGeneratorRTD","addGoggles","addGroupIcon","addHandgunItem","addHeadgear","addItem","addItemCargo","addItemCargoGlobal","addItemPool","addItemToBackpack","addItemToUniform","addItemToVest","addLiveStats","addMagazine","addMagazineAmmoCargo","addMagazineCargo","addMagazineCargoGlobal","addMagazineGlobal","addMagazinePool","addMagazines","addMagazineTurret","addMenu","addMenuItem","addMissionEventHandler","addMPEventHandler","addMusicEventHandler","addonFiles","addOwnedMine","addPlayerScores","addPrimaryWeaponItem","addPublicVariableEventHandler","addRating","addResources","addScore","addScoreSide","addSecondaryWeaponItem","addSwitchableUnit","addTeamMember","addToRemainsCollector","addTorque","addUniform","addUserActionEventHandler","addVehicle","addVest","addWaypoint","addWeapon","addWeaponCargo","addWeaponCargoGlobal","addWeaponGlobal","addWeaponItem","addWeaponPool","addWeaponTurret","addWeaponWithAttachmentsCargo","addWeaponWithAttachmentsCargoGlobal","admin","agent","agents","AGLToASL","aimedAtTarget","aimPos","airDensityCurveRTD","airDensityRTD","airplaneThrottle","airportSide","AISFinishHeal","alive","all3DENEntities","allActiveTitleEffects","allAddonsInfo","allAirports","allControls","allCurators","allCutLayers","allDead","allDeadMen","allDiaryRecords","allDiarySubjects","allDisplays","allEnv3DSoundSources","allGroups","allLODs","allMapMarkers","allMines","allMissionObjects","allObjects","allow3DMode","allowCrewInImmobile","allowCuratorLogicIgnoreAreas","allowDamage","allowDammage","allowedService","allowFileOperations","allowFleeing","allowGetIn","allowService","allowSprint","allPlayers","allSimpleObjects","allSites","allTurrets","allUnits","allUnitsUAV","allUsers","allVariables","ambientTemperature","ammo","ammoOnPylon","and","animate","animateBay","animateDoor","animatePylon","animateSouLine truncated
|
||||
]*?"'`},{begin:`"[^\r
|
||||
"]*"`}]},{className:"built_in",variants:[{begin:"\\b(abs|acos|asin|atan|atan2|atanh|ceil|cloglog|comb|cos|digamma|exp|floor|invcloglog|invlogit|ln|lnfact|lnfactorial|lngamma|log|log10|max|min|mod|reldif|round|sign|sin|sqrt|sum|tan|tanh|trigamma|trunc|betaden|Binomial|binorm|binormal|chi2|chi2tail|dgammapda|dgammapdada|dgammapdadx|dgammapdx|dgammapdxdx|F|Fden|Ftail|gammaden|gammap|ibeta|invbinomial|invchi2|invchi2tail|invF|invFtail|invgammap|invibeta|invnchi2|invnFtail|invnibeta|invnorm|invnormal|invttail|nbetaden|nchi2|nFden|nFtail|nibeta|norm|normal|normalden|normd|npnchi2|tden|ttail|uniform|abbrev|char|index|indexnot|length|lower|ltrim|match|plural|proper|real|regexm|regexr|regexs|reverse|rtrim|string|strlen|strlower|strltrim|strmatch|strofreal|strpos|strproper|strreverse|strrtrim|strtrim|strupper|subinstr|subinword|substr|trim|upper|word|wordcount|_caller|autocode|byteorder|chop|clip|cond|e|epsdouble|epsfloat|group|inlist|inrange|irecode|matrix|maxbyte|maxdouble|maxfloat|maxint|maxlong|mi|minbyte|mindouble|minfloat|minint|minlong|missing|r|recode|replay|return|s|scalar|d|date|day|dow|doy|halfyear|mdy|month|quarter|week|year|d|daily|dofd|dofh|dofm|dofq|dofw|dofy|h|halfyearly|hofd|m|mofd|monthly|q|qofd|quarterly|tin|twithin|w|weekly|wofd|y|yearly|yh|ym|yofd|yq|yw|cholesky|colnumb|colsof|corr|det|diag|diag0cnt|el|get|hadamard|I|inv|invsym|issym|issymmetric|J|matmissing|matuniform|mreldif|nullmat|rownumb|rowsof|sweep|syminv|trace|vec|vecdiag)(?=\\()"}]},e.COMMENT("^[ ]*\\*.*$",!1),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]}}function qK(e){return{name:"STEP Part 21",aliases:["p21","step","stp"],case_insensitive:!0,keywords:{$pattern:"[A-Z_][A-Z0-9_.]*",keyword:["HEADER","ENDSEC","DATA"]},contains:[{className:"meta",begin:"ISO-10303-21;",relevance:10},{className:"meta",begin:"END-ISO-10303-21;",relevance:10},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.COMMENT("/\\*\\*!","\\*/"),e.C_NUMBER_MODE,e.inherit(e.APOS_STRING_MODE,{illegal:null}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null}),{className:"string",begin:"'",end:"'"},{className:"symbol",variants:[{begin:"#",end:"\\d+",illegal:"\\W"}]}]}}const KK=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z][A-Za-z0-9_-]*/}}),QK=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","p","q","quote","samp","section","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],XK=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"],jK=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"],ZK=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"],JK=["align-content","align-items","align-self","all","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-repeat","backgrou
Line truncated
|
||||
(multipart)?`,end:`\\]
|
||||
`},{className:"string",begin:"\\d{4}-\\d{2}-\\d{2}(\\s+)\\d{2}:\\d{2}:\\d{2}.\\d+Z"},{className:"string",begin:"(\\+|-)\\d+"},{className:"keyword",relevance:10,variants:[{begin:"^(test|testing|success|successful|failure|error|skip|xfail|uxsuccess)(:?)\\s+(test)?"},{begin:"^progress(:?)(\\s+)?(pop|push)?"},{begin:"^tags:"},{begin:"^time:"}]}]}}function n3(e){return{name:"Tagger Script",contains:[{className:"comment",begin:/\$noop\(/,end:/\)/,contains:[{begin:/\\[()]/},{begin:/\(/,end:/\)/,contains:[{begin:/\\[()]/},"self"]}],relevance:10},{className:"keyword",begin:/\$[_a-zA-Z0-9]+(?=\()/},{className:"variable",begin:/%[_a-zA-Z0-9:]+%/},{className:"symbol",begin:/\\[\\nt$%,()]/},{className:"symbol",begin:/\\u[a-fA-F0-9]{4}/}]}}function r3(e){return{name:"Test Anything Protocol",case_insensitive:!0,contains:[e.HASH_COMMENT_MODE,{className:"meta",variants:[{begin:"^TAP version (\\d+)$"},{begin:"^1\\.\\.(\\d+)$"}]},{begin:/---$/,end:"\\.\\.\\.$",subLanguage:"yaml",relevance:0},{className:"number",begin:" (\\d+) "},{className:"symbol",variants:[{begin:"^ok"},{begin:"^not ok"}]}]}}function i3(e){const t=e.regex,n=/[a-zA-Z_][a-zA-Z0-9_]*/,r={className:"number",variants:[e.BINARY_NUMBER_MODE,e.C_NUMBER_MODE]};return{name:"Tcl",aliases:["tk"],keywords:["after","append","apply","array","auto_execok","auto_import","auto_load","auto_mkindex","auto_mkindex_old","auto_qualify","auto_reset","bgerror","binary","break","catch","cd","chan","clock","close","concat","continue","dde","dict","encoding","eof","error","eval","exec","exit","expr","fblocked","fconfigure","fcopy","file","fileevent","filename","flush","for","foreach","format","gets","glob","global","history","http","if","incr","info","interp","join","lappend|10","lassign|10","lindex|10","linsert|10","list","llength|10","load","lrange|10","lrepeat|10","lreplace|10","lreverse|10","lsearch|10","lset|10","lsort|10","mathfunc","mathop","memory","msgcat","namespace","open","package","parray","pid","pkg::create","pkg_mkIndex","platform","platform::shell","proc","puts","pwd","read","refchan","regexp","registry","regsub|10","rename","return","safe","scan","seek","set","socket","source","split","string","subst","switch","tcl_endOfWord","tcl_findLibrary","tcl_startOfNextWord","tcl_startOfPreviousWord","tcl_wordBreakAfter","tcl_wordBreakBefore","tcltest","tclvars","tell","time","tm","trace","unknown","unload","unset","update","uplevel","upvar","variable","vwait","while"],contains:[e.COMMENT(";[ \\t]*#","$"),e.COMMENT("^[ \\t]*#","$"),{beginKeywords:"proc",end:"[\\{]",excludeEnd:!0,contains:[{className:"title",begin:"[ \\t\\n\\r]+(::)?[a-zA-Z_]((::)?[a-zA-Z0-9_])*",end:"[ \\t\\n\\r]",endsWithParent:!0,excludeEnd:!0}]},{className:"variable",variants:[{begin:t.concat(/\$/,t.optional(/::/),n,"(::",n,")*")},{begin:"\\$\\{(::)?[a-zA-Z_]((::)?[a-zA-Z0-9_])*",end:"\\}",contains:[r]}]},{className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[e.inherit(e.QUOTE_STRING_MODE,{illegal:null})]},r]}}function o3(e){const t=["bool","byte","i16","i32","i64","double","string","binary"];return{name:"Thrift",keywords:{keyword:["namespace","const","typedef","struct","enum","service","exception","void","oneway","set","list","map","required","optional"],type:t,literal:"true false"},contains:[e.QUOTE_STRING_MODE,e.NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"class",beginKeywords:"struct enum service exception",end:/\{/,illegal:/\n/,contains:[e.inherit(e.TITLE_MODE,{starts:{endsWithParent:!0,excludeEnd:!0}})]},{begin:"\\b(set|list|map)\\s*<",keywords:{type:[...t,"set","list","map"]},end:">",contains:["self"]}]}}function a3(e){const t={className:"number",begin:"[1-9][0-9]*",relevance:0},n={className:"symbol",begin:":[^\\]]+"},r={className:"built_in",begin:"(AR|P|PAYLOAD|PR|R|SR|RSR|LBL|VR|UALM|MESSAGE|UTOOL|UFRAME|TIMER|TIMER_OVERFLOW|JOINT_MAX_SPEED|RESUME_PROG|DIAG_REC)\\[",end:"\\]",contains:["self",t,n]},i={className:"built_in",begin:"(AI|AO|DI|DO|F|RI|RO|UI|UO|GI|GO|SI|SO)\\[",end:"\\]",contains:["self",t,e.QUOTE_STRING_MODE,n]};return{name:"TP",keywords:{keyword:["ABORT","ACC","ADJUST","AND","AP_LD","BREAK","CALL","CNT","COL","CONDITION","CONFIG","DA","DB","DIV","DETECT","ELSE","END","ENDFOR","ERR_NUM","ERROR_PROG","FINE","FOR","GP","GUARD","INC","IF","JMP","LINEAR_MAX_SPEED","LOCK","MOD","MONITOR","OFFSET","Offset","OR","OVERRIDE","PAUSE","PREG","PTH","RT_LD","RUN","SELECT","SKIP","Skip","TA","TB","TO","TOOL_OFFSET","Tool_Offset","UF","UT","UFRAME_NUM","UTOOL_NUM","UNLOCK","WAIT","X","Y","Z","W","P","R","STRLEN","SUBSTR","FINDSTR","VOFFSET","PROG","ATTR","MN","POS"],literal:["ON","OFF","max_speed","LPOS","JPOS","ENABLE","DISABLE","START","STOP","RESET"]},contains:[r,i,{className:"keyword",begin:"/(PROG|ATTR|MN|POS|END)\\b"},{className:"keyword",begin:"(CALL|RUN|POINT_LOGIC|LBL)\\b"},{className:"keyword",begin:"\\b(ACC|CNT|Skip|Offset|PSPD|RT_LD|AP_LD|Tool_Offset)"},{className:"number",begin:"\\d+(sec|msec|mm/sec|cm/min|inch/min|deg/sec|mm|in|cm)?\\b",relevance:0},e.COMMENT
Line truncated
|
||||
`},d]}}const z3=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z][A-Za-z0-9_-]*/}}),W3=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","p","q","quote","samp","section","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],q3=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"],Yw=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"],Hw=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"],K3=["align-content","align-items","align-self","all","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","content","content-visibility","counter-increment","counter-reset","cue","cue-after","cue-before","cursor","direction","display","empty-cells","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-size","font-size-adjust","font-smoothing","font-stretch","font-style","font-synthesis","font-variant","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","fon
Line truncated
|
||||
]`,g={scope:"string",variants:[d,c,p,_]},h={scope:"number",variants:[{begin:"\\b0[bB][01]+(?:_[01]+)*\\b"},{begin:"\\b0[oO][0-7]+(?:_[0-7]+)*\\b"},{begin:"\\b0[xX][\\da-fA-F]+(?:_[\\da-fA-F]+)*\\b"},{begin:"(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:[eE][+-]?\\d+)?"}],relevance:0},S=["false","null","true"],b=["__CLASS__","__DIR__","__FILE__","__FUNCTION__","__COMPILER_HALT_OFFSET__","__LINE__","__METHOD__","__NAMESPACE__","__TRAIT__","die","echo","exit","include","include_once","print","require","require_once","array","abstract","and","as","binary","bool","boolean","break","callable","case","catch","class","clone","const","continue","declare","default","do","double","else","elseif","empty","enddeclare","endfor","endforeach","endif","endswitch","endwhile","enum","eval","extends","final","finally","float","for","foreach","from","global","goto","if","implements","instanceof","insteadof","int","integer","interface","isset","iterable","list","match|0","mixed","new","never","object","or","private","protected","public","readonly","real","return","string","switch","throw","trait","try","unset","use","var","void","while","xor","yield"],T=["Error|0","AppendIterator","ArgumentCountError","ArithmeticError","ArrayIterator","ArrayObject","AssertionError","BadFunctionCallException","BadMethodCallException","CachingIterator","CallbackFilterIterator","CompileError","Countable","DirectoryIterator","DivisionByZeroError","DomainException","EmptyIterator","ErrorException","Exception","FilesystemIterator","FilterIterator","GlobIterator","InfiniteIterator","InvalidArgumentException","IteratorIterator","LengthException","LimitIterator","LogicException","MultipleIterator","NoRewindIterator","OutOfBoundsException","OutOfRangeException","OuterIterator","OverflowException","ParentIterator","ParseError","RangeException","RecursiveArrayIterator","RecursiveCachingIterator","RecursiveCallbackFilterIterator","RecursiveDirectoryIterator","RecursiveFilterIterator","RecursiveIterator","RecursiveIteratorIterator","RecursiveRegexIterator","RecursiveTreeIterator","RegexIterator","RuntimeException","SeekableIterator","SplDoublyLinkedList","SplFileInfo","SplFileObject","SplFixedArray","SplHeap","SplMaxHeap","SplMinHeap","SplObjectStorage","SplObserver","SplPriorityQueue","SplQueue","SplStack","SplSubject","SplTempFileObject","TypeError","UnderflowException","UnexpectedValueException","UnhandledMatchError","ArrayAccess","BackedEnum","Closure","Fiber","Generator","Iterator","IteratorAggregate","Serializable","Stringable","Throwable","Traversable","UnitEnum","WeakReference","WeakMap","Directory","__PHP_Incomplete_Class","parent","php_user_filter","self","static","stdClass"],R={keyword:b,literal:(ue=>{const me=[];return ue.forEach(Ee=>{me.push(Ee),Ee.toLowerCase()===Ee?me.push(Ee.toUpperCase()):me.push(Ee.toLowerCase())}),me})(S),built_in:T},O=ue=>ue.map(me=>me.replace(/\|\d+$/,"")),I={variants:[{match:[/new/,t.concat(f,"+"),t.concat("(?!",O(T).join("\\b|"),"\\b)"),i],scope:{1:"keyword",4:"title.class"}}]},x=t.concat(r,"\\b(?!\\()"),k={variants:[{match:[t.concat(/::/,t.lookahead(/(?!class\b)/)),x],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[i,t.concat(/::/,t.lookahead(/(?!class\b)/)),x],scope:{1:"title.class",3:"variable.constant"}},{match:[i,t.concat("::",t.lookahead(/(?!class\b)/))],scope:{1:"title.class"}},{match:[i,/::/,/class/],scope:{1:"title.class",3:"variable.language"}}]},$={scope:"attr",match:t.concat(r,t.lookahead(":"),t.lookahead(/(?!::)/))},z={relevance:0,begin:/\(/,end:/\)/,keywords:R,contains:[$,o,k,e.C_BLOCK_COMMENT_MODE,g,h,I]},H={relevance:0,match:[/\b/,t.concat("(?!fn\\b|function\\b|",O(b).join("\\b|"),"|",O(T).join("\\b|"),"\\b)"),r,t.concat(f,"*"),t.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[z]};z.contains.push(H);const ae=[$,k,e.C_BLOCK_COMMENT_MODE,g,h,I],_e={begin:t.concat(/#\[\s*/,i),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:S,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:S,keyword:["new","array"]},contains:["self",...ae]},...ae,{scope:"meta",match:i}]};return{case_insensitive:!1,keywords:R,contains:[_e,e.HASH_COMMENT_MODE,e.COMMENT("//","$"),e.COMMENT("/\\*","\\*/",{contains:[{scope:"doctag",match:"@[A-Za-z]+"}]}),{match:/__halt_compiler\(\);/,keywords:"__halt_compiler",starts:{scope:"comment",end:e.MATCH_NOTHING_RE,contains:[{match:/\?>/,scope:"meta",endsParent:!0}]}},a,{scope:"variable.language",match:/\$this\b/},o,H,k,{match:[/const/,/\s/,r],scope:{1:"keyword",3:"variable.constant"}},I,{scope:"function",relevance:0,beginKeywords:"fn function",end:/[;{]/,excludeEnd:!0,illegal:"[$%\\[]",contains:[{beginKeywords:"use"},e.UNDERSCORE_TITLE_MODE,{begin:"=>",endsParent:!0},{scope:"params",begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0,keywords:R,contains:["self",o,k,e.C_BLOCK_COMMENT_MODE,g,h]}]},{scope:"class",variants:[{beginKeywords:"enum",illegal:/[($"]/},{beginKeywords:"class interface trai
Line truncated
|
||||
https://github.com/highlightjs/highlight.js/issues/2277`),Z=M,V=D),Y===void 0&&(Y=!0);const oe={code:V,language:Z};Ee("before:highlight",oe);const Oe=oe.result?oe.result:_(oe.language,oe.code,Y);return Oe.code=oe.code,Ee("after:highlight",Oe),Oe}function _(M,D,Y,V){const Z=Object.create(null);function oe(G,K){return G.keywords[K]}function Oe(){if(!te.keywords){ve.addText(Se);return}let G=0;te.keywordPatternRe.lastIndex=0;let K=te.keywordPatternRe.exec(Se),ne="";for(;K;){ne+=Se.substring(G,K.index);const pe=_t.case_insensitive?K[0].toLowerCase():K[0],Pe=oe(te,pe);if(Pe){const[mt,zi]=Pe;if(ve.addText(ne),ne="",Z[pe]=(Z[pe]||0)+1,Z[pe]<=R4&&(hn+=zi),mt.startsWith("_"))ne+=K[0];else{const Wi=_t.classNameAliases[mt]||mt;Ce(K[0],Wi)}}else ne+=K[0];G=te.keywordPatternRe.lastIndex,K=te.keywordPatternRe.exec(Se)}ne+=Se.substring(G),ve.addText(ne)}function ze(){if(Se==="")return;let G=null;if(typeof te.subLanguage=="string"){if(!t[te.subLanguage]){ve.addText(Se);return}G=_(te.subLanguage,Se,!0,_r[te.subLanguage]),_r[te.subLanguage]=G._top}else G=g(Se,te.subLanguage.length?te.subLanguage:null);te.relevance>0&&(hn+=G.relevance),ve.__addSublanguage(G._emitter,G.language)}function be(){te.subLanguage!=null?ze():Oe(),Se=""}function Ce(G,K){G!==""&&(ve.startScope(K),ve.addText(G),ve.endScope())}function yt(G,K){let ne=1;const pe=K.length-1;for(;ne<=pe;){if(!G._emit[ne]){ne++;continue}const Pe=_t.classNameAliases[G[ne]]||G[ne],mt=K[ne];Pe?Ce(mt,Pe):(Se=mt,Oe(),Se=""),ne++}}function ge(G,K){return G.scope&&typeof G.scope=="string"&&ve.openNode(_t.classNameAliases[G.scope]||G.scope),G.beginScope&&(G.beginScope._wrap?(Ce(Se,_t.classNameAliases[G.beginScope._wrap]||G.beginScope._wrap),Se=""):G.beginScope._multi&&(yt(G.beginScope,K),Se="")),te=Object.create(G,{parent:{value:te}}),te}function we(G,K,ne){let pe=GQ(G.endRe,ne);if(pe){if(G["on:end"]){const Pe=new Lv(G);G["on:end"](K,Pe),Pe.isMatchIgnored&&(pe=!1)}if(pe){for(;G.endsParent&&G.parent;)G=G.parent;return G}}if(G.endsWithParent)return we(G.parent,K,ne)}function Mn(G){return te.matcher.regexIndex===0?(Se+=G[0],1):(Jr=!0,0)}function fn(G){const K=G[0],ne=G.rule,pe=new Lv(ne),Pe=[ne.__beforeBegin,ne["on:begin"]];for(const mt of Pe)if(mt&&(mt(G,pe),pe.isMatchIgnored))return Mn(K);return ne.skip?Se+=K:(ne.excludeBegin&&(Se+=K),be(),!ne.returnBegin&&!ne.excludeBegin&&(Se=K)),ge(ne,G),ne.returnBegin?0:K.length}function Ln(G){const K=G[0],ne=D.substring(G.index),pe=we(te,G,ne);if(!pe)return Gv;const Pe=te;te.endScope&&te.endScope._wrap?(be(),Ce(K,te.endScope._wrap)):te.endScope&&te.endScope._multi?(be(),yt(te.endScope,G)):Pe.skip?Se+=K:(Pe.returnEnd||Pe.excludeEnd||(Se+=K),be(),Pe.excludeEnd&&(Se=K));do te.scope&&ve.closeNode(),!te.skip&&!te.subLanguage&&(hn+=te.relevance),te=te.parent;while(te!==pe.parent);return pe.starts&&ge(pe.starts,G),Pe.returnEnd?0:K.length}function et(){const G=[];for(let K=te;K!==_t;K=K.parent)K.scope&&G.unshift(K.scope);G.forEach(K=>ve.openNode(K))}let Ze={};function gn(G,K){const ne=K&&K[0];if(Se+=G,ne==null)return be(),0;if(Ze.type==="begin"&&K.type==="end"&&Ze.index===K.index&&ne===""){if(Se+=D.slice(K.index,K.index+1),!i){const pe=new Error(`0 width match regex (${M})`);throw pe.languageName=M,pe.badRule=Ze.rule,pe}return 1}if(Ze=K,K.type==="begin")return fn(K);if(K.type==="illegal"&&!Y){const pe=new Error('Illegal lexeme "'+ne+'" for mode "'+(te.scope||"<unnamed>")+'"');throw pe.mode=te,pe}else if(K.type==="end"){const pe=Ln(K);if(pe!==Gv)return pe}if(K.type==="illegal"&&ne==="")return 1;if(Pn>1e5&&Pn>K.index*3)throw new Error("potential infinite loop, way more iterations than matches");return Se+=ne,ne.length}const _t=z(M);if(!_t)throw wa(o.replace("{}",M)),new Error('Unknown language: "'+M+'"');const kn=T4(_t);let Lr="",te=V||kn;const _r={},ve=new s.__emitter(s);et();let Se="",hn=0,Bt=0,Pn=0,Jr=!1;try{if(_t.__emitTokens)_t.__emitTokens(D,ve);else{for(te.matcher.considerAll();;){Pn++,Jr?Jr=!1:te.matcher.considerAll(),te.matcher.lastIndex=Bt;const G=te.matcher.exec(D);if(!G)break;const K=D.substring(Bt,G.index),ne=gn(K,G);Bt=G.index+ne}gn(D.substring(Bt))}return ve.finalize(),Lr=ve.toHTML(),{language:M,value:Lr,relevance:hn,illegal:!1,_emitter:ve,_top:te}}catch(G){if(G.message&&G.message.includes("Illegal"))return{language:M,value:ph(D),illegal:!0,relevance:0,_illegalBy:{message:G.message,index:Bt,context:D.slice(Bt-100,Bt+100),mode:G.mode,resultSoFar:Lr},_emitter:ve};if(i)return{language:M,value:ph(D),illegal:!1,relevance:0,errorRaised:G,_emitter:ve,_top:te};throw G}}function f(M){const D={value:ph(M),illegal:!1,relevance:0,_top:a,_emitter:new s.__emitter(s)};return D._emitter.addText(M),D}function g(M,D){D=D||s.languages||Object.keys(t);const Y=f(M),V=D.filter(z).filter(ae).map(be=>_(be,M,!1));V.unshift(Y);const Z=V.sort((be,Ce)=>{if(be.relevance!==Ce.relevance)return Ce.relevance-be.relevance;if(be.language&&Ce.language){if(z(be.language).supersetOf===Ce.language)return 1;if(z(Ce.language).supersetOf===be.language)return-1}return 0}),[oe,Oe]=Z,
Line truncated
|
||||
|
||||
`);return!r||!i?!1:!!e.chain().command(({tr:o})=>(o.delete(t.pos-2,t.pos),!0)).exitCode().run()}function F4(){if(this.options.codeMode)return!1;const{empty:e,$anchor:t}=this.editor.state.selection,n=t.pos===1;return!e||t.parent.type.name!==this.name?!1:n||!t.parent.textContent.length?!!this.editor.commands.clearNodes():!1}function B4({editor:e}){const t=e.state.selection.$from.parent.textContent.slice(0,e.state.selection.$from.parentOffset);return(t==null?void 0:t.split(`
|
||||
`))||[]}const FT=["arduino","bash","c","cpp","csharp","css","diff","go","graphql","ini","java","javascript","json","kotlin","less","lua","makefile","markdown","objectivec","perl","php","php-template","plaintext","python","python-repl","r","ruby","rust","scss","shell","sql","swift","typescript","vbnet","wasm","xml","yaml","ipsphtml","ipscss"],G4=dt.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:e}){return["li",We(this.options.HTMLAttributes,e),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),du=G4.extend({parseHTML(){return[{tag:"li",getAttrs:e=>{var t;if(((t=e.childNodes)==null?void 0:t.length)>1){const n=document.createElement("div");n.innerHTML=e.innerHTML,e.innerHTML="",e.appendChild(n)}return null}}]}});function Vt(e,t="",n=!0){const r=i=>{t&&(i.message=t+": "+i.message),window.Debug[n?"warn":"error"](i)};try{const i=e();return i instanceof Promise?new Promise(o=>{i.catch(r).finally(()=>o(!1))}):!0}catch(i){return r(i),!1}}const Qn=xT.extend({addCommands(){var e;return{...(e=this.parent)==null?void 0:e.call(this)}},addAttributes(){var e;return{language:{default:this.options.defaultLanguage||((e=this.options.allowedLanguages)==null?void 0:e[0])||"plaintext",parseHTML:t=>{var r,i;const n=(r=(()=>{if(t.hasAttribute("language"))return t.getAttribute("language");for(const o of t.classList)if(o.match(/^language-([a-z0-9\-_]+)$/i))return o.match(/^language-([a-z0-9\-_]+)$/i)[1];for(const o of t.querySelectorAll("code")){if(o.hasAttribute("language"))return o.getAttribute("language");for(const a of o.classList)if(a.match(/^language-([a-z0-9\-_]+)$/i))return a.match(/^language-([a-z0-9\-_]+)$/i)[1]}})())==null?void 0:r.toLowerCase();return this.options.codeMode&&(!n||!FT.includes(n)||n!==this.options.defaultLanguage&&this.options.allowedLanguages&&!this.options.allowedLanguages.includes(n))?this.options.defaultLanguage||((i=this.options.allowedLanguages)==null?void 0:i[0])||"plaintext":n}}}},addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),codeMode:!1,allowedLanguages:null}},renderHTML({HTMLAttributes:e}){var n;const t=this.options.codeMode?this.editor.options.lastLang||((n=this.editor.options.allowedLanguages)==null?void 0:n[0])||"plaintext":e.language;return["pre",{spellcheck:"false",class:`${this.options.codeMode?"":"ipsCode "}language-${t}`,"data-language":cl[t]||t},["code",{},0]]},onUpdate({editor:e}){this.options.codeMode&&e.options.lastLang&&e.options.lastLang!==e.getAttributes(this).language&&e.chain().setCodeBlock({language:e.options.lastLang}).run()},addKeyboardShortcuts(){const e=this.editor;return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{var o;if(!e.state.selection.empty||((o=e.state.selection.$from.parent)==null?void 0:o.type.name)!==this.name)return!1;if(F4.call(this))return!0;if(!this.options.codeMode&&(!e.state.selection.$from.parent.attrs.language||["plaintext","bash","shell","zsh","sh"].includes(e.state.selection.$from.parent.attrs.language)))return!1;const n=e.state.selection.$from.parent.textContent.slice(0,e.state.selection.$from.parentOffset),r=e.state.selection.$from.parent.textContent.slice(e.state.selection.$from.parentOffset);if(n&&r){for(const a in Ht)if(n.endsWith(a)&&r.startsWith(Ht[a]))return e.chain().deleteRange({from:e.state.selection.from-a.length,to:e.state.selection.from+Ht[a].length}).setTextSelection(e.state.selection.from-a.length).focus().run()}const i=n.match(/(\t)[^\n]*(\n\t+)$/);return i?e.chain().deleteRange({from:e.state.selection.from-i[2].length,to:e.state.selection.from}).setTextSelection(e.state.selection.from-i[2].length).focus().run():!1},Enter:({editor:t})=>{var y,R,O,I,x,k,$,z,H,ae,_e;if(U4.call(this,{editor:t}))return!0;const{$from:r}=t.state.selection,{parent:i}=r;if(!t.state.selection.empty||(i==null?void 0:i.type.name)!==this.name||!this.options.codeMode&&(!i.attrs.language||["plaintext","bash","shell","zsh","sh"].includes(i.attrs.language)))return!1;const o=B4({editor:t});if(!o.length)return!1;const a=o[o.length-1],s=o[o.length-2];let c=((R=(y=a.match(/^\t*/))==null?void 0:y[0])==null?void 0:R.length)||0,d=!1;const p=i.attrs.language,_=["ipsphtml","xml","html","xhtml","html5"].includes(p),f=["ipscss","css","scss","sass","less"].includes(p),g=["plaintext","rtf","markdown","md","bbcode"].includes(p),h=_?/(<[^>/]*>)$/:/([{[(.:]|->)$/,S=_?/(<\/[^/>]*>)$/:/^\s*([}\])]+[,;]?)$/;let b=!1;if(!_&&!f&&!g&&a.match(/^\s+(\.|->)?[a-z0-9_-]/i))if(a.match(/^\s+(\.|->)/))b=!0,c--;else{let ue=1;for(;ue<o.length&&((x=(I=(O=o[o.length-1-ue])==null?void 0:O.match(/^\t*/))==null?void 0:I[0])==null?void 0:x.length)<=c;)ue++;(k=o[o.length-ue])!=null&&k.match(/(\.|->)\s*$/)&&(b=!0,c--)}let T=!1
Line truncated
|
||||
`+" ".repeat(c);d?(ue-=a.length,Ee=a.replace(/^\t/,"")+Ee):T&&(me=`
|
||||
`+(c>1?" ".repeat(c-1):""),Ee+=me);let se=this.editor.chain().insertContentAt({from:ue,to:t.state.selection.from},{type:"text",text:Ee});return me&&(se=se.setTextSelection(t.state.selection.from+Ee.length-me.length)),se.focus().run()}return!1},ArrowDown:({editor:t})=>{if(!this.options.exitOnArrowDown||this.options.codeMode)return!1;const{state:n}=t,{selection:r,doc:i}=n,{$from:o,empty:a}=r;if(!a||o.parent.type!==this.type||!(o.parentOffset===o.parent.nodeSize-2))return!1;const c=o.after();return c===void 0||i.nodeAt(c)?!1:!!t.commands.exitCode()},ArrowUp:Y4.bind(this),Tab:ap.bind(this,!1,{editor:e}),"Shift-Tab":ap.bind(this,!0,{editor:e}),"Alt-Tab":ap.bind(this,!1,{editor:e},!0),"Shift-Alt-Tab":ap.bind(this,!0,{editor:e},!0)}},addProseMirrorPlugins(){var t;const e={};for(const n in Ht)e[Ht[n]]=n;return[...((t=this.parent)==null?void 0:t.call(this))||[],new pt({key:new at("ipsCodeModeSyntaxHelpers"),props:{handleKeyDown:(n,r)=>{var o;if(!(r instanceof KeyboardEvent)||r.metaKey||r.altKey)return;const i=this.editor;if(((o=r.key)==null?void 0:o.toLowerCase())in Ht)return r.key.toLowerCase()in e&&Yv({editor:i,opener:r.key.toLowerCase()})?!0:!!H4({editor:i,char:r.key.toLowerCase()});if(r.key.toLowerCase()in e)return!!Yv({editor:i,opener:e[r.key.toLowerCase()]})}}})]}});function Y4({editor:e}){if(e.options.codeMode)return!1;const{$from:t,empty:n}=e.state.selection;if(t.nodeBefore||!n||t.parent.type!==this.type)return!1;let r=0,i;for(const a of[...t.path].reverse()){if(!Number.isInteger(a)&&(r++,r===2))break;i=a}return!r||!Number.isInteger(i)||i!==0||!(t.parentOffset===0)?!1:(e.chain().insertContentAt(t.before(),"<p> </p>",{updateSelection:!0}).run(),!0)}function ap(e=!1,{editor:t=null},n=!1){var r,i,o,a;if((!t.state.selection.empty||e)&&t.isActive(this.name)&&(t.options.codeMode||[...t.state.selection.$from.path].reverse()[3]===[...t.state.selection.$to.path].reverse()[3]))return t.state.selection.empty&&e&&t.state.selection.$from.parentOffset===0||Vt(()=>{t.chain().command(({tr:s,chain:c})=>{var d,p,_,f;try{const{from:g,to:h}=t.state.selection,S=[...t.state.selection.$from.path].reverse()[3]+1;let b=g;if(b>[...t.state.selection.$from.path].reverse()[3]){for(;b>[...t.state.selection.$from.path].reverse()[3]&&!((d=s.doc.slice(b-1,b--).content.content[0])!=null&&d.textContent.startsWith(`
|
||||
`)););b++}const T=((p=s.doc.slice(b,h).content.content[0])==null?void 0:p.textContent)||"",y=g-b,R=T.split(`
|
||||
`),O=R.map(k=>e?k.replace(/^\t/,""):" "+k).join(`
|
||||
`);let I=!1;try{e&&R.length>1&&R[R.length-1].match(/^\t/)&&((f=(_=s.doc.slice(h,h+1))==null?void 0:_.content.content[0])==null?void 0:f.textContent)===" "&&(I=!0)}catch{}s.insertText(O,b,h);const x={from:b+y,to:b+O.length};e&&T.startsWith(" ")?x.from--:e||x.from++,I&&x.to++,S>x.from&&(x.from=S),c().setTextSelection(x).focus().run()}catch{}return!0}).run()},"Something went wrong when modifying indents in a codeblock selection"),!0;if(!n&&t.isActive(du.name))return!1;if(t.state.selection.empty){if(e){if(t.state.selection.$from.parentOffset>0){const s=t.state.doc.slice(t.state.selection.from-1,t.state.selection.from);if(((i=(r=s==null?void 0:s.content)==null?void 0:r.content[0])==null?void 0:i.textContent)===" "){const{from:c}=t.state.selection;return t.chain().command(({tr:d})=>(d.deleteRange(c-1,c),!0)).setTextSelection({from:c-1,to:c-1}).run(),!0}}if(t.state.selection.$from.parentOffset<t.state.selection.$from.parent.nodeSize-2){const s=t.state.doc.slice(t.state.selection.from,t.state.selection.from+1);if(((a=(o=s==null?void 0:s.content)==null?void 0:o.content[0])==null?void 0:a.textContent)===" "){const{from:c}=t.state.selection;return t.chain().command(({tr:d})=>(d.deleteRange(c,c+1),!0)).setTextSelection({from:c,to:c}).run(),!0}}}}else return!0;return t.chain().insertContent(" ").focus().run(),!0}function H4({editor:e,char:t}){var _,f,g;if(!(t in Ht))return!1;const{$from:n,$to:r}=e.state.selection,i=n.parent,o=r.parent;if(((_=i==null?void 0:i.type)==null?void 0:_.name)!==xT.name||i!==o)return!1;if(e.state.selection.empty)return e.chain().insertContent(`${t}${Ht[t]}`).setTextSelection(e.state.selection.from+t.length).focus().run();const a=i.textContent;let s=a.slice(n.parentOffset,r.parentOffset);if(!s)return!1;if(['"',"'","`"].includes(t)){const h=new RegExp(`(^|[^\\\\])\\${t}`,"g");s=s.replaceAll(h,`$1\\${t}`).replaceAll(/\n/g,"\\n")}let c="",d=0;if(s.match(/\n/)){const S=a.slice(0,n.parentOffset).split(`
|
||||
`).pop(),b=a.slice(r.parentOffset).split(`
|
||||
`).shift();let T=Math.max(0,((g=(f=S.match(/^\t*/))==null?void 0:f[0])==null?void 0:g.length)+1);S.match(/^\t*$/)&&b.match(/^\t+$/)&&(T+=b.match(/^\t+$/)[0].length),b.match(/^\s*$/)&&(s=s.replace(/^\s*?\n\s*(.?)/,"$1")),d=T+1;const y=" ".repeat(T),R=new RegExp(`\\n\\t{0,${T?T-1:0}}`,"g");if(s=s.replaceAll(R,`
|
||||
${y}`),s=`${t}
|
||||
${y}${s}
|
||||
${y?y.slice(0,y.length-1):""}${Ht[t]}`,r.parentOffset<a.length)try{const O=a.slice(r.parentOffset,r.parentOffset+1);O!=null&&O.match(/\n/)||(c=`
|
||||
`+(y?y.slice(0,y.length-1):""),s+=c)}catch{}}else s=`${t}${s}${Ht[t]}`;const p={from:e.state.selection.from+t.length+d,to:e.state.selection.from+s.length-Ht[t].length-c.length-(d?d-1:0)};return e.chain().insertContentAt({from:e.state.selection.from,to:e.state.selection.to},{type:"text",text:s}).setTextSelection(p).focus().run()}function Yv({editor:e,opener:t}){var o;if(!(t in Ht)||!e.state.selection.empty)return!1;const{$from:n}=e.state.selection,r=n.parent;if((r==null?void 0:r.type.name)!==xT.name)return!1;const i=(o=n.parent)==null?void 0:o.textContent;if(n.parentOffset<1||n.parentOffset>=i.length)return!1;try{const a=n.parentOffset;let s=i==null?void 0:i.slice(a,a+Ht[t].length);if(!s)return;if(s.startsWith(Ht[t]))return a>0&&['"',"'","`"].includes(t)&&(i==null?void 0:i[a-1])==="\\"?e.chain().insertContent({type:"text",text:Ht[t]}).focus().run():e.chain().setTextSelection(e.state.selection.from+Ht[t].length).focus().run()}catch{return!1}return!1}const Ht={"{":"}","[":"]","(":")","'":"'",'"':'"',"`":"`"},sc={};function hx(e,t,n=[]){var r;if(!((r=sc[e])!=null&&r.to)){let i=!1;if(e===t)i=[e];else if(e in No){const o=[e];if(t in No[e])o.push(t);else{let a;n=[...n,...o];for(const s in No[e])if(!(n.includes(s)||s===e)&&No[s]){const c=hx(s,t,n);Array.isArray(c)&&(!a||a.length>c.length)&&(a=c)}Array.isArray(a)&&o.splice(1,0,...a)}o.length&&o[o.length-1]===t&&(i=o)}e in sc||(sc[e]={}),sc[e][t]=i}return sc[e][t]}function $4(e,t,n){const r=hx(e,t);if(!Array.isArray(r))throw new RangeError(`Cannot convert ${e} to ${t} because there is not a known conversion pathway`);r.length===1&&e===_n.name&&n.chain().toggleHeading({level:n.level||1});for(let i=0;i<r.length-1;i++){const o=No[r[i]][r[i+1]](n);if(o!==void 0&&!o)throw new Error(`Could not convert ${r[i]} to ${r[i+1]}`)}return!0}function BT(e){const t=[...e.state.selection.$from.path].reverse()[2],n=t==null?void 0:t.type.name;return n===_n.name?[n,{level:t.attrs.level||1}]:[n||"",{}]}function Lp(e){var n;if(e[0]===_n.name)return`Heading ${((n=e[1])==null?void 0:n.level)||""}`;const t=e[0]in tS?e[0]:Nt.name;return tS[t]}function V4(e){if(e in Hv)return[Hv[e],{}];const t=Lp([_n.name,{}]);if(e.startsWith(t)){const n=parseInt(e.replace("Heading","").trim())||1;return[_n.name,{level:n}]}return[Nt.name,{}]}const tS={[$i.name]:"Ordered List",[Ho.name]:"Bullet List",[Qn.name]:"Code Block",[Nt.name]:"Paragraph"},Hv=Object.fromEntries([...Object.entries(tS)].map(e=>e.reverse()));function z4(e){for(let t of _n.options.levels)if(e.isActive(_n.name,{level:t}))return{level:t};return null}function Ex(e){const t=BT(e);return t[0]in No?W4(...t).filter(n=>{var r,i;return(n[0]!==_n.name||!((r=e.options.restrictions)!=null&&r.has("heading")))&&!(n[0]===_n.name&&n[1].level===1&&((i=e.options.restrictions)!=null&&i.has("heading_1")))}):[]}const lc={};function W4(e,t={}){const n=JSON.stringify({name:e,attributes:t});if(!(n in lc)){const r=Sx(e);lc[n]=[];for(const i of r)if(i===_n.name)for(let o=1;o<=6;o++)lc[n].push([_n.name,{level:o}]);else lc[n].push([i,{}])}return lc[n]}function Sx(e,t){if(t=t||new Set,t.add(e),e in No)for(const n in No[e])t.has(n)||Sx(n,t);return t}const No={[Nt.name]:{[Qn.name]:({chain:e})=>e().setCodeBlock(),[_n.name]:({chain:e,level:t=1})=>e().setHeading({level:t})},[Qn.name]:{[Nt.name]:({chain:e})=>e().toggleCodeBlock()},[_n.name]:{[Nt.name]:({chain:e,editor:t,level:n})=>{var r;return n=n||((r=z4(t))==null?void 0:r.level),n?e().toggleHeading({level:n}):!1}}};function q4({...e}){const{editor:t}=B.useContext(Ue),n=BT(t);return e.dropdownOptions=e.dropdownOptions||{},e.dropdownOptions.className=e.dropdownOptions.className||"",e.dropdownOptions.className=[...e.dropdownOptions.className.split(/\s+/),"ipsRichText"].join(" "),N.jsx(Wa,{current:N.jsx(N.Fragment,{children:N.jsx("i",{className:"fa-solid fa-paragraph"})}),currentValue:Lp(n),blank:N.jsx($v,{block:[Nt.title,{}]}),items:Ex(t).map(r=>[Lp(r),N.jsx($v,{block:r},Lp(r))]),onChange:r=>{const i=V4(r);t.chain().command(o=>$4(n[0],i[0],{...i[1]||{},...o})).focus().run()},...e,dropdownOptions:{...e.dropdownOptions,location:"se"}})}function $v({block:e,style:t=!0}){if(e[0]===_n.name){const n=`h${e[1].level}`;return t?N.jsxs(n,{children:["Heading ",e[1].level]}):N.jsxs(N.Fragment,{children:["Heading ",e[1].level]})}return e[0]===Qn.name?t?N.jsx("code",{children:"Code Block"}):N.jsx(N.Fragment,{children:"Code Block"}):N.jsx(N.Fragment,{children:"Paragraph"})}const pu=Ft.create({name:"subscript",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"sub"},{style:"vertical-align",getAttrs(e){return e!=="sub"?!1:null}}]},renderHTML({HTMLAttributes:e}){return["sub",We(this.options.HTMLAttributes,e),0]},addCommands(){return{setSubscript:()=>({commands:e})=>e.setMark(this.name),toggleSubscript:()=>({commands:e})=>e.toggleMark(this.name),unsetSubscript:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-,":()=>this.editor.commands.toggleSubscript()}}}),_u=Ft.create({name:"superscript",addOptionsLine truncated
|
||||
`,n5="️",r5="";let lp=null,cp=null;function i5(e){e===void 0&&(e=[]);const t={};$n.groups=t;const n=new $n;lp==null&&(lp=Kv(X4)),cp==null&&(cp=Kv(j4)),re(n,"'",$_),re(n,"{",wc),re(n,"}",xc),re(n,"[",A_),re(n,"]",I_),re(n,"(",D_),re(n,")",w_),re(n,"<",x_),re(n,">",M_),re(n,"(",L_),re(n,")",k_),re(n,"「",P_),re(n,"」",U_),re(n,"『",F_),re(n,"』",B_),re(n,"<",G_),re(n,">",Y_),re(n,"&",H_),re(n,"*",V_),re(n,"@",po),re(n,"`",W_),re(n,"^",q_),re(n,":",ho),re(n,",",HT),re(n,"$",K_),re(n,".",ai),re(n,"=",Q_),re(n,"!",$T),re(n,"-",si),re(n,"%",X_),re(n,"|",j_),re(n,"+",Z_),re(n,"#",J_),re(n,"?",em),re(n,'"',VT),re(n,"/",li),re(n,";",zT),re(n,"~",Mc),re(n,"_",tm),re(n,"\\",z_);const r=yr(n,fh,GT,{[nS]:!0});yr(r,fh,r);const i=yr(n,gs,Ii,{[rS]:!0});yr(i,gs,i);const o=yr(n,_h,aS,{[iS]:!0});yr(o,gs),yr(o,_h,o);const a=yr(n,Wv,bx,{[Vv]:!0});re(n,qv,YT,{[Vv]:!0}),re(a,qv),yr(a,Wv,a);const s=yr(n,mh,yx,{[Tx]:!0});yr(s,mh,s),re(s,n5,s);const c=re(s,r5);yr(c,mh,s);const d=[[gs,i]],p=[[gs,null],[_h,o]];for(let _=0;_<lp.length;_++)io(n,lp[_],sS,Ii,d);for(let _=0;_<cp.length;_++)io(n,cp[_],lS,aS,p);ba(sS,{tld:!0,ascii:!0},t),ba(lS,{utld:!0,alpha:!0},t),io(n,"file",Pp,Ii,d),io(n,"mailto",Pp,Ii,d),io(n,"http",ys,Ii,d),io(n,"https",ys,Ii,d),io(n,"ftp",ys,Ii,d),io(n,"ftps",ys,Ii,d),ba(Pp,{scheme:!0,ascii:!0},t),ba(ys,{slashscheme:!0,ascii:!0},t),e=e.sort((_,f)=>_[0]>f[0]?1:-1);for(let _=0;_<e.length;_++){const f=e[_][0],h=e[_][1]?{[Z4]:!0}:{[J4]:!0};f.indexOf("-")>=0?h[oS]=!0:gs.test(f)?fh.test(f)?h[kp]=!0:h[rS]=!0:h[nS]=!0,zv(n,f,f,h)}return zv(n,"localhost",mu,{ascii:!0}),n.jd=new $n(nm),{start:n,tokens:Ha({groups:t},Cx)}}function o5(e,t){const n=a5(t.replace(/[A-Z]/g,s=>s.toLowerCase())),r=n.length,i=[];let o=0,a=0;for(;a<r;){let s=e,c=null,d=0,p=null,_=-1,f=-1;for(;a<r&&(c=s.go(n[a]));)s=c,s.accepts()?(_=0,f=0,p=s):_>=0&&(_+=n[a].length,f++),d+=n[a].length,o+=n[a].length,a++;o-=_,a-=f,d-=_,i.push({t:p.t,v:t.slice(o-d,o),s:o-d,e:o})}return i}function a5(e){const t=[],n=e.length;let r=0;for(;r<n;){let i=e.charCodeAt(r),o,a=i<55296||i>56319||r+1===n||(o=e.charCodeAt(r+1))<56320||o>57343?e[r]:e.slice(r,r+2);t.push(a),r+=a.length}return t}function io(e,t,n,r,i){let o;const a=t.length;for(let s=0;s<a-1;s++){const c=t[s];e.j[c]?o=e.j[c]:(o=new $n(r),o.jr=i.slice(),e.j[c]=o),e=o}return o=new $n(n),o.jr=i.slice(),e.j[t[a-1]]=o,o}function Kv(e){const t=[],n=[];let r=0,i="0123456789";for(;r<e.length;){let o=0;for(;i.indexOf(e[r+o])>=0;)o++;if(o>0){t.push(n.join(""));for(let a=parseInt(e.substring(r,r+o),10);a>0;a--)n.pop();r+=o}else n.push(e[r]),r++}return t}const ul={defaultProtocol:"http",events:null,format:Qv,formatHref:Qv,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function Ym(e,t){t===void 0&&(t=null);let n=Ha({},ul);e&&(n=Ha(n,e instanceof Ym?e.o:e));const r=n.ignoreTags,i=[];for(let o=0;o<r.length;o++)i.push(r[o].toUpperCase());this.o=n,t&&(this.defaultRender=t),this.ignoreTags=i}Ym.prototype={o:ul,ignoreTags:[],defaultRender(e){return e},check(e){return this.get("validate",e.toString(),e)},get(e,t,n){const r=t!=null;let i=this.o[e];return i&&(typeof i=="object"?(i=n.t in i?i[n.t]:ul[e],typeof i=="function"&&r&&(i=i(t,n))):typeof i=="function"&&r&&(i=i(t,n.t,n)),i)},getObj(e,t,n){let r=this.o[e];return typeof r=="function"&&t!=null&&(r=r(t,n.t,n)),r},render(e){const t=e.render(this);return(this.get("render",null,e)||this.defaultRender)(t,e.t,e)}};function Qv(e){return e}var s5=Object.freeze({__proto__:null,defaults:ul,Options:Ym,assign:Ha});function Rx(e,t){this.t="token",this.v=e,this.tk=t}Rx.prototype={isLink:!1,toString(){return this.v},toHref(e){return this.toString()},toFormattedString(e){const t=this.toString(),n=e.get("truncate",t,this),r=e.get("format",t,this);return n&&r.length>n?r.substring(0,n)+"…":r},toFormattedHref(e){return e.get("formatHref",this.toHref(e.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(e){return e===void 0&&(e=ul.defaultProtocol),{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(e),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(e){return{type:this.t,value:this.toFormattedString(e),isLink:this.isLink,href:this.toFormattedHref(e),start:this.startIndex(),end:this.endIndex()}},validate(e){return e.get("validate",this.toString(),this)},render(e){const t=this,n=this.toHref(e.get("defaultProtocol")),r=e.get("formatHref",n,this),i=e.get("tagName",n,t),o=this.toFormattedString(e),a={},s=e.get("className",n,t),c=e.get("target",n,t),d=e.get("rel",n,t),p=e.getObj("attributes",n,t),_=e.getObj("events",n,t);return a.href=r,s&&(a.class=s),c&&(a.target=c),d&&(a.rel=d),p&&Ha(a,p),{tagName:i,attributes:a,content:o,eventListeners:_}}};function Hm(e,t){class n extends Rx{constructor(i,o){super(i,o),this.t=e}}for(const r in t)n.prototype[r]=t[r];return n.t=e,n}const Xv=Hm("email",{isLink:!0,toHref(){return"mailto:Line truncated
|
||||
1. Must only contain digits, lowercase ASCII letters or "-"
|
||||
2. Cannot start or end with "-"
|
||||
3. "-" cannot repeat`);Et.customSchemes.push([e,t])}function m5(){Et.scanner=i5(Et.customSchemes);for(let e=0;e<Et.tokenQueue.length;e++)Et.tokenQueue[e][1]({scanner:Et.scanner});Et.parser=c5(Et.scanner.tokens);for(let e=0;e<Et.pluginQueue.length;e++)Et.pluginQueue[e][1]({scanner:Et.scanner,parser:Et.parser});Et.initialized=!0}function Nx(e){return Et.initialized||m5(),u5(Et.parser.start,e,o5(Et.scanner.start,e))}function WT(e,t,n){if(t===void 0&&(t=null),n===void 0&&(n=null),t&&typeof t=="object"){if(n)throw Error(`linkifyjs: Invalid link type ${t}; must be a string`);n=t,t=null}const r=new Ym(n),i=Nx(e),o=[];for(let a=0;a<i.length;a++){const s=i[a];s.isLink&&(!t||s.t===t)&&r.check(s)&&o.push(s.toFormattedObject(r))}return o}function f5(e){return e.length===1?e[0].isLink:e.length===3&&e[1].isLink?["()","[]"].includes(e[0].value+e[2].value):!1}function g5(e){return new pt({key:new at("autolink"),appendTransaction:(t,n,r)=>{const i=t.some(d=>d.docChanged)&&!n.doc.eq(r.doc),o=t.some(d=>d.getMeta("preventAutolink"));if(!i||o)return;const{tr:a}=r,s=k$(n.doc,[...t]);if($$(s).forEach(({newRange:d})=>{const p=U$(r.doc,d,g=>g.isTextblock);let _,f;if(p.length>1?(_=p[0],f=r.doc.textBetween(_.pos,_.pos+_.node.nodeSize,void 0," ")):p.length&&r.doc.textBetween(d.from,d.to," "," ").endsWith(" ")&&(_=p[0],f=r.doc.textBetween(_.pos,d.to,void 0," ")),_&&f){const g=f.split(" ").filter(T=>T!=="");if(g.length<=0)return!1;const h=g[g.length-1],S=_.pos+f.lastIndexOf(h);if(!h)return!1;const b=Nx(h).map(T=>T.toObject(e.defaultProtocol));if(!f5(b))return!1;b.filter(T=>T.isLink).map(T=>({...T,from:S+T.start+1,to:S+T.end+1})).filter(T=>r.schema.marks.code?!r.doc.rangeHasMark(T.from,T.to,r.schema.marks.code):!0).filter(T=>e.validate(T.value)).forEach(T=>{OT(T.from,T.to,r.doc).some(y=>y.mark.type===e.type)||a.addMark(T.from,T.to,e.type.create({href:T.href}))})}}),!!a.steps.length)return a}})}function h5(e){return new pt({key:new at("handleClickLink"),props:{handleClick:(t,n,r)=>{var i,o;if(r.button!==0)return!1;let a=r.target;const s=[];for(;a.nodeName!=="DIV";)s.push(a),a=a.parentNode;if(!s.find(f=>f.nodeName==="A"))return!1;const c=vT(t.state,e.type.name),d=r.target,p=(i=d==null?void 0:d.href)!==null&&i!==void 0?i:c.href,_=(o=d==null?void 0:d.target)!==null&&o!==void 0?o:c.target;return d&&p?(window.open(p,_),!0):!1}}})}function E5(e){return new pt({key:new at("handlePasteLink"),props:{handlePaste:(t,n,r)=>{const{state:i}=t,{selection:o}=i,{empty:a}=o;if(a)return!1;let s="";r.content.forEach(d=>{s+=d.textContent});const c=WT(s,{defaultProtocol:e.defaultProtocol}).find(d=>d.isLink&&d.value===s);return!s||!c?!1:(e.editor.commands.setMark(e.type,{href:c.href}),!0)}}})}const S5=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g,T5=/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i;function Jv(e){return!e||e.replace(S5,"").match(T5)}const cc=Ft.create({name:"link",priority:1e3,keepOnSplit:!1,exitable:!0,onCreate(){this.options.protocols.forEach(e=>{if(typeof e=="string"){Zv(e);return}Zv(e.scheme,e.optionalSlashes)})},onDestroy(){_5()},inclusive(){return this.options.autolink},addOptions(){return{openOnClick:!0,linkOnPaste:!0,autolink:!0,protocols:[],defaultProtocol:"http",HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},validate:e=>!!e}},addAttributes(){return{href:{default:null},target:{default:this.options.HTMLAttributes.target},rel:{default:this.options.HTMLAttributes.rel},class:{default:this.options.HTMLAttributes.class}}},parseHTML(){return[{tag:"a[href]",getAttrs:e=>{const t=e.getAttribute("href");return!t||!Jv(t)?!1:{href:t}}}]},renderHTML({HTMLAttributes:e}){return Jv(e.href)?["a",We(this.options.HTMLAttributes,e),0]:["a",We(this.options.HTMLAttributes,{...e,href:""}),0]},addCommands(){return{setLink:e=>({chain:t})=>t().setMark(this.name,e).setMeta("preventAutolink",!0).run(),toggleLink:e=>({chain:t})=>t().toggleMark(this.name,e,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run(),unsetLink:()=>({chain:e})=>e().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[Yo({find:e=>{const t=[];if(e){const{validate:n}=this.options,r=WT(e).filter(i=>i.isLink&&n(i.value));r.length&&r.forEach(i=>t.push({text:i.value,data:{href:i.href},index:i.start}))}return t},type:this.type,getAttributes:e=>{var t;return{href:(t=e.data)===null||t===void 0?void 0:t.href}}})]},addProseMirrorPlugins(){const e=[];return this.options.autolink&&e.push(g5({type:this.type,defaultProtocol:this.options.defaultProtocol,validate:this.options.validate})),this.options.openOnClick&&e.push(h5({type:this.type})),this.options.linkOnPaste&&e.push(E5({editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type})),e}}),Xr=dt.create({name:"text",group:"inline"}),nt=cc.extend({addAttributes(){var e;return{...(e=this.parent)==null?void 0:e.call(this),tempid:{default:null}}},addKeyboardShortcuts(){var t;const e=n=>({
Line truncated
|
||||
`},addCommands(){return{setHardBreak:()=>({commands:e,chain:t,state:n,editor:r})=>e.first([()=>e.exitCode(),()=>e.command(()=>{const{selection:i,storedMarks:o}=n;if(i.$from.parent.type.spec.isolating)return!1;const{keepMarks:a}=this.options,{splittableMarks:s}=r.extensionManager,c=o||i.$to.parentOffset&&i.$from.marks();return t().insertContent({type:this.name}).command(({tr:d,dispatch:p})=>{if(p&&c&&a){const _=c.filter(f=>s.includes(f.type.name));d.ensureMarks(_)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),Up=dt.create({name:"doc",topNode:!0,content:"block+"}),qx=vt.create({name:"ipsAutosave",addCommands(){return{clearAutosave:()=>({editor:e,chain:t})=>(e.options.autoSaveKey&&(window.ips.utils.db.remove("editorSave",e.options.autoSaveKey),t().hideMessage("autosave").run()),!0)}},onUpdate(){this.storage.updateCallback()},onCreate(){var e,t;if(this.storage.updateCallback=cr.debounce(()=>{var n;(n=this.editor)!=null&&n.options.autoSaveKey&&(this.editor.getHTML().trim()&&this.editor.getHTML()!=="<p></p>"?window.ips.utils.db.set("editorSave",this.editor.options.autoSaveKey,{content:this.editor.getHTML(),time:Math.round(Date.now()/1e3)}):this.editor.commands.clearAutosave(),this.editor.commands.hideMessage("autosave"))},500),(e=this.editor)!=null&&e.options.autoSaveKey){const n=window.ips.utils.db.get("editorSave",this.editor.options.autoSaveKey);if((t=n==null?void 0:n.content)!=null&&t.trim()&&(!n.time||Date.now()/1e3-86400*3<parseInt(n.time))){const r=new DOMParser().parseFromString(n.content,"text/html");if(!(r.body.innerText.trim().length||r.body.querySelector("iframe,img,video,audio,a,embed,.ipsEmoji,.ipsEmbeddedVideo,.ipsEmbeddedBrightcove,.ipsEmbeddedOther,.ipsEmbeddedPhoto")))return;this.storage.initial=this.editor.getHTML(),this.editor.chain().setContent(n.content).command(({tr:i,chain:o})=>(!i.docChanged||Kx(i.doc)?o().undo().hideMessage("autosave").run():o().showMessage("autosave").focus().run(),!0)).run()}}},addStorage(){return{initial:"",updateCallback:()=>{}}}});function Kx(e){var t,n,r;return e.textContent==="<p></p>"?!0:!((t=e.textContent)!=null&&t.trim().length||![Up.name,Nt.name,Xr.name,hu.name].includes(e.type.name)||(r=(n=e.content)==null?void 0:n.content)!=null&&r.length&&!e.content.content.some(i=>!Kx(i)))}function U6(){const{editor:e}=B.useContext(Ue);return N.jsxs(N.Fragment,{children:["The content was restored from an automatically saved draft. Click to ",N.jsx("button",{className:"ipsEditor__autosave-clear",onClick:()=>e.chain().clearAutosave().setContent(e.storage[qx.name].initial||"").focus().run(),children:"clear draft."})]})}function F6({positions:e="",href:t}){const{editor:n}=B.useContext(Ue),r=()=>{if(!e.length){n.commands.hideMessage("autoembed");return}let i=n.chain();for(const o of e)i=i.command(({tr:a,chain:s})=>s().insertContentAt({from:Math.max(0,a.mapping.map(o[0])),to:Math.min(a.doc.nodeSize-2,a.mapping.map(o[1]))},`<a href="${encodeURI(t)}" >${o[2]}</a>`));i.hideMessage("autoembed").focus().run()};return N.jsxs(N.Fragment,{children:["A URL was inserted as embedded content. Click to ",N.jsx("button",{className:"ipsEditor__autosave-clear",onClick:r,children:"insert as link"})," instead."]})}function mO({name:e}){const{editor:t}=B.useContext(Ue);return N.jsxs("div",{className:`ipsEditor__global-message ipsEditor__global-message--${e}`,children:[N.jsxs("div",{className:"ipsEditor__global-message-content",children:[N.jsx("i",{className:"fa-solid fa-circle-info"})," ",N.jsx(B6,{name:e})]}),N.jsx("button",{className:"ipsEditor__global-message-close",onClick:()=>t==null?void 0:t.commands.hideMessage(e),children:N.jsx("i",{className:"fa-solid fa-times-circle"})})]})}function B6({name:e}){const{messages:t}=B.useContext(_S),n=t.get(e);switch(e){case"autosave":return N.jsx(U6,{});case"autoembed":return N.jsx(F6,{...n});default:return typeof n=="string"&&n?N.jsx("span",{"data-ipseditorcustommessage":"true",dangerouslySetInnerHTML:{__html:n}}):N.jsx(N.Fragment,{children:"This is a global message!"})}}const _S=B.createContext({messages:new Map,addMessage(e,t=""){this.messages.set(e,t)},removeMessage(e){this.messages.has(e)&&this.messages.delete(e)}});function G6({children:e}){var c;const[t,n]=B.useState(()=>new Map),[r,i]=B.useState(!1),{editor:o}=B.useContext(Ue),a=B.useMemo(()=>({messages:t,addMessage:(d,p="")=>{if(!t.has(d)||t.get(d)!==p){t.set(d,p);const _=new Map;for(const[f,g]of t.entries())_.set(f,g);n(_)}},removeMessage:d=>{if(t.has(d)){t.delete(d);const p=new Map;for(const[_,f]of t.entries())p.set(_,f);n(p)}},onVisibilityChange(d=!1){d!==r&&i(d)},visible:r}),[t,n,r,i]);if(B.useEffect(()=>{!o.options.codeMode&&!o.options.simpleRichText&&o.can().registerMessageInterface(a)&&(o==null||o.commands.registerMessageInterface(a))},[a,o]),o.options.codeMode||o.options.simpleRichText)return N.jsx(N.Fragment,{children:e});const s=[...t.keys()];return o.options.messagesCLine truncated
|
||||
`+t.message,window.Debug.error(t),hp=null}).finally(()=>{for(const t of CO)t(hp),CO.delete(t);e(hp)})})}const v9=vt.create({name:"ipsMessages",addCommands(){let e={_messages:new Map,addMessage(n,r=""){this._messages.set(n,r)},removeMessage(n){this._messages.delete(n)},get messages(){return this._messages},onVisibilityChange(n){t=n}},t=!1;return{showMessage:(n,r="")=>()=>{e==null||e.addMessage(n,r)},hideMessage:n=>()=>{e==null||e.removeMessage(n)},registerMessageInterface:n=>()=>{var i,o,a;if(Object.is(n,e))return!1;let r=!1;for(const s in n)if(!Object.is(n[s],e[s])){r=!0;break}if(!r)return!1;if(e.messages instanceof Map)for(const s of e.messages.keys())(o=(i=n==null?void 0:n.messages)==null?void 0:i.has)!=null&&o.call(i,s)&&n.messages.get(s)===e.messages.get(s)||n.addMessage(s,e.messages.get(s));(!("visible"in n)||n.visible!==t)&&((a=n.onVisibilityChange)==null||a.call(n,t)),e=n},fireVisibilityChange:n=>()=>{var r;t=!!n,(r=e==null?void 0:e.onVisibilityChange)==null||r.call(e,t)}}}}),O9=({key:e,editor:t,onPaste:n,onDrop:r,allowedMimeTypes:i})=>new pt({key:e||new at("fileHandler"),props:{handleDrop(o,a){var s;if(!r||!(!((s=a.dataTransfer)===null||s===void 0)&&s.files.length))return!1;const c=o.posAtCoords({left:a.clientX,top:a.clientY});let d=Array.from(a.dataTransfer.files);return i&&(d=d.filter(p=>i.includes(p.type))),d.length!==0&&(a.preventDefault(),a.stopPropagation(),r(t,d,(c==null?void 0:c.pos)||0),!0)},handlePaste(o,a){var s;if(!n||!(!((s=a.clipboardData)===null||s===void 0)&&s.files.length))return!1;let c=Array.from(a.clipboardData.files);const d=a.clipboardData.getData("text/html");return i&&(c=c.filter(p=>i.includes(p.type))),c.length!==0&&(a.preventDefault(),a.stopPropagation(),n(t,c,d),!(d.length>0))}}}),A9=vt.create({name:"fileHandler",addOptions:()=>({onPaste:void 0,onDrop:void 0,allowedMimeTypes:void 0}),addProseMirrorPlugins(){return[O9({key:new at(this.name),editor:this.editor,allowedMimeTypes:this.options.allowedMimeTypes,onDrop:this.options.onDrop,onPaste:this.options.onPaste})]}});function I9({mimeTypes:e,handler:t}){let n;Array.isArray(e)&&(n=new Set(e.map(i=>i.toLowerCase())));const r=i=>{const o=i instanceof DragEvent?i.dataTransfer:i.clipboardData;if(o.files.length){const a=[];for(const s of o.files)(!n||n.has(s.type.toLowerCase()))&&a.push(s);if(a.length)return t(a),!0}};return new pt({key:new at("ipsDataTransferFixer"),props:{handlePaste:(i,o)=>r(o),handleDrop:(i,o)=>r(o)}})}const D9=A9.extend({addCommands(){var e;return{...(e=this.parent)==null?void 0:e.call(this),injectAttachments:t=>({editor:n,chain:r})=>{var o;let i=r();for(const a of t){const s=Math.round(Math.random()*Math.pow(10,8));let c=!1;i=i.insertContent({type:ot.name,attrs:{attachmentType:"file",attachmentSrc:"",attachmentLink:"",fileId:s,attachmentTitle:"Uploading Attachment..."}}),(o=w9(n.options.postkey))==null||o.dispatchEvent(new x9({file:a,data:{ready:d=>{if(c)return;c=!0;const p=KT(n.$doc,s);p.length&&n.commands.command(({tr:_,chain:f})=>{let g=f();for(const{to:h,from:S}of p)g=g.insertContentAt({from:_.mapping.map(S),to:_.mapping.map(h)},d,{parseOptions:{preserveWhitespace:!1}});return!0})},error:d=>{c||(c=!0,d instanceof Error&&(d.message=`File upload failed:
|
||||
${d.message}`,window.Debug.warn(d),n.commands.showMessage("file-attach","Couldn't insert one or more files pasted or dropped in the editor.")),n.commands.removeAttachment(s))}}}))}return i.run(),!0}}},addProseMirrorPlugins(){var e;return[I9({mimeTypes:this.options.allowedMimeTypes,handler:t=>this.options.onPaste(this.editor,t)}),...((e=this.parent)==null?void 0:e.call(this))||[]]}}).configure({onPaste(e,t){return e.commands.injectAttachments(t),!0},onDrop(e,t){return e.commands.injectAttachments(t),!0}});function w9(e){return!e||typeof e!="string"?null:document.querySelector(`[data-ipsuploader-postkey="${e}"]`)}class x9 extends Event{constructor(t){super("injectFile"),this.data=t}}const M9=["name","group","isInline","isBlock","isText","selectable","exitable","atom","addOptions","addKeyboardShortcuts","addAttributes","addGlobalAttributes","renderHTML","parseHTML","onCreate","onUpdate","onBeforeCreate","onFocus","onBlur","onBeforeCreate","onSelectionUpdate","onDestroy","onTransaction","priority","defaultOptions","addInputRules","marks","addNodeView","whitespace","defining","isolating","renderText"];function L9(e,t){var s,c,d;if(!e.ipsPlugins){e.ipsPlugins={buttons:{},extensions:[],nodes:[],marks:[]};return}e.ipsPlugins.buttons={},Array.isArray((s=e.ipsPlugins)==null?void 0:s.extensions)?a(e.ipsPlugins.extensions,vt):e.ipsPlugins.extensions=[],Array.isArray((c=e.ipsPlugins)==null?void 0:c.nodes)?a(e.ipsPlugins.nodes,dt):e.ipsPlugins.nodes=[],Array.isArray((d=e.ipsPlugins)==null?void 0:d.marks)?a(e.ipsPlugins.marks,Ft):e.ipsPlugins.marks=[],e.ipsPlugins.nestedToolbars={},e.pluginButtonKeys=new Set;const n=new Set(e.tools.toolbar);for(const p in e.ipsPlugins.buttons)for(const{before:_,after:f}of e.ipsPlugins.buttons[p].locations){let g,h=!1;if(typeof f=="string"&&f in dO){const S=dO[f];e.ipsPlugins.nestedToolbars[S]=e.ipsPlugins.nestedToolbars[S]||[...pl[S]],e.ipsPlugins.nestedToolbars[S].push(`custom:${p}`),h=!0}else if(typeof f=="string"&&n.has(f))g=e.tools.toolbar.indexOf(f)+1;else if(typeof _=="string"&&n.has(_))g=e.tools.toolbar.indexOf(_);else if(!_&&!f||_===null||f===null)g=e.tools.toolbar.length;else continue;e.pluginButtonKeys.add(`custom:${p}`),h||(n.add(`custom:${p}`),e.tools.toolbar.splice(g,0,`custom:${p}`))}function r(p){for(const _ of p.attributes)["class","style","id","src","title","rel","alt"].includes(_.name.toLowerCase())||p.removeAttribute(_.name);for(const _ of p.querySelectorAll(":scope > *"))r(_)}function i(p,_){var f;if(p.addButtons instanceof Function){const g=p.addButtons.bind(_)();if(typeof g!="object")throw new TypeError;const h=new DOMParser;for(const S in g){let{html:b,command:T,locations:y,element:R,isActive:O,isAvailable:I}=g[S];if(typeof b!="string"&&!(R instanceof HTMLElement)||!(T instanceof Function)||!Array.isArray(y))throw new TypeError;O!==void 0&&typeof O!="boolean"&&!(O instanceof Function)&&(window.Debug.warn(`Expected isActive to be a boolean or a Function, got a ${typeof O}. Casting to boolean.`),O=!!O),I!==void 0&&typeof I!="boolean"&&!(I instanceof Function)&&(window.Debug.warn(`Expected isAvailable to be a boolean or a Function, got a ${typeof I}. Casting to boolean.`),I=!!I);const x=[];for(const H of y)if(H===null)x.push({after:null,before:void 0});else if(typeof H=="object"){if(![void 0,null].includes(H.before)&&typeof H.before!="string"||![void 0,null].includes(H.after)&&typeof H.after!="string")throw new TypeError;x.push({after:H.after,before:H.before})}else typeof H=="string"?x.push({after:H,before:void 0}):x.push({after:void 0,before:void 0});y=x;const k=["script","link","style","pre","code","iframe","object","embed","noscript","video"];if(R instanceof Element)R.querySelectorAll(k.join(",")).forEach(H=>H.remove());else{const H=h.parseFromString(b,"text/html");if(!(H instanceof Document))throw new RangeError("The html passed in for the button is not readable");if(H.querySelectorAll(k.join(",")).forEach(ae=>ae.remove()),!(((f=H==null?void 0:H.body)==null?void 0:f.firstElementChild)instanceof HTMLElement)||!H.body.firstElementChild.innerHTML.length)throw new RangeError("The html passed in for the button is not readable");R=H.body.firstElementChild}if(r(R),k.includes(R.tagName.toLowerCase()))throw new RangeError(`The element of type ${R.tagName} cannot be used as a toolbar button`);const $=R.cloneNode(!0),z=`${p.name}_${S}`;e.ipsPlugins.buttons[z]={get element(){return $},set element(H){throw new Error("Cannot update the element of an ipsPlugin button!")},get command(){return T.bind(_)},set command(H){throw new Error("Cannot update the command of an ipsPlugin button!")},get isActive(){return O instanceof Function?O.bind(_):O},set isActive(H){throw new Error("Cannot update the isActive property of an ipsPlugin button!")},get isAvailable(){return I instanceof Function?I.bind(_):I},set isAvailable(H){throw new Error("Cannot update the isAvailable property of an ipsPlugin button!")},get locations(){return y},set locations(H){throw new Error("Cannot update properties
Line truncated
|
||||
${g.message}`,window.Debug.warn(g)}}}const Dh=vt.create({name:"ipsHomeEnd",addKeyboardShortcuts(){return{Home:({editor:e})=>(Vt(()=>{var i,o,a;const{$from:t}=e.state.selection,n=t.pos-t.parentOffset;let r=t.pos;for(;r>n;){const s=e.state.doc.slice(r-1,r);if(((i=s.content.content[0])==null?void 0:i.textContent)===`
|
||||
`||((a=(o=s.content.content[0])==null?void 0:o.type)==null?void 0:a.name)===hu.name)break;r--}e.chain().setTextSelection(r).focus().run()},"Something went wrong handling the 'Home' key press"),!0),End:({editor:e})=>(Vt(()=>{var i,o,a;const{$to:t}=e.state.selection,n=[...t.path].reverse()[3]+t.parent.nodeSize-1;let r=t.pos;for(;r<n;){const s=e.state.doc.slice(r,r+1);if(((i=s.content.content[0])==null?void 0:i.textContent)===`
|
||||
`||((a=(o=s.content.content[0])==null?void 0:o.type)==null?void 0:a.name)===hu.name)break;r++}e.chain().setTextSelection(r).focus().run()},"Something went wrong handling the 'End' key press"),!0)}}}),k9=vt.create({name:"IPSSimpleRichText",addProseMirrorPlugins(){return[new pt({key:new at("ipsSimpleRichTextPlugin"),filterTransaction:e=>!(this.editor.options.lengthFunction instanceof Function&&typeof this.editor.options.maxLength=="number"&&this.editor.options.lengthFunction(NT(e.doc.content,this.editor.schema))>this.editor.options.maxLength),appendTransaction:(e,t,n)=>{const r=[];let i;const{from:o,to:a}=n.selection;n.doc.descendants((c,d)=>{var p,_;if(typeof c.textContent=="string"&&!c.textContent&&!c.isInline){const f=n.doc.resolve(d),g=P9(f,n.doc),h=U9(f,n.doc);if([o,a].some(S=>g.pos<S&&h.pos>S)){if(i===void 0&&e.some(S=>{var b;return(b=S.steps)==null?void 0:b.length})){let S=1,b=c;for(;(_=(p=b.content)==null?void 0:p.content)!=null&&_.length;)S++,b=b.content.content[0];i=S+d}return!1}return r.push([d,d+c.nodeSize]),!1}if(c.isInline||!c.content.content.length)return!1});const{tr:s}=n;for(const[c,d]of r.reverse())s.delete(c,d);if(i!==void 0){const c=Ie.atStart(n.doc).from,d=Ie.atEnd(n.doc).to,p=Ie.create(n.doc,yo(i,c,d));o===p.from&&o===a||s.setSelection(p)}return s}})]},addKeyboardShortcuts(){return{Enter:({editor:e})=>{const t=e.view.dom.closest("form");if(t){let n=t.querySelector('button:is([type="submit"], :not([type]))');n||(n=document.createElement("button"),n.setAttribute("type","button"),n.setAttribute("hidden",""),t.appendChild(n),setTimeout(()=>n.documentElement===document.documentElement&&n.remove(),200)),n.click()}return!0},"Shift-Enter":({editor:e})=>(e.isActive(du.name)?e.commands.splitListItem(du.name):e.commands.splitBlock(),!1)}},onCreate(){this.editor.view.dom.addEventListener("clear",e=>{var t;this.editor.commands.setContent(((t=e.detail)==null?void 0:t.content)||"")})}});function P9(e,t){var r,i;const n=[...e.path].reverse();for(;n.length>=3;){if(n[1]>0){let o=n[2].content.content[n[1]-1],a=0;for(;o;)o=(i=(r=o.content)==null?void 0:r.content)!=null&&i.length?o.content.content[o.content.content.length-1]:null,a++;return t.resolve(e.pos-a)}n.splice(0,3)}return t.resolve(0)}function U9(e,t){var r,i;const n=[...e.path].reverse();for(;n.length>=3;){if(n[1]<n[2].content.content.length-1){let o=n[2].content.content[n[1]+1],a=0;for(;o;)a++,o=(i=(r=o.content)==null?void 0:r.content)==null?void 0:i[0];return t.resolve(e.pos+n[2].content.content[n[1]].nodeSize+a)}n.splice(0,3)}return t.resolve(t.nodeSize-2)}const F9=e=>Ot({find:/--$/,replace:e??"—"}),B9=e=>Ot({find:/\.\.\.$/,replace:e??"…"}),G9=e=>Ot({find:/(?:^|[\s{[(<'"\u2018\u201C])(")$/,replace:e??"“"}),Y9=e=>Ot({find:/"$/,replace:e??"”"}),H9=e=>Ot({find:/(?:^|[\s{[(<'"\u2018\u201C])(')$/,replace:e??"‘"}),$9=e=>Ot({find:/'$/,replace:e??"’"}),V9=e=>Ot({find:/<-$/,replace:e??"←"}),z9=e=>Ot({find:/->$/,replace:e??"→"}),W9=e=>Ot({find:/\(c\)$/,replace:e??"©"}),q9=e=>Ot({find:/\(tm\)$/,replace:e??"™"}),K9=e=>Ot({find:/\(sm\)$/,replace:e??"℠"}),Q9=e=>Ot({find:/\(r\)$/,replace:e??"®"}),X9=e=>Ot({find:/(?:^|\s)(1\/2)\s$/,replace:e??"½"}),j9=e=>Ot({find:/\+\/-$/,replace:e??"±"}),Z9=e=>Ot({find:/!=$/,replace:e??"≠"}),J9=e=>Ot({find:/<<$/,replace:e??"«"}),eX=e=>Ot({find:/>>$/,replace:e??"»"}),tX=e=>Ot({find:/\d+\s?([*x])\s?\d+$/,replace:e??"×"}),nX=e=>Ot({find:/\^2$/,replace:e??"²"}),rX=e=>Ot({find:/\^3$/,replace:e??"³"}),iX=e=>Ot({find:/(?:^|\s)(1\/4)\s$/,replace:e??"¼"}),oX=e=>Ot({find:/(?:^|\s)(3\/4)\s$/,replace:e??"¾"}),aX=vt.create({name:"typography",addOptions(){return{closeDoubleQuote:"”",closeSingleQuote:"’",copyright:"©",ellipsis:"…",emDash:"—",laquo:"«",leftArrow:"←",multiplication:"×",notEqual:"≠",oneHalf:"½",oneQuarter:"¼",openDoubleQuote:"“",openSingleQuote:"‘",plusMinus:"±",raquo:"»",registeredTrademark:"®",rightArrow:"→",servicemark:"℠",superscriptThree:"³",superscriptTwo:"²",threeQuarters:"¾",trademark:"™"}},addInputRules(){const e=[];return this.options.emDash!==!1&&e.push(F9(this.options.emDash)),this.options.ellipsis!==!1&&e.push(B9(this.options.ellipsis)),this.options.openDoubleQuote!==!1&&e.push(G9(this.options.openDoubleQuote)),this.options.closeDoubleQuote!==!1&&e.push(Y9(this.options.closeDoubleQuote)),this.options.openSingleQuote!==!1&&e.push(H9(this.options.openSingleQuote)),this.options.closeSingleQuote!==!1&&e.push($9(this.options.closeSingleQuote)),this.options.leftArrow!==!1&&e.push(V9(this.options.leftArrow)),this.options.rightArrow!==!1&&e.push(z9(this.options.rightArrow)),this.options.copyright!==!1&&e.push(W9(this.options.copyright)),this.options.trademark!==!1&&e.push(q9(this.options.trademark)),this.options.servicemark!==!1&&e.push(K9(this.options.servicemark)),this.options.registeredTrademark!==!1&&e.push(Q9(this.options.registeredTrademark)),this.options.oneHalf!==!1&&e.push(X9(this.options.oneHalf)),this.options.plusMinus!==!1&&e.push(j9(this.options
Line truncated
|
||||
`}}),Wx,sX].filter(T=>!!T);return window.navigator.platform==="MacIntel"&&t.push(Dh),e.autoSaveKey&&t.push(qx),e.postkey&&(t.push(D9),t.push(ot.configure({externalImages:!((f=e.restrictions)!=null&&f.has("external_image")),externalVideos:!((g=e.restrictions)!=null&&g.has("external_video")),float:!((h=e.restrictions)!=null&&h.has("float"))}))),(S=e.restrictions)!=null&&S.has("heading")||t.push(_n.configure({levels:(b=e.restrictions)!=null&&b.has("heading_1")?[2,3,4,5,6]:[1,2,3,4,5,6]})),t}async function RO(e,t){var n,r;if(e.pluginButtonKeys=new Set,e.simpleRichText?(delete e.codeMode,e.tools={toolbar:[...zx]},e.react&&KV(e.react)):await P4(),e.restrictions&&Symbol.iterator in e.restrictions?e.restrictions=new Set(e.restrictions):delete e.restrictions,e.jQuery=e.jQuery||window.jQuery,e.editorProps={attributes:{class:e.codeMode?"":"ipsRichText"}},e.itemStates={},e.extensions=lX(e),!(e.messagesContainer instanceof Element)&&((n=t==null?void 0:t.closest(".ipsEditor"))!=null&&n.querySelector('[data-role="editor-messages-container"]'))&&(e.messagesContainer=(r=t==null?void 0:t.closest(".ipsEditor"))==null?void 0:r.querySelector('[data-role="editor-messages-container"]')),e.codeMode)return e.tools={toolbar:["codelanguage"]},e;if(e.simpleRichText||L9(e,e.extensions),e.stockrepliesenabled){const i=await ZT();Object.keys(i).length?window.Debug.log("Loaded stock replies"):(e.stockrepliesenabled=!1,window.Debug.log("No stock replies, disabling the button"))}if(!e.codeMode){for(const i in e.tools)e.tools[i]=e.tools[i].filter(o=>o==="giphy"&&!e.giphyenabled||o==="stockreply"&&!e.stockrepliesenabled?!1:!(e.hidebuttons instanceof Array&&e.hidebuttons.includes(o)));e.parseOptions=e.parseOptions||{},e.parseOptions.preserveWhitespace=!1}return e.tools.toolbar&&e.tools.toolbar[0]!=="block"&&(e.tools.toolbar=["block",...e.tools.toolbar.filter(i=>i!=="block")]),e}let NO=!1;function cX(){if(!NO){for(const e of["click","focus","keydown","keyup"])document.addEventListener(e,t=>{var n,r,i;(r=(n=t.target)==null?void 0:n.closest)!=null&&r.call(n,".ipsEditor__toolbar-item--unavailable")&&(t.preventDefault(),t.stopPropagation(),(i=t.stopImmediatePropagation)==null||i.call(t))},{capture:!0});NO=!0}}setTimeout(()=>window.ips.createModule("ips.utils.tiptap",()=>{const e={tools:{toolbar:["block","insert","bold","italic","underline","size","color","link","icon","stockreply","giphy","clear","format"]},allowedIframeDomains:window.ips.getSetting("allowedIframeDomains")||[],restrictions:new Set};return document.dispatchEvent(new CustomEvent("ipsTiptapLoaded")),{editorInstance(t,n={}){const r=wh.createRoot(t);return cX(),new Promise(i=>{RO({...e,...n},t).then(o=>{r.render(N.jsx(ct.StrictMode,{children:N.jsx(Y6,{resolve:a=>{i([a,r]),a.options.name&&setTimeout(()=>a.options.jQuery(a.view.dom.closest("[data-ipseditorv5]")).trigger("editorWidgetInitialized",{id:a.options.name}))},config:o})}))})})},allCodeLanguages:cl,async decorateSimpleRichTextConfig(t){return t.simpleRichText=!0,await RO(t)}}}));
|
||||
@@ -45,7 +45,7 @@
|
||||
"isDynamicEntry": true
|
||||
},
|
||||
"src/main.jsx": {
|
||||
"file": "assets/main-CoHJ0uDc.js",
|
||||
"file": "assets/main-JrAf8-U8.js",
|
||||
"name": "main",
|
||||
"src": "src/main.jsx",
|
||||
"isEntry": true,
|
||||
|
||||
@@ -781,9 +781,15 @@ class languages extends Controller
|
||||
$lang->save();
|
||||
|
||||
$count = 0;
|
||||
$where = [
|
||||
[ 'lang_id=?', $lang->id ],
|
||||
[ '(word_export=? or word_is_custom=?)', 1, 1 ],
|
||||
[ 'word_custom is not null' ]
|
||||
];
|
||||
|
||||
try
|
||||
{
|
||||
$count = Db::i()->select( 'COUNT(word_id)', 'core_sys_lang_words', array( 'lang_id=? AND word_export=1 AND word_custom IS NOT NULL', $lang->id ), 'word_id', NULL, 'word_id' )->first();
|
||||
$count = Db::i()->select( 'COUNT(word_id)', 'core_sys_lang_words', $where, 'word_id', NULL, 'word_id' )->first();
|
||||
}
|
||||
catch ( UnderflowException $e ) {}
|
||||
|
||||
@@ -842,7 +848,9 @@ class languages extends Controller
|
||||
$xml->endAttribute();
|
||||
|
||||
/* Add words */
|
||||
foreach ( Db::i()->select( '*', 'core_sys_lang_words', array( 'lang_id=? AND word_app=? AND word_export=1 AND word_custom IS NOT NULL', $lang->id, $app->directory ), 'word_id' ) as $row )
|
||||
$appWhere = $where;
|
||||
$appWhere[] = [ 'word_app=?', $app->directory ];
|
||||
foreach ( Db::i()->select( '*', 'core_sys_lang_words', $appWhere, 'word_id' ) as $row )
|
||||
{
|
||||
/* Start */
|
||||
$xml->startElement( 'word' );
|
||||
|
||||
@@ -4782,7 +4782,7 @@ class members extends Controller
|
||||
];
|
||||
|
||||
$table->joins[] = [
|
||||
'select' => 'core_badges.id as badge_id, image',
|
||||
'select' => 'core_badges.id as badge_id, image, badge_use_image',
|
||||
'from' => 'core_badges',
|
||||
'where' => 'core_badges.id=core_member_badges.badge',
|
||||
'type' => 'INNER'
|
||||
@@ -4803,7 +4803,7 @@ class members extends Controller
|
||||
{
|
||||
/* Wade likes simple table field names like 'id', I like unique ones like 'log_id' for this reason :D */
|
||||
$badge = Badge::constructFromData( array_merge( $row, [ 'id' => $row['badge_id'] ] ) );
|
||||
return $badge->html('ipsDimension:5 i-margin-end_icon') . ' ' . $badge->_title;
|
||||
return $badge->html('ipsDimension i-margin-end_icon i-basis_40') . ' ' . $badge->_title;
|
||||
},
|
||||
'datetime' => function( $val ) {
|
||||
return DateTime::ts( $val );
|
||||
|
||||
@@ -109,11 +109,18 @@ class widgets extends Controller
|
||||
|
||||
foreach( $application->getAvailableWidgets() as $block )
|
||||
{
|
||||
/* @var Widget $block */
|
||||
if ( !$block->isExecutableByApp( array( $this->pageApp, Area::AREA_SIDEBAR ) ) )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
/* Is this widget hidden from the block list? */
|
||||
if( !$block::$showInBlockList )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if ( in_array( $block->key, $favoriteIds ) )
|
||||
{
|
||||
$favorites[$block->key] = $block;
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"id": 5000031,
|
||||
"name": "5.0.0 Beta 5",
|
||||
"steps": {
|
||||
"queries": true,
|
||||
"lang": true,
|
||||
"theme": true,
|
||||
"themeeditor": true,
|
||||
"javascript": true,
|
||||
"emailTemplates": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": true,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"files": {
|
||||
"added": [],
|
||||
"edited": [
|
||||
"global\/framework\/common\/ui\/ips.ui.filterBar.js",
|
||||
"global\/framework\/common\/ui\/ips.ui.tabbar.js",
|
||||
"global\/framework\/common\/utils\/ips.utils.lazyload.js",
|
||||
"core\/front\/controllers\/clubs\/ips.clubs.navbar.js",
|
||||
"global\/admin\/controllers\/core\/ips.core.dynamicChart.js",
|
||||
"global\/front\/controllers\/core\/ips.core.comment.js",
|
||||
"global\/front\/controllers\/core\/ips.core.commentFeed.js",
|
||||
"global\/front\/controllers\/core\/ips.core.lightboxedImages.js",
|
||||
"core\/global\/controllers\/core\/ips.core.2fa.js",
|
||||
"core\/admin\/controllers\/members\/ips.members.moderatorPermissions.js",
|
||||
"core\/front\/controllers\/search\/ips.search.filters.js",
|
||||
"core\/front\/controllers\/widgets\/ips.widgets.sidebar.js",
|
||||
"core\/admin\/templates\/ips.templates.members.js"
|
||||
],
|
||||
"removed": []
|
||||
},
|
||||
"orders": {
|
||||
"added": [],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"normal": {
|
||||
"added": [
|
||||
"author_stats"
|
||||
],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
},
|
||||
"js": {
|
||||
"added": [
|
||||
"editor_font_type_generic"
|
||||
],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"1": {
|
||||
"method": "changeColumn",
|
||||
"params": [
|
||||
"core_api_webhook_fires",
|
||||
"event",
|
||||
{
|
||||
"name": "event",
|
||||
"type": "VARCHAR",
|
||||
"length": 255,
|
||||
"decimals": null,
|
||||
"values": null,
|
||||
"allow_null": false,
|
||||
"default": null,
|
||||
"comment": "The event being fired",
|
||||
"unsigned": false,
|
||||
"auto_increment": false
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
{
|
||||
"html": {
|
||||
"added": [],
|
||||
"edited": [
|
||||
"admin\/api\/webhooks",
|
||||
"front\/clubs\/header",
|
||||
"admin\/customization\/templateEditor",
|
||||
"admin\/customization\/templateEditorHtmlPane",
|
||||
"global\/forms\/node",
|
||||
"front\/forms\/popupRegisterTemplate",
|
||||
"front\/forms\/popupTemplate",
|
||||
"front\/forms\/profileCompleteTemplate",
|
||||
"admin\/forms\/template",
|
||||
"front\/forms\/template",
|
||||
"global\/global\/advertisementImage",
|
||||
"front\/global\/comment",
|
||||
"global\/global\/dynamicChart",
|
||||
"front\/global\/reactionTabs",
|
||||
"front\/global\/sidebar",
|
||||
"admin\/global\/tabs",
|
||||
"front\/global\/tabs",
|
||||
"front\/global\/widgetArea",
|
||||
"front\/global\/widgetContainer",
|
||||
"global\/login\/mfaSetup",
|
||||
"admin\/memberprofile\/basicInformation",
|
||||
"admin\/memberprofile\/devicesAndIPAddresses",
|
||||
"admin\/memberprofile\/groups",
|
||||
"admin\/memberprofile\/header",
|
||||
"admin\/memberprofile\/history",
|
||||
"admin\/memberprofile\/historyRows",
|
||||
"admin\/memberprofile\/historyTable",
|
||||
"admin\/memberprofile\/mainTemplate",
|
||||
"admin\/memberprofile\/notificationTypes",
|
||||
"admin\/memberprofile\/tabbedBlock",
|
||||
"admin\/memberprofile\/warnings",
|
||||
"admin\/memberprofile\/warningView",
|
||||
"admin\/members\/acpRestrictions",
|
||||
"admin\/members\/bulkMailPreview",
|
||||
"admin\/members\/moderatorPermissions",
|
||||
"front\/messaging\/conversation",
|
||||
"front\/messaging\/template",
|
||||
"front\/modcp\/members",
|
||||
"front\/modcp\/report",
|
||||
"front\/modcp\/unapprovedContent",
|
||||
"front\/popular\/tabs",
|
||||
"front\/profile\/profileTabs",
|
||||
"front\/search\/filters",
|
||||
"front\/tags\/overview",
|
||||
"front\/tags\/view",
|
||||
"front\/widgets\/advertisements",
|
||||
"front\/widgets\/formTemplate",
|
||||
"front\/widgets\/mostSolved",
|
||||
"front\/widgets\/stats",
|
||||
"front\/widgets\/tagRows",
|
||||
"front\/widgets\/tags",
|
||||
"front\/widgets\/topContributors"
|
||||
],
|
||||
"removed": []
|
||||
},
|
||||
"css": {
|
||||
"added": [],
|
||||
"edited": [
|
||||
"front\/core.css",
|
||||
"admin\/customization\/templates.css",
|
||||
"global\/framework\/3-data-tables.css",
|
||||
"global\/framework\/3-editor.css",
|
||||
"global\/framework\/3-engagement.css",
|
||||
"global\/framework\/3-lists.css",
|
||||
"global\/framework\/3-menus.css",
|
||||
"global\/framework\/3-richtext.css",
|
||||
"global\/framework\/3-tabs.css",
|
||||
"global\/framework\/4-layout.css",
|
||||
"global\/framework\/4-navigation-panel.css",
|
||||
"admin\/members\/view.css",
|
||||
"front\/styles\/messaging.css",
|
||||
"front\/styles\/profiles.css"
|
||||
],
|
||||
"removed": []
|
||||
},
|
||||
"resources": {
|
||||
"added": [],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
}
|
||||
}
|
||||
Loaded 100 of 218 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user