diff --git a/src/controllers/CkeditorController.php b/src/controllers/CkeditorController.php index a07f04d..1038484 100644 --- a/src/controllers/CkeditorController.php +++ b/src/controllers/CkeditorController.php @@ -106,17 +106,17 @@ public function actionEntryCardHtml(): Response */ public function actionDuplicateNestedEntry(): Response { - $entryId = $this->request->getRequiredBodyParam('entryId'); - $siteId = $this->request->getBodyParam('siteId'); + $entryId = $this->request->getRequiredBodyParam('entryId'); // id of the entry we're going to duplicate + $sourceSiteId = $this->request->getBodyParam('sourceSiteId'); + $targetSiteId = $this->request->getBodyParam('targetSiteId'); $targetEntryTypeIds = $this->request->getBodyParam('targetEntryTypeIds'); $targetOwnerId = $this->request->getBodyParam('targetOwnerId'); $targetLayoutElementUid = $this->request->getBodyParam('targetLayoutElementUid'); $targetFieldId = null; - $entry = Craft::$app->getEntries()->getEntryById($entryId, null, [ + $entry = Craft::$app->getEntries()->getEntryById($entryId, $sourceSiteId, [ 'status' => null, 'revisions' => null, - 'preferSites' => [$siteId], ]); if (!$entry) { @@ -137,7 +137,7 @@ public function actionDuplicateNestedEntry(): Response // get ID of the field we're duplicating (e.g. pasting) into if ($targetLayoutElementUid !== null) { if ($targetOwnerId !== null && $entry->primaryOwnerId !== $targetOwnerId) { - $owner = Craft::$app->getElements()->getElementById($targetOwnerId); + $owner = Craft::$app->getElements()->getElementById($targetOwnerId, null, $targetSiteId); } else { $owner = $entry->getOwner(); } @@ -149,8 +149,8 @@ public function actionDuplicateNestedEntry(): Response } $newAttrs = []; - if ($siteId !== null && $entry->siteId !== $siteId) { - $newAttrs['siteId'] = $siteId; + if ($targetSiteId !== null && $entry->siteId !== $targetSiteId) { + $newAttrs['siteId'] = $targetSiteId; } if ($targetOwnerId !== null && $entry->primaryOwnerId !== $targetOwnerId) { $newAttrs['primaryOwnerId'] = $targetOwnerId; @@ -169,6 +169,7 @@ public function actionDuplicateNestedEntry(): Response return $this->asJson([ 'newEntryId' => $newEntry->id, + 'newSiteId' => $newEntry->siteId, ]); } diff --git a/src/web/assets/ckeditor/dist/ckeditor5-craftcms.js b/src/web/assets/ckeditor/dist/ckeditor5-craftcms.js index cb7841e..940fd4e 100644 --- a/src/web/assets/ckeditor/dist/ckeditor5-craftcms.js +++ b/src/web/assets/ckeditor/dist/ckeditor5-craftcms.js @@ -1,3 +1,3 @@ /*! For license information please see ckeditor5-craftcms.js.LICENSE.txt */ -!function(){var e={474:function(e){window,e.exports=function(e){var t={};function n(o){if(t[o])return t[o].exports;var i=t[o]={i:o,l:!1,exports:{}};return e[o].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(o,i,function(t){return e[t]}.bind(null,i));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=94)}([function(e,t,n){"use strict";e.exports=n(21)},function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return r})),n.d(t,"c",(function(){return s}));var o=n(19);function i(e,t=!0){if(void 0===e)return"undefined";if("function"==typeof e)return"function() {…}";const n=Object(o.stringify)(e,a,null,{maxDepth:2});return t?n:n.replace(/(^"|"$)/g,"")}function r(e){const t={};for(const n in e)t[n]=e[n],t[n].value=i(t[n].value);return t}function s(e,t){return e.length>t?e.substr(0,t)+`… [${e.length-t} characters left]`:e}function a(e,t,n){return"string"==typeof e?`"${e.replace("'",'"')}"`:n(e)}},function(e,t,n){"use strict";function o(e){return e&&e.name}function i(e){return e&&o(e)&&e.is("attributeElement")}function r(e){return e&&o(e)&&e.is("emptyElement")}function s(e){return e&&o(e)&&e.is("uiElement")}function a(e){return e&&o(e)&&e.is("rawElement")}function l(e){return e&&o(e)&&e.is("editableElement")}function c(e){return e&&e.is("rootElement")}function u(e){return{path:[...e.parent.getPath(),e.offset],offset:e.offset,isAtEnd:e.isAtEnd,isAtStart:e.isAtStart,parent:d(e.parent)}}function d(e){return o(e)?i(e)?"attribute:"+e.name:c(e)?"root:"+e.name:"container:"+e.name:e.data}n.d(t,"d",(function(){return o})),n.d(t,"b",(function(){return i})),n.d(t,"e",(function(){return r})),n.d(t,"h",(function(){return s})),n.d(t,"f",(function(){return a})),n.d(t,"c",(function(){return l})),n.d(t,"g",(function(){return c})),n.d(t,"a",(function(){return u}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));class o{static group(...e){console.group(...e)}static groupEnd(...e){console.groupEnd(...e)}static log(...e){console.log(...e)}static warn(...e){console.warn(...e)}}},function(e,t,n){"use strict";function o(e){return e&&e.is("element")}function i(e){return e&&e.is("rootElement")}function r(e){return e.getPath?e.getPath():e.path}function s(e){return{path:r(e),stickiness:e.stickiness,index:e.index,isAtEnd:e.isAtEnd,isAtStart:e.isAtStart,offset:e.offset,textNode:e.textNode&&e.textNode.data}}n.d(t,"c",(function(){return o})),n.d(t,"d",(function(){return i})),n.d(t,"b",(function(){return r})),n.d(t,"a",(function(){return s}))},function(e,t,n){(function(e,n){var o="[object Arguments]",i="[object Map]",r="[object Object]",s="[object Set]",a=/^\[object .+?Constructor\]$/,l=/^(?:0|[1-9]\d*)$/,c={};c["[object Float32Array]"]=c["[object Float64Array]"]=c["[object Int8Array]"]=c["[object Int16Array]"]=c["[object Int32Array]"]=c["[object Uint8Array]"]=c["[object Uint8ClampedArray]"]=c["[object Uint16Array]"]=c["[object Uint32Array]"]=!0,c[o]=c["[object Array]"]=c["[object ArrayBuffer]"]=c["[object Boolean]"]=c["[object DataView]"]=c["[object Date]"]=c["[object Error]"]=c["[object Function]"]=c[i]=c["[object Number]"]=c[r]=c["[object RegExp]"]=c[s]=c["[object String]"]=c["[object WeakMap]"]=!1;var u="object"==typeof e&&e&&e.Object===Object&&e,d="object"==typeof self&&self&&self.Object===Object&&self,p=u||d||Function("return this")(),h=t&&!t.nodeType&&t,m=h&&"object"==typeof n&&n&&!n.nodeType&&n,f=m&&m.exports===h,g=f&&u.process,b=function(){try{return g&&g.binding&&g.binding("util")}catch(e){}}(),k=b&&b.isTypedArray;function w(e,t){for(var n=-1,o=null==e?0:e.length;++na))return!1;var c=r.get(e);if(c&&r.get(t))return c==t;var u=-1,d=!0,p=2&n?new re:void 0;for(r.set(e,t),r.set(t,e);++u-1},oe.prototype.set=function(e,t){var n=this.__data__,o=ae(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this},ie.prototype.clear=function(){this.size=0,this.__data__={hash:new ne,map:new(W||oe),string:new ne}},ie.prototype.delete=function(e){var t=he(this,e).delete(e);return this.size-=t?1:0,t},ie.prototype.get=function(e){return he(this,e).get(e)},ie.prototype.has=function(e){return he(this,e).has(e)},ie.prototype.set=function(e,t){var n=he(this,e),o=n.size;return n.set(e,t),this.size+=n.size==o?0:1,this},re.prototype.add=re.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},re.prototype.has=function(e){return this.__data__.has(e)},se.prototype.clear=function(){this.__data__=new oe,this.size=0},se.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},se.prototype.get=function(e){return this.__data__.get(e)},se.prototype.has=function(e){return this.__data__.has(e)},se.prototype.set=function(e,t){var n=this.__data__;if(n instanceof oe){var o=n.__data__;if(!W||o.length<199)return o.push([e,t]),this.size=++n.size,this;n=this.__data__=new ie(o)}return n.set(e,t),this.size=n.size,this};var fe=V?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,o=null==e?0:e.length,i=0,r=[];++n-1&&e%1==0&&e-1&&e%1==0&&e<=9007199254740991}function xe(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Ee(e){return null!=e&&"object"==typeof e}var Se=k?function(e){return function(t){return e(t)}}(k):function(e){return Ee(e)&&_e(e.length)&&!!c[le(e)]};function Te(e){return null!=(t=e)&&_e(t.length)&&!Ce(t)?function(e,t){var n=ve(e),o=!n&&ye(e),i=!n&&!o&&Ae(e),r=!n&&!o&&!i&&Se(e),s=n||o||i||r,a=s?function(e,t){for(var n=-1,o=Array(e);++nFind out why. -->`,l=`<!--The View raw element content has been skipped. Find out why. -->`;function c(e){return e?[...e.editing.view.document.roots]:[]}function u(e,t){if(!e)return[];const n=[],i=e.editing.view.document.selection;for(const e of i.getRanges())e.root.rootName===t&&n.push({type:"selection",start:Object(o.a)(e.start),end:Object(o.a)(e.end)});return n}function d({currentEditor:e,currentRootName:t,ranges:n}){return e&&t?[h(e.editing.view.document.getRoot(t),[...n])]:null}function p(e){const t={editorNode:e,properties:{},attributes:{},customProperties:{}};if(Object(o.d)(e)){Object(o.g)(e)?(t.type="RootEditableElement",t.name=e.rootName,t.url=s+"_rooteditableelement-RootEditableElement.html"):(t.name=e.name,Object(o.b)(e)?(t.type="AttributeElement",t.url=s+"_attributeelement-AttributeElement.html"):Object(o.e)(e)?(t.type="EmptyElement",t.url=s+"_emptyelement-EmptyElement.html"):Object(o.h)(e)?(t.type="UIElement",t.url=s+"_uielement-UIElement.html"):Object(o.f)(e)?(t.type="RawElement",t.url=s+"_rawelement-RawElement.html"):Object(o.c)(e)?(t.type="EditableElement",t.url=s+"_editableelement-EditableElement.html"):(t.type="ContainerElement",t.url=s+"_containerelement-ContainerElement.html")),g(e).forEach((([e,n])=>{t.attributes[e]={value:n}})),t.properties={index:{value:e.index},isEmpty:{value:e.isEmpty},childCount:{value:e.childCount}};for(let[n,o]of e.getCustomProperties())"symbol"==typeof n&&(n=n.toString()),t.customProperties[n]={value:o}}else t.name=e.data,t.type="Text",t.url=s+"_text-Text.html",t.properties={index:{value:e.index}};return t.properties=Object(r.b)(t.properties),t.customProperties=Object(r.b)(t.customProperties),t.attributes=Object(r.b)(t.attributes),t}function h(e,t){const n={};return Object.assign(n,{index:e.index,path:e.getPath(),node:e,positionsBefore:[],positionsAfter:[]}),Object(o.d)(e)?function(e,t){const n=e.node;Object.assign(e,{type:"element",children:[],positions:[]}),e.name=n.name,Object(o.b)(n)?e.elementType="attribute":Object(o.g)(n)?e.elementType="root":Object(o.e)(n)?e.elementType="empty":Object(o.h)(n)?e.elementType="ui":Object(o.f)(n)?e.elementType="raw":e.elementType="container",Object(o.e)(n)?e.presentation={isEmpty:!0}:Object(o.h)(n)?e.children.push({type:"comment",text:a}):Object(o.f)(n)&&e.children.push({type:"comment",text:l});for(const o of n.getChildren())e.children.push(h(o,t));(function(e,t){for(const n of t){const t=m(e,n);for(const n of t){const t=n.offset;if(0===t){const t=e.children[0];t?t.positionsBefore.push(n):e.positions.push(n)}else if(t===e.children.length){const t=e.children[e.children.length-1];t?t.positionsAfter.push(n):e.positions.push(n)}else{let o=n.isEnd?0:e.children.length-1,i=e.children[o];for(;i;){if(i.index===t){i.positionsBefore.push(n);break}if(i.index+1===t){i.positionsAfter.push(n);break}o+=n.isEnd?1:-1,i=e.children[o]}}}}})(e,t),e.attributes=function(e){const t=g(e).map((([e,t])=>[e,Object(r.a)(t,!1)]));return new Map(t)}(n)}(n,t):function(e,t){Object.assign(e,{type:"text",startOffset:0,text:e.node.data,positions:[]});for(const n of t){const t=m(e,n);e.positions.push(...t)}}(n,t),n}function m(e,t){const n=e.path,o=t.start.path,i=t.end.path,r=[];return f(n,o)&&r.push({offset:o[o.length-1],isEnd:!1,presentation:t.presentation||null,type:t.type,name:t.name||null}),f(n,i)&&r.push({offset:i[i.length-1],isEnd:!0,presentation:t.presentation||null,type:t.type,name:t.name||null}),r}function f(e,t){return e.length===t.length-1&&"prefix"===Object(i.a)(e,t)}function g(e){return[...e.getAttributes()].sort((([e],[t])=>e.toUpperCase()"$graveyard"!==e)).concat(t.filter((({rootName:e})=>"$graveyard"===e)))}function c(e,t){if(!e)return[];const n=[],i=e.model;for(const e of i.document.selection.getRanges())e.root.rootName===t&&n.push({type:"selection",start:Object(o.a)(e.start),end:Object(o.a)(e.end)});return n}function u(e,t){if(!e)return[];const n=[],i=e.model;let r=0;for(const e of i.markers){const{name:i,affectsData:s,managedUsingOperations:l}=e,c=e.getStart(),u=e.getEnd();c.root.rootName===t&&n.push({type:"marker",marker:e,name:i,affectsData:s,managedUsingOperations:l,presentation:{color:a[r++%(a.length-1)]},start:Object(o.a)(c),end:Object(o.a)(u)})}return n}function d({currentEditor:e,currentRootName:t,ranges:n,markers:o}){return e?[h(e.model.document.getRoot(t),[...n,...o])]:[]}function p(e,t){const n={editorNode:t,properties:{},attributes:{}};Object(o.c)(t)?(Object(o.d)(t)?(n.type="RootElement",n.name=t.rootName,n.url=s+"rootelement-RootElement.html"):(n.type="Element",n.name=t.name,n.url=s+"element-Element.html"),n.properties={childCount:{value:t.childCount},startOffset:{value:t.startOffset},endOffset:{value:t.endOffset},maxOffset:{value:t.maxOffset}}):(n.name=t.data,n.type="Text",n.url=s+"text-Text.html",n.properties={startOffset:{value:t.startOffset},endOffset:{value:t.endOffset},offsetSize:{value:t.offsetSize}}),n.properties.path={value:Object(o.b)(t)},f(t).forEach((([e,t])=>{n.attributes[e]={value:t}})),n.properties=Object(r.b)(n.properties),n.attributes=Object(r.b)(n.attributes);for(const t in n.attributes){const o={},i=e.model.schema.getAttributeProperties(t);for(const e in i)o[e]={value:i[e]};n.attributes[t].subProperties=Object(r.b)(o)}return n}function h(e,t){const n={},{startOffset:i,endOffset:r}=e;return Object.assign(n,{startOffset:i,endOffset:r,node:e,path:e.getPath(),positionsBefore:[],positionsAfter:[]}),Object(o.c)(e)?function(e,t){const n=e.node;Object.assign(e,{type:"element",name:n.name,children:[],maxOffset:n.maxOffset,positions:[]});for(const o of n.getChildren())e.children.push(h(o,t));(function(e,t){for(const n of t){const t=g(e,n);for(const n of t){const t=n.offset;if(0===t){const t=e.children[0];t?t.positionsBefore.push(n):e.positions.push(n)}else if(t===e.maxOffset){const t=e.children[e.children.length-1];t?t.positionsAfter.push(n):e.positions.push(n)}else{let o=n.isEnd?0:e.children.length-1,i=e.children[o];for(;i;){if(i.startOffset===t){i.positionsBefore.push(n);break}if(i.endOffset===t){const t=e.children[o+1],r="text"===i.type&&t&&"element"===t.type,s="element"===i.type&&t&&"text"===t.type,a="text"===i.type&&t&&"text"===t.type;n.isEnd&&(r||s||a)?t.positionsBefore.push(n):i.positionsAfter.push(n);break}if(i.startOffsett){i.positions.push(n);break}o+=n.isEnd?1:-1,i=e.children[o]}}}}})(e,t),e.attributes=m(n)}(n,t):function(e){const t=e.node;Object.assign(e,{type:"text",text:t.data,positions:[],presentation:{dontRenderAttributeValue:!0}}),e.attributes=m(t)}(n),n}function m(e){const t=f(e).map((([e,t])=>[e,Object(r.a)(t,!1)]));return new Map(t)}function f(e){return[...e.getAttributes()].sort((([e],[t])=>em(e,t,this.props.globalTreeProps)))}get definition(){return this.props.definition}get globalTreeProps(){return this.props.globalTreeProps||{}}get isActive(){return this.definition.node===this.globalTreeProps.activeNode}shouldComponentUpdate(e){return!s()(this.props,e)}}var l=n(1);class c extends o.PureComponent{render(){let e;const t=Object(l.c)(this.props.value,500);return this.props.dontRenderValue||(e=i.a.createElement("span",{className:"ck-inspector-tree-node__attribute__value"},t)),i.a.createElement("span",{className:"ck-inspector-tree-node__attribute"},i.a.createElement("span",{className:"ck-inspector-tree-node__attribute__name",title:t},this.props.name),e)}}class u extends o.Component{render(){const e=this.props.definition,t={className:["ck-inspector-tree__position","selection"===e.type?"ck-inspector-tree__position_selection":"","marker"===e.type?"ck-inspector-tree__position_marker":"",e.isEnd?"ck-inspector-tree__position_end":""].join(" "),style:{}};return e.presentation&&e.presentation.color&&(t.style["--ck-inspector-color-tree-position"]=e.presentation.color),"marker"===e.type&&(t["data-marker-name"]=e.name),i.a.createElement("span",t,"​")}shouldComponentUpdate(e){return!s()(this.props,e)}}class d extends a{render(){const e=this.definition,t=e.presentation,n=t&&t.isEmpty,o=t&&t.cssClass,r=this.getChildren(),s=["ck-inspector-code","ck-inspector-tree-node",this.isActive?"ck-inspector-tree-node_active":"",n?"ck-inspector-tree-node_empty":"",o],a=[],l=[];e.positionsBefore&&e.positionsBefore.forEach(((e,t)=>{a.push(i.a.createElement(u,{key:"position-before:"+t,definition:e}))})),e.positionsAfter&&e.positionsAfter.forEach(((e,t)=>{l.push(i.a.createElement(u,{key:"position-after:"+t,definition:e}))})),e.positions&&e.positions.forEach(((e,t)=>{r.push(i.a.createElement(u,{key:"position"+t,definition:e}))}));let c=e.name;return this.globalTreeProps.showElementTypes&&(c=e.elementType+":"+c),i.a.createElement("div",{className:s.join(" "),onClick:this.handleClick},a,i.a.createElement("span",{className:"ck-inspector-tree-node__name"},i.a.createElement("span",{className:"ck-inspector-tree-node__name__bracket ck-inspector-tree-node__name__bracket_open"}),c,this.getAttributes(),n?"":i.a.createElement("span",{className:"ck-inspector-tree-node__name__bracket ck-inspector-tree-node__name__bracket_close"})),i.a.createElement("div",{className:"ck-inspector-tree-node__content"},r),n?"":i.a.createElement("span",{className:"ck-inspector-tree-node__name ck-inspector-tree-node__name_close"},i.a.createElement("span",{className:"ck-inspector-tree-node__name__bracket ck-inspector-tree-node__name__bracket_open"}),"/",c,i.a.createElement("span",{className:"ck-inspector-tree-node__name__bracket ck-inspector-tree-node__name__bracket_close"}),l))}getAttributes(){const e=[],t=this.definition;for(const[n,o]of t.attributes)e.push(i.a.createElement(c,{key:n,name:n,value:o}));return e}shouldComponentUpdate(e){return!s()(this.props,e)}}class p extends a{render(){const e=this.definition,t=["ck-inspector-tree-text",this.isActive?"ck-inspector-tree-node_active":""].join(" ");let n=this.definition.text;e.positions&&e.positions.length&&(n=n.split(""),Array.from(e.positions).sort(((e,t)=>e.offset{n.splice(t.offset-e.startOffset,0,i.a.createElement(u,{key:"position"+o,definition:t}))})));const o=[n];return e.positionsBefore&&e.positionsBefore.length&&e.positionsBefore.forEach(((e,t)=>{o.unshift(i.a.createElement(u,{key:"position-before:"+t,definition:e}))})),e.positionsAfter&&e.positionsAfter.length&&e.positionsAfter.forEach(((e,t)=>{o.push(i.a.createElement(u,{key:"position-after:"+t,definition:e}))})),i.a.createElement("span",{className:t,onClick:this.handleClick},i.a.createElement("span",{className:"ck-inspector-tree-node__content"},this.globalTreeProps.showCompactText?"":this.getAttributes(),this.globalTreeProps.showCompactText?"":'"',o,this.globalTreeProps.showCompactText?"":'"'))}getAttributes(){const e=[],t=this.definition,n=t.presentation,o=n&&n.dontRenderAttributeValue;for(const[n,r]of t.attributes)e.push(i.a.createElement(c,{key:n,name:n,value:r,dontRenderValue:o}));return i.a.createElement("span",{className:"ck-inspector-tree-text__attributes"},e)}shouldComponentUpdate(e){return!s()(this.props,e)}}class h extends o.Component{render(){return i.a.createElement("span",{className:"ck-inspector-tree-comment",dangerouslySetInnerHTML:{__html:this.props.definition.text}})}}function m(e,t,n){return"element"===e.type?i.a.createElement(d,{key:t,definition:e,globalTreeProps:n}):"text"===e.type?i.a.createElement(p,{key:t,definition:e,globalTreeProps:n}):"comment"===e.type?i.a.createElement(h,{key:t,definition:e}):void 0}n(34);class f extends o.Component{render(){let e;return e=this.props.definition?this.props.definition.map(((e,t)=>m(e,t,{onClick:this.props.onClick,showCompactText:this.props.showCompactText,showElementTypes:this.props.showElementTypes,activeNode:this.props.activeNode}))):"Nothing to show.",i.a.createElement("div",{className:["ck-inspector-tree",...this.props.className||[],this.props.textDirection?"ck-inspector-tree_text-direction_"+this.props.textDirection:"",this.props.showCompactText?"ck-inspector-tree_compact-text":""].join(" ")},e)}}},function(e,t,n){"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),e.exports=n(22)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.stringifyPath=t.quoteKey=t.isValidVariableName=t.IS_VALID_IDENTIFIER=t.quoteString=void 0;const o=/[\\\'\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,i=new Map([["\b","\\b"],["\t","\\t"],["\n","\\n"],["\f","\\f"],["\r","\\r"],["'","\\'"],['"','\\"'],["\\","\\\\"]]);function r(e){return i.get(e)||"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)}t.quoteString=function(e){return`'${e.replace(o,r)}'`};const s=new Set("break else new var case finally return void catch for switch while continue function this with default if throw delete in try do instanceof typeof abstract enum int short boolean export interface static byte extends long super char final native synchronized class float package throws const goto private transient debugger implements protected volatile double import public let yield".split(" "));function a(e){return"string"==typeof e&&!s.has(e)&&t.IS_VALID_IDENTIFIER.test(e)}t.IS_VALID_IDENTIFIER=/^[A-Za-z_$][A-Za-z0-9_$]*$/,t.isValidVariableName=a,t.quoteKey=function(e,t){return a(e)?e:t(e)},t.stringifyPath=function(e,t){let n="";for(const o of e)a(o)?n+="."+o:n+=`[${t(o)}]`;return n}},function(e,t){function n(e,t,n,o){var i,r=null==(i=o)||"number"==typeof i||"boolean"==typeof i?o:n(o),s=t.get(r);return void 0===s&&(s=e.call(this,o),t.set(r,s)),s}function o(e,t,n){var o=Array.prototype.slice.call(arguments,3),i=n(o),r=t.get(i);return void 0===r&&(r=e.apply(this,o),t.set(i,r)),r}function i(e,t,n,o,i){return n.bind(t,e,o,i)}function r(e,t){return i(e,this,1===e.length?n:o,t.cache.create(),t.serializer)}function s(){return JSON.stringify(arguments)}function a(){this.cache=Object.create(null)}a.prototype.has=function(e){return e in this.cache},a.prototype.get=function(e){return this.cache[e]},a.prototype.set=function(e,t){this.cache[e]=t};var l={create:function(){return new a}};e.exports=function(e,t){var n=t&&t.cache?t.cache:l,o=t&&t.serializer?t.serializer:s;return(t&&t.strategy?t.strategy:r)(e,{cache:n,serializer:o})},e.exports.strategies={variadic:function(e,t){return i(e,this,o,t.cache.create(),t.serializer)},monadic:function(e,t){return i(e,this,n,t.cache.create(),t.serializer)}}},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";var o=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach((function(e){o[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,s,a=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),l=1;l ? =".split(" "));function l(e){let t;for(const n of e.split("\n").slice(1)){const o=/^[\s\t]+/.exec(n);if(!o)return e;const[i]=o;(void 0===t||i.length{const r="string"==typeof i?i:void 0;return void 0!==r&&t.USED_METHOD_KEY.add(e),new c(e,n,o,r).stringify()},t.dedentFunction=l;class c{constructor(e,t,n,i){this.fn=e,this.indent=t,this.next=n,this.key=i,this.pos=0,this.hadKeyword=!1,this.fnString=Function.prototype.toString.call(e),this.fnType=e.constructor.name,this.keyQuote=void 0===i?"":o.quoteKey(i,n),this.keyPrefix=void 0===i?"":`${this.keyQuote}:${t?" ":""}`,this.isMethodCandidate=void 0!==i&&(""===this.fn.name||this.fn.name===i)}stringify(){const e=this.tryParse();return e?l(e):`${this.keyPrefix}void ${this.next(this.fnString)}`}getPrefix(){return this.isMethodCandidate&&!this.hadKeyword?s[this.fnType]+this.keyQuote:this.keyPrefix+r[this.fnType]}tryParse(){if("}"!==this.fnString[this.fnString.length-1])return this.keyPrefix+this.fnString;if(this.fn.name){const e=this.tryStrippingName();if(e)return e}const e=this.pos;if("class"===this.consumeSyntax())return this.fnString;if(this.pos=e,this.tryParsePrefixTokens()){const e=this.tryStrippingName();if(e)return e;let t=this.pos;switch(this.consumeSyntax("WORD_LIKE")){case"WORD_LIKE":this.isMethodCandidate&&!this.hadKeyword&&(t=this.pos);case"()":if("=>"===this.fnString.substr(this.pos,2))return this.keyPrefix+this.fnString;this.pos=t;case'"':case"'":case"[]":return this.getPrefix()+this.fnString.substr(this.pos)}}}tryStrippingName(){if(i)return;let e=this.pos;const t=this.fnString.substr(this.pos,this.fn.name.length);if(t===this.fn.name&&(this.pos+=t.length,"()"===this.consumeSyntax()&&"{}"===this.consumeSyntax()&&this.pos===this.fnString.length))return!this.isMethodCandidate&&o.isValidVariableName(t)||(e+=t.length),this.getPrefix()+this.fnString.substr(e);this.pos=e}tryParsePrefixTokens(){let e=this.pos;switch(this.hadKeyword=!1,this.fnType){case"AsyncFunction":if("async"!==this.consumeSyntax())return!1;e=this.pos;case"Function":return"function"===this.consumeSyntax()?this.hadKeyword=!0:this.pos=e,!0;case"AsyncGeneratorFunction":if("async"!==this.consumeSyntax())return!1;case"GeneratorFunction":let t=this.consumeSyntax();return"function"===t&&(t=this.consumeSyntax(),this.hadKeyword=!0),"*"===t}}consumeSyntax(e){const t=this.consumeMatch(/^(?:([A-Za-z_0-9$\xA0-\uFFFF]+)|=>|\+\+|\-\-|.)/);if(!t)return;const[n,o]=t;if(this.consumeWhitespace(),o)return e||o;switch(n){case"(":return this.consumeSyntaxUntil("(",")");case"[":return this.consumeSyntaxUntil("[","]");case"{":return this.consumeSyntaxUntil("{","}");case"`":return this.consumeTemplate();case'"':return this.consumeRegExp(/^(?:[^\\"]|\\.)*"/,'"');case"'":return this.consumeRegExp(/^(?:[^\\']|\\.)*'/,"'")}return n}consumeSyntaxUntil(e,t){let n=!0;for(;;){const o=this.consumeSyntax();if(o===t)return e+t;if(!o||")"===o||"]"===o||"}"===o)return;"/"===o&&n&&this.consumeMatch(/^(?:\\.|[^\\\/\n[]|\[(?:\\.|[^\]])*\])+\/[a-z]*/)?(n=!1,this.consumeWhitespace()):n=a.has(o)}}consumeMatch(e){const t=e.exec(this.fnString.substr(this.pos));return t&&(this.pos+=t[0].length),t}consumeRegExp(e,t){const n=e.exec(this.fnString.substr(this.pos));if(n)return this.pos+=n[0].length,this.consumeWhitespace(),t}consumeTemplate(){for(;;){if(this.consumeMatch(/^(?:[^`$\\]|\\.|\$(?!{))*/),"`"===this.fnString[this.pos])return this.pos++,this.consumeWhitespace(),"`";if("${"!==this.fnString.substr(this.pos,2)||(this.pos+=2,this.consumeWhitespace(),!this.consumeSyntaxUntil("{","}")))return}}consumeWhitespace(){this.consumeMatch(/^(?:\s|\/\/.*|\/\*[^]*?\*\/)*/)}}t.FunctionParser=c},function(e,t,n){e.exports=n(53)()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.stringify=void 0;const o=n(25),i=n(13),r=Symbol("root");t.stringify=function(e,t,n,s={}){const a="string"==typeof n?n:" ".repeat(n||0),l=[],c=new Set,u=new Map,d=new Map;let p=0;const{maxDepth:h=100,references:m=!1,skipUndefinedProperties:f=!1,maxValues:g=1e5}=s,b=function(e){return e?(t,n,i,r)=>e(t,n,(e=>o.toString(e,n,i,r)),r):o.toString}(t),k=(e,t)=>{if(++p>g)return;if(f&&void 0===e)return;if(l.length>h)return;if(void 0===t)return b(e,a,k,t);l.push(t);const n=w(e,t===r?void 0:t);return l.pop(),n},w=m?(e,t)=>{if(null!==e&&("object"==typeof e||"function"==typeof e||"symbol"==typeof e)){if(u.has(e))return d.set(l.slice(1),u.get(e)),b(void 0,a,k,t);u.set(e,l.slice(1))}return b(e,a,k,t)}:(e,t)=>{if(c.has(e))return;c.add(e);const n=b(e,a,k,t);return c.delete(e),n},y=k(e,r);if(d.size){const e=a?" ":"",t=a?"\n":"";let n=`var x${e}=${e}${y};${t}`;for(const[o,r]of d.entries())n+=`x${i.stringifyPath(o,k)}${e}=${e}x${i.stringifyPath(r,k)};${t}`;return`(function${e}()${e}{${t}${n}return x;${t}}())`}return y}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.findInArray=function(e,t){for(var n=0,o=e.length;nI.length&&I.push(e)}function B(e,t,n){return null==e?0:function e(t,n,o,i){var a=typeof t;"undefined"!==a&&"boolean"!==a||(t=null);var l=!1;if(null===t)l=!0;else switch(a){case"string":case"number":l=!0;break;case"object":switch(t.$$typeof){case r:case s:l=!0}}if(l)return o(i,t,""===n?"."+j(t,0):n),1;if(l=0,n=""===n?".":n+":",Array.isArray(t))for(var c=0;c