@next-dll/editor-bricks-helper 0.23.5 → 0.23.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,7 +3,7 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
- ## [0.23.5](https://github.com/easyops-cn/next-core/compare/@next-dll/editor-bricks-helper@0.23.4...@next-dll/editor-bricks-helper@0.23.5) (2021-10-11)
6
+ ## [0.23.9](https://github.com/easyops-cn/next-core/compare/@next-dll/editor-bricks-helper@0.23.8...@next-dll/editor-bricks-helper@0.23.9) (2021-10-15)
7
7
 
8
8
  **Note:** Version bump only for package @next-dll/editor-bricks-helper
9
9
 
@@ -11,7 +11,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
11
11
 
12
12
 
13
13
 
14
- ## [0.23.4](https://github.com/easyops-cn/next-core/compare/@next-dll/editor-bricks-helper@0.23.3...@next-dll/editor-bricks-helper@0.23.4) (2021-10-09)
14
+ ## [0.23.8](https://github.com/easyops-cn/next-core/compare/@next-dll/editor-bricks-helper@0.23.7...@next-dll/editor-bricks-helper@0.23.8) (2021-10-13)
15
15
 
16
16
  **Note:** Version bump only for package @next-dll/editor-bricks-helper
17
17
 
@@ -19,7 +19,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
19
19
 
20
20
 
21
21
 
22
- ## [0.23.3](https://github.com/easyops-cn/next-core/compare/@next-dll/editor-bricks-helper@0.23.2...@next-dll/editor-bricks-helper@0.23.3) (2021-10-08)
22
+ ## [0.23.7](https://github.com/easyops-cn/next-core/compare/@next-dll/editor-bricks-helper@0.23.6...@next-dll/editor-bricks-helper@0.23.7) (2021-10-12)
23
23
 
24
24
  **Note:** Version bump only for package @next-dll/editor-bricks-helper
25
25
 
@@ -27,143 +27,92 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
27
27
 
28
28
 
29
29
 
30
- ## [0.23.2](https://github.com/easyops-cn/next-core/compare/@next-dll/editor-bricks-helper@0.23.1...@next-dll/editor-bricks-helper@0.23.2) (2021-09-30)
30
+ ## [0.23.6](https://github.com/easyops-cn/next-core/compare/@next-dll/editor-bricks-helper@0.23.5...@next-dll/editor-bricks-helper@0.23.6) (2021-10-11)
31
31
 
32
32
  **Note:** Version bump only for package @next-dll/editor-bricks-helper
33
33
 
34
+ ## [0.23.5](https://github.com/easyops-cn/next-core/compare/@next-dll/editor-bricks-helper@0.23.4...@next-dll/editor-bricks-helper@0.23.5) (2021-10-11)
34
35
 
36
+ **Note:** Version bump only for package @next-dll/editor-bricks-helper
35
37
 
38
+ ## [0.23.4](https://github.com/easyops-cn/next-core/compare/@next-dll/editor-bricks-helper@0.23.3...@next-dll/editor-bricks-helper@0.23.4) (2021-10-09)
36
39
 
40
+ **Note:** Version bump only for package @next-dll/editor-bricks-helper
37
41
 
38
- ## [0.23.1](https://github.com/easyops-cn/next-core/compare/@next-dll/editor-bricks-helper@0.23.0...@next-dll/editor-bricks-helper@0.23.1) (2021-09-30)
42
+ ## [0.23.3](https://github.com/easyops-cn/next-core/compare/@next-dll/editor-bricks-helper@0.23.2...@next-dll/editor-bricks-helper@0.23.3) (2021-10-08)
39
43
 
40
44
  **Note:** Version bump only for package @next-dll/editor-bricks-helper
41
45
 
46
+ ## [0.23.2](https://github.com/easyops-cn/next-core/compare/@next-dll/editor-bricks-helper@0.23.1...@next-dll/editor-bricks-helper@0.23.2) (2021-09-30)
42
47
 
48
+ **Note:** Version bump only for package @next-dll/editor-bricks-helper
43
49
 
50
+ ## [0.23.1](https://github.com/easyops-cn/next-core/compare/@next-dll/editor-bricks-helper@0.23.0...@next-dll/editor-bricks-helper@0.23.1) (2021-09-30)
44
51
 
52
+ **Note:** Version bump only for package @next-dll/editor-bricks-helper
45
53
 
46
54
  # [0.23.0](https://github.com/easyops-cn/next-core/compare/@next-dll/editor-bricks-helper@0.22.3...@next-dll/editor-bricks-helper@0.23.0) (2021-09-27)
47
55
 
48
-
49
56
  ### Features
50
57
 
51
- * expose StoryboardFunctionRegistryFactory ([c7079e8](https://github.com/easyops-cn/next-core/commit/c7079e838a37350264ca3bf210527e1b09a542f7))
52
-
53
-
54
-
55
-
58
+ - expose StoryboardFunctionRegistryFactory ([c7079e8](https://github.com/easyops-cn/next-core/commit/c7079e838a37350264ca3bf210527e1b09a542f7))
56
59
 
57
60
  ## [0.22.3](https://github.com/easyops-cn/next-core/compare/@next-dll/editor-bricks-helper@0.22.2...@next-dll/editor-bricks-helper@0.22.3) (2021-09-23)
58
61
 
59
62
  **Note:** Version bump only for package @next-dll/editor-bricks-helper
60
63
 
61
-
62
-
63
-
64
-
65
64
  ## [0.22.2](https://github.com/easyops-cn/next-core/compare/@next-dll/editor-bricks-helper@0.22.1...@next-dll/editor-bricks-helper@0.22.2) (2021-09-23)
66
65
 
67
66
  **Note:** Version bump only for package @next-dll/editor-bricks-helper
68
67
 
69
-
70
-
71
-
72
-
73
68
  ## [0.22.1](https://github.com/easyops-cn/next-core/compare/@next-dll/editor-bricks-helper@0.22.0...@next-dll/editor-bricks-helper@0.22.1) (2021-09-22)
74
69
 
75
70
  **Note:** Version bump only for package @next-dll/editor-bricks-helper
76
71
 
77
-
78
-
79
-
80
-
81
72
  # [0.22.0](https://github.com/easyops-cn/next-core/compare/@next-dll/editor-bricks-helper@0.21.2...@next-dll/editor-bricks-helper@0.22.0) (2021-09-22)
82
73
 
83
-
84
74
  ### Features
85
75
 
86
- * lint storyboard functions ([c9b25d8](https://github.com/easyops-cn/next-core/commit/c9b25d837a604503d4a70f19c68922695e0c2650))
87
-
88
-
89
-
90
-
76
+ - lint storyboard functions ([c9b25d8](https://github.com/easyops-cn/next-core/commit/c9b25d837a604503d4a70f19c68922695e0c2650))
91
77
 
92
78
  ## [0.21.2](https://github.com/easyops-cn/next-core/compare/@next-dll/editor-bricks-helper@0.21.1...@next-dll/editor-bricks-helper@0.21.2) (2021-09-16)
93
79
 
94
80
  **Note:** Version bump only for package @next-dll/editor-bricks-helper
95
81
 
96
-
97
-
98
-
99
-
100
82
  ## [0.21.1](https://github.com/easyops-cn/next-core/compare/@next-dll/editor-bricks-helper@0.21.0...@next-dll/editor-bricks-helper@0.21.1) (2021-09-15)
101
83
 
102
84
  **Note:** Version bump only for package @next-dll/editor-bricks-helper
103
85
 
104
-
105
-
106
-
107
-
108
86
  # [0.21.0](https://github.com/easyops-cn/next-core/compare/@next-dll/editor-bricks-helper@0.20.11...@next-dll/editor-bricks-helper@0.21.0) (2021-09-14)
109
87
 
110
-
111
88
  ### Features
112
89
 
113
- * refine cook which follows ECMA-262 ([417c628](https://github.com/easyops-cn/next-core/commit/417c62869397976c6ac5b9e0b97e68692eb2efc4))
114
-
115
-
116
-
117
-
90
+ - refine cook which follows ECMA-262 ([417c628](https://github.com/easyops-cn/next-core/commit/417c62869397976c6ac5b9e0b97e68692eb2efc4))
118
91
 
119
92
  ## [0.20.11](https://github.com/easyops-cn/next-core/compare/@next-dll/editor-bricks-helper@0.20.10...@next-dll/editor-bricks-helper@0.20.11) (2021-09-14)
120
93
 
121
94
  **Note:** Version bump only for package @next-dll/editor-bricks-helper
122
95
 
123
-
124
-
125
-
126
-
127
96
  ## [0.20.10](https://github.com/easyops-cn/next-core/compare/@next-dll/editor-bricks-helper@0.20.9...@next-dll/editor-bricks-helper@0.20.10) (2021-09-13)
128
97
 
129
98
  **Note:** Version bump only for package @next-dll/editor-bricks-helper
130
99
 
131
-
132
-
133
-
134
-
135
100
  ## [0.20.9](https://github.com/easyops-cn/next-core/compare/@next-dll/editor-bricks-helper@0.20.8...@next-dll/editor-bricks-helper@0.20.9) (2021-09-12)
136
101
 
137
102
  **Note:** Version bump only for package @next-dll/editor-bricks-helper
138
103
 
139
-
140
-
141
-
142
-
143
104
  ## [0.20.8](https://github.com/easyops-cn/next-core/compare/@next-dll/editor-bricks-helper@0.20.7...@next-dll/editor-bricks-helper@0.20.8) (2021-09-10)
144
105
 
145
106
  **Note:** Version bump only for package @next-dll/editor-bricks-helper
146
107
 
147
-
148
-
149
-
150
-
151
108
  ## [0.20.7](https://github.com/easyops-cn/next-core/compare/@next-dll/editor-bricks-helper@0.20.6...@next-dll/editor-bricks-helper@0.20.7) (2021-09-09)
152
109
 
153
110
  **Note:** Version bump only for package @next-dll/editor-bricks-helper
154
111
 
155
-
156
-
157
-
158
-
159
112
  ## [0.20.6](https://github.com/easyops-cn/next-core/compare/@next-dll/editor-bricks-helper@0.20.5...@next-dll/editor-bricks-helper@0.20.6) (2021-09-06)
160
113
 
161
114
  **Note:** Version bump only for package @next-dll/editor-bricks-helper
162
115
 
163
-
164
-
165
-
166
-
167
116
  ## [0.20.5](https://github.com/easyops-cn/next-core/compare/@next-dll/editor-bricks-helper@0.20.4...@next-dll/editor-bricks-helper@0.20.5) (2021-09-03)
168
117
 
169
118
  **Note:** Version bump only for package @next-dll/editor-bricks-helper
@@ -0,0 +1,8 @@
1
+ var DllOfEditorBricksHelper=function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.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 r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));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=0)}({"/8r5":function(e,t){e.exports=DllOfReactDnd},0:function(e,t,n){e.exports=n},"3tO9":function(e,t,n){e.exports=n("XuQu")("3tO9")},"A+yw":function(e,t,n){e.exports=n("XuQu")("A+yw")},ACCw:function(e,t,n){e.exports=n("XuQu")("ACCw")},IYwU:function(e,t,n){e.exports=n("/8r5")("IYwU")},LvDl:function(e,t,n){e.exports=n("XuQu")("LvDl")},QILm:function(e,t,n){e.exports=n("XuQu")("QILm")},WnDu:function(e,t,n){"use strict";n.r(t),n.d(t,"BuilderDataTransferType",(function(){return p})),n.d(t,"BuilderProvider",(function(){return ke})),n.d(t,"DropZone",(function(){return xe})),n.d(t,"DroppingStatusContext",(function(){return we})),n.d(t,"EditorBrickType",(function(){return c})),n.d(t,"EditorContainer",(function(){return te})),n.d(t,"EditorElementFactory",(function(){return _e})),n.d(t,"EditorSelfLayout",(function(){return g})),n.d(t,"EditorSlotContentLayout",(function(){return v})),n.d(t,"SlotContainer",(function(){return Ie})),n.d(t,"getSortedIdsAfterDropped",(function(){return me})),n.d(t,"useBuilderContextMenuStatus",(function(){return z})),n.d(t,"useBuilderData",(function(){return V})),n.d(t,"useBuilderDataManager",(function(){return G})),n.d(t,"useBuilderGroupedChildNodes",(function(){return pe})),n.d(t,"useBuilderNode",(function(){return X})),n.d(t,"useBuilderNodeMountPoints",(function(){return Be})),n.d(t,"useBuilderParentNode",(function(){return Ue})),n.d(t,"useCanDrop",(function(){return ge})),n.d(t,"useCanvasList",(function(){return De})),n.d(t,"useHighlightNodes",(function(){return W})),n.d(t,"useHoverNodeUid",(function(){return J})),n.d(t,"useOutlineEnabled",(function(){return Re})),n.d(t,"useRouteList",(function(){return Ze})),n.d(t,"useShowRelatedNodesBasedOnEvents",(function(){return Y}));var o=n("q1tI"),r=n.n(o),i=n("3tO9"),a=n.n(i),d=n("lSNA"),s=n.n(d),l=n("LvDl"),u=n("A+yw");n.d(t,"isBrickNode",(function(){return u.isBrickNode})),n.d(t,"isCustomTemplateNode",(function(){return u.isCustomTemplateNode})),n.d(t,"isRouteNode",(function(){return u.isRouteNode})),n.d(t,"isSnippetNode",(function(){return u.isSnippetNode}));var p,c,g,v,h=n("QILm"),m=n.n(h),f=n("IYwU"),E=n("yXPU"),C=n.n(E),b=n("tYg3"),N=n("ZR4k"),D=n.n(N),y=n("ACCw"),O=n.n(y),x=n("i8i4"),T=n.n(x),$=n("qJlv");!function(e){e.NODE_TO_ADD="builder/node-to-add",e.NODE_TO_MOVE="builder/node-to-move",e.SNIPPET_TO_APPLY="builder/snippet-to-apply"}(p||(p={})),function(e){e.DEFAULT="editorOfDefault",e.CONTAINER="editorOfContainer",e.TRANSPARENT_CONTAINER="editorOfTransparentContainer"}(c||(c={})),function(e){e.BLOCK="block",e.INLINE="inline",e.CONTAINER="container"}(g||(g={})),function(e){e.BLOCK="block",e.INLINE="inline",e.GRID="grid"}(v||(v={}));var S={exports:{}};
2
+ /*!
3
+ Copyright (c) 2018 Jed Watson.
4
+ Licensed under the MIT License (MIT), see
5
+ http://jedwatson.github.io/classnames
6
+ */!function(e){!function(){var t={}.hasOwnProperty;function n(){for(var e=[],o=0;o<arguments.length;o++){var r=arguments[o];if(r){var i=typeof r;if("string"===i||"number"===i)e.push(r);else if(Array.isArray(r)){if(r.length){var a=n.apply(null,r);a&&e.push(a)}}else if("object"===i)if(r.toString===Object.prototype.toString)for(var d in r)t.call(r,d)&&r[d]&&e.push(d);else e.push(r.toString())}}return e.join(" ")}e.exports?(n.default=n,e.exports=n):window.classNames=n}()}(S);var I=S.exports,k={};
7
+ /*! (c) Andrea Giammarchi - ISC */try{k.EventTarget=(new EventTarget).constructor}catch(e){!function(e,t){var n=e.create,o=e.defineProperty,r=i.prototype;function i(){t.set(this,n(null))}function a(e,t,n){o(e,t,{configurable:!0,writable:!0,value:n})}function d(e){var t=e.options;return t&&t.once&&e.target.removeEventListener(this.type,e.listener),"function"==typeof e.listener?e.listener.call(e.target,this):e.listener.handleEvent(this),this._stopImmediatePropagationFlag}a(r,"addEventListener",(function(e,n,o){for(var r=t.get(this),i=r[e]||(r[e]=[]),a=0,d=i.length;a<d;a++)if(i[a].listener===n)return;i.push({target:this,listener:n,options:o})})),a(r,"dispatchEvent",(function(e){var n=t.get(this)[e.type];return n&&(a(e,"target",this),a(e,"currentTarget",this),n.slice(0).some(d,e),delete e.currentTarget,delete e.target),!0})),a(r,"removeEventListener",(function(e,n){for(var o=t.get(this),r=o[e]||(o[e]=[]),i=0,a=r.length;i<a;i++)if(r[i].listener===n)return void r.splice(i,1)})),k.EventTarget=i}(Object,new WeakMap)}var L=k.EventTarget,j=0;function A(){return j+=1}function P({nodes:e,edges:t,rootId:n}){var o=t.slice(),r=new WeakMap,i=(n,o)=>{var r=e.find(e=>e.$$uid===n),a=Object(l.sortBy)(t.filter(e=>e.parent===r.$$uid),e=>e.sort);for(var d of(o(r,a),a))i(d.child,o)},d=(t,n,i)=>{var a,s,p;if(t.$$isExpandableTemplate&&null!==(a=t.$$templateProxy)&&void 0!==a&&a.slots&&Object(u.hasOwnProperty)(t.$$templateProxy.slots,n)&&(s=t.$$templateProxy.slots[n])&&(p=t.$$templateRefToUid.get(s.ref))){var c=e.find(e=>e.$$uid===p),g=s.refSlot;if(c.$$isExpandableTemplate)d(c,g,i);else{var v,h={child:i,parent:p,mountPoint:g,sort:void 0,$$isTemplateExpanded:!0},m=Object(l.sortBy)(o.filter(e=>e.parent===p),e=>{var t;return null!==(t=r.get(e))&&void 0!==t?t:e.sort}),f=m.filter(e=>e.$$isTemplateInternal),E=null!==(v=s.refPosition)&&void 0!==v?v:-1,C=Object(l.clamp)(E<0?f.length+1+E:E,0,f.length);m.splice(C<f.length?m.findIndex(e=>e===f[C]):m.length,0,h),m.forEach((e,t)=>{r.set(e,t)}),o.push(h)}}};return i(n,(e,t)=>{if(e.$$isExpandableTemplate)for(var n of t)d(e,n.mountPoint,n.child)}),o.length>t.length?o.map(e=>{var t=r.get(e);return void 0===t?e:a()(a()({},e),{},{sort:t})}):t}function _({rootId:e,nodes:t,edges:n},{parentUid:o,nodeUids:r}){return P({rootId:e,nodes:t,edges:n.filter(e=>!e.$$isTemplateExpanded).map(e=>{var t=e.parent===o?r.indexOf(e.child):-1;return t>=0?a()(a()({},e),{},{sort:t}):e})})}function w(e,{rootId:t,nodes:n,edges:o}){var r=new Set;return function e(t,n,o){o.add(t);var r=new Set;for(var i of n)i.parent===t&&r.add(i.child);for(var a of r)e(a,n,o)}(e,o,r),{rootId:t,nodes:n.filter(e=>!r.has(e.$$uid)),edges:o.filter(e=>!r.has(e.parent)&&!r.has(e.child))}}function B(e,t,n,o,r){for(var i of t)if(i){if(i.target){var a=o.get(i.target);a&&(n.get(e.$$uid).downstreamNodes.add(a),n.get(a).upstreamNodes.add(e.$$uid))}else if(i.targetRef){var d=r.get(i.targetRef);d&&(n.get(e.$$uid).downstreamNodes.add(d),n.get(d).upstreamNodes.add(e.$$uid))}if(i.callback)for(var s of Object.values(i.callback))B(e,[].concat(s),n,o,r)}}var U,Z=["parent","children","graphInfo","mountPoint"];function R(e,t,n,o=[]){var r=[],i=[],a=(e,t,d,s,p)=>{var c,g,v,h,m=function(e,t,n){var o,r=[];e.brick&&r.push(e.brick.replace(/\./g,"\\."));var i=Object(u.normalizeBuilderNode)(e),a=[];for(var d of["properties","events","lifeCycle"]){var s=Object(l.cloneDeep)(null==i?void 0:i[d]);a.push(["$$parsed".concat(Object(l.upperFirst)(d)),null!=s?s:{}]),"properties"===d&&null!=s&&s.id&&"string"==typeof s.id&&!/[<{]/.test(s.id)&&r.push("#".concat(s.id))}return Object.fromEntries(Object.entries(e).filter(e=>!Z.includes(e[0])).concat([["alias",null!==(o=e.alias)&&void 0!==o?o:Object(u.isBrickNode)(e)?e.brick.split(".").pop():void 0],["$$uid",t],["$$matchedSelectors",r],["$$isTemplateInternalNode",n],["$$normalized",i]]).concat(a))}(e,t,s);if(r.push(m),p&&m.ref&&p.set(m.ref,t),Object(u.isBrickNode)(m)&&(!m.brick.includes(".")&&m.brick.startsWith("tpl-")&&!d.has(m.brick)&&(h=null==n?void 0:n.get(m.brick))&&(null===(c=h.children)||void 0===c?void 0:c.length)>0||m.brick.includes(".tpl-")&&(h=null==o||null===(g=o.find(e=>e.storyId===m.brick))||void 0===g?void 0:g.originData)&&(null===(v=h.children)||void 0===v?void 0:v.length)>0)){d.add(m.brick),m.$$isExpandableTemplate=!0,m.$$templateProxy=h.proxy&&JSON.parse(h.proxy);var f=new Map;if(m.$$templateRefToUid=f,Object(l.sortBy)(h.children,[e=>{var t;return null!==(t=e.sort)&&void 0!==t?t:-1/0}]).forEach((e,n)=>{var o=A();a(e,o,new Set(d),!0,f),i.push({child:o,parent:t,mountPoint:"",sort:n,$$isTemplateInternal:!0})}),!m.$$isTemplateInternalNode){var E=(e,t,n)=>{var o;if(null!==(o=e.$$templateProxy)&&void 0!==o&&o.slots){var i,a=Object.entries(null===(i=e.$$templateProxy)||void 0===i?void 0:i.slots).filter(e=>void 0===t||e[0]===t),d=function(t,o){var i=e.$$templateRefToUid.get(o.ref);if(i){var a=r.find(e=>e.$$uid===i);if(a.$$isExpandableTemplate)E(a,o.refSlot,t);else{a.$$delegatedSlots||(a.$$delegatedSlots=new Map);var d=a.$$delegatedSlots.get(o.refSlot);d||(d=[],a.$$delegatedSlots.set(o.refSlot,d)),d.push({templateUid:m.$$uid,templateMountPoint:n||t})}}};for(var[s,l]of a)d(s,l)}};E(m);var C=(e,t)=>{var n,o;if(null!==(n=e.$$templateProxy)&&void 0!==n&&n.properties){var i,a=Object.entries(null===(i=e.$$templateProxy)||void 0===i?void 0:i.properties).filter(e=>void 0===t||e[0]===t);for(var[d,s]of a)Object(u.hasOwnProperty)(e.$$parsedProperties,d)&&((o=s).ref&&o.refProperty)&&function(){var t=e.$$templateRefToUid.get(s.ref),n=e.$$parsedProperties[d];if(t){var o=r.find(e=>e.$$uid===t);o.$$parsedProperties[s.refProperty]=n,o.$$isExpandableTemplate&&C(o,s.refProperty)}}()}};C(m)}}if(Array.isArray(e.children)){var b;switch(m.type){case"bricks":case"custom-template":b="bricks";break;case"routes":b="routes"}Object(l.sortBy)(e.children,[e=>{var t;return null!==(t=e.sort)&&void 0!==t?t:-1/0}]).forEach((e,n)=>{var o,r=A();a(e,r,new Set(d),s,p),i.push({child:r,parent:t,mountPoint:null!==(o=b)&&void 0!==o?o:e.mountPoint,sort:n,$$isTemplateInternal:s,$$isTemplateDelegated:m.$$isExpandableTemplate})})}};return a(e,t,new Set),{nodes:r,edges:i}}function M(e,t){return e.find(e=>e.$$uid===t).$$isExpandableTemplate}!function(e){e.NODE_ADD="builder.node.add",e.NODE_MOVE="builder.node.move",e.NODE_REORDER="builder.node.reorder",e.NODE_CLICK="builder.node.click",e.SNIPPET_APPLY="builder.snippet.apply",e.CONTEXT_MENU_CHANGE="builder.contextMenu.change",e.DATA_CHANGE="builder.data.change",e.SHARED_EDITOR_LIST_CHANGE="builder.sharedEditorList.change",e.ROUTE_LIST_CHANGE="builder.routeList.change",e.HOVER_NODE_CHANGE="builder.hoverNode.change",e.SHOW_RELATED_NODES_BASED_ON_EVENTS="builder.showRelatedNodesBasedOnEvents.change",e.HIGHLIGHT_NODES_CHANGE="builder.highlightNodes.change",e.OUTLINE_DISABLED_NODES_CHANGE="builder.outlineDisabledNodes.change",e.DROPPING_STATUS_CHANGE="builder.droppingStatus.change"}(U||(U={}));class H{constructor(){var e;s()(this,"data",{rootId:null,nodes:[],edges:[]}),s()(this,"hoverNodeUid",void 0),s()(this,"sharedEditorList",void 0),s()(this,"routeList",void 0),s()(this,"storyList",void 0),s()(this,"eventTarget",new L),s()(this,"contextMenuStatus",{active:!1}),s()(this,"showRelatedNodesBasedOnEvents",void 0),s()(this,"relatedNodesBasedOnEventsMap",void 0),s()(this,"highlightNodes",new Set),s()(this,"templateSourceMap",void 0),s()(this,"droppingStatus",new Map),s()(this,"localJsonStorage",new u.JsonStorage(localStorage)),s()(this,"outlineDisabledNodes",new Set(null!==(e=this.localJsonStorage.getItem("builder-outline-disabled-nodes"))&&void 0!==e?e:[]))}getData(){return this.data}getContextMenuStatus(){return this.contextMenuStatus}getRelatedNodesBasedOnEventsMap(){return this.relatedNodesBasedOnEventsMap}sharedEditorListInit(e){this.sharedEditorList=e,this.eventTarget.dispatchEvent(new CustomEvent(U.SHARED_EDITOR_LIST_CHANGE))}getSharedEditorList(){var e;return null!==(e=this.sharedEditorList)&&void 0!==e?e:[]}onSharedEditorListChange(e){return this.eventTarget.addEventListener(U.SHARED_EDITOR_LIST_CHANGE,e),()=>{this.eventTarget.removeEventListener(U.SHARED_EDITOR_LIST_CHANGE,e)}}routeListInit(e){this.routeList=e,this.eventTarget.dispatchEvent(new CustomEvent(U.ROUTE_LIST_CHANGE))}getRouteList(){var e;return null!==(e=this.routeList)&&void 0!==e?e:[]}storyListInit(e){this.storyList=e}getStoryList(){return this.storyList}onRouteListChange(e){return this.eventTarget.addEventListener(U.ROUTE_LIST_CHANGE,e),()=>{this.eventTarget.removeEventListener(U.ROUTE_LIST_CHANGE,e)}}dataInit(e,t){this.templateSourceMap=t;var n=A(),o=a()({rootId:n},R(e,n,t,this.storyList));this.data=a()(a()({},o),{},{edges:P(o)}),this.triggerDataChange()}triggerDataChange(){var{rootId:e,nodes:t}=this.data,n="custom-template"===t.find(t=>t.$$uid===e).type;this.relatedNodesBasedOnEventsMap=function(e,t){var n=new Map,o=new Map,r=new Map;for(var i of e){for(var a of(n.set(i.$$uid,{upstreamNodes:new Set,downstreamNodes:new Set}),i.$$matchedSelectors))o.get(a)||o.set(a,i.$$uid);t&&i.ref&&r.set(i.ref,i.$$uid)}for(var d of e){var s=[];Object(l.isEmpty)(d.$$parsedEvents)||(s=Object.values(d.$$parsedEvents).flat()),Object(l.isEmpty)(d.$$parsedLifeCycle)||(s=s.concat(Object.entries(d.$$parsedLifeCycle).flatMap(([e,t])=>{switch(e){case"onBeforePageLoad":case"onPageLoad":case"onPageLeave":case"onBeforePageLeave":case"onAnchorLoad":case"onAnchorUnload":case"onMessageClose":return t;case"onMessage":return[].concat(t).flatMap(e=>[].concat(e.handlers));default:return console.warn("unknown lifeCycle: ".concat(e)),[]}}))),s.length>0&&B(d,s,n,o,r)}return n}(t,n),this.eventTarget.dispatchEvent(new CustomEvent(U.DATA_CHANGE))}nodeAdd(e){var{rootId:t,nodes:n,edges:o}=this.data,{nodeUid:r,parentUid:i,nodeUids:d,nodeData:s}=e,{nodes:u,edges:p}=R(Object(l.omit)(s,["parent"]),r,this.templateSourceMap,this.storyList),c={rootId:t,nodes:n.concat(u),edges:o.concat({parent:i,child:r,mountPoint:s.mountPoint,sort:void 0,$$isTemplateDelegated:M(n,i)}).concat(p)};this.data=a()(a()({},c),{},{edges:_(c,{parentUid:i,nodeUids:d})}),this.triggerDataChange(),this.eventTarget.dispatchEvent(new CustomEvent(U.NODE_ADD,{detail:e}))}nodeAddStored(e){var{rootId:t,nodes:n,edges:o}=this.data,{nodeUid:r,nodeData:i}=e;this.data={rootId:t,nodes:n.map(e=>e.$$uid===r?a()(a()({},e),{},{id:i.id,instanceId:i.instanceId}):e),edges:o},this.triggerDataChange()}snippetApply(e){var{rootId:t,nodes:n,edges:o}=this.data,{nodeDetails:r,parentUid:i,nodeUids:d}=e,s=n.slice(),u=o.slice(),p=({parentUid:e,nodeUid:t,nodeData:n,children:o})=>{var{nodes:r,edges:i}=R(Object(l.omit)(n,["parent"]),t,this.templateSourceMap,this.storyList);for(var a of(s.push(...r),u.push({parent:e,child:t,mountPoint:n.mountPoint,sort:n.sort,$$isTemplateDelegated:M(s,e)},...i),o))p(a)};for(var c of r)p(c);var g={rootId:t,nodes:s,edges:u};this.data=a()(a()({},g),{},{edges:_(g,{parentUid:i,nodeUids:d})}),this.triggerDataChange(),this.eventTarget.dispatchEvent(new CustomEvent(U.SNIPPET_APPLY,{detail:e}))}snippetApplyStored(e){var{rootId:t,nodes:n,edges:o}=this.data,{flattenNodeDetails:r}=e;this.data={rootId:t,nodes:n.map(e=>{var t=r.find(t=>t.nodeUid===e.$$uid);return t?a()(a()({},e),{},{id:t.nodeData.id,instanceId:t.nodeData.instanceId}):e}),edges:o},this.triggerDataChange()}nodeMove(e){var{rootId:t,nodes:n,edges:o}=this.data,{nodeUid:r,parentUid:i,nodeUids:d,nodeData:s}=e,l={rootId:t,nodes:n,edges:o.filter(e=>e.child!==r).concat({parent:i,child:r,mountPoint:s.mountPoint,sort:void 0,$$isTemplateDelegated:M(n,i)})};this.data=a()(a()({},l),{},{edges:_(l,{parentUid:i,nodeUids:d})}),this.triggerDataChange(),this.eventTarget.dispatchEvent(new CustomEvent(U.NODE_MOVE,{detail:e}))}contextUpdated(e){var{rootId:t,nodes:n,edges:o}=this.data;this.data={rootId:t,edges:o,nodes:n.map(n=>n.$$uid===t?a()(a()({},n),{},{context:e.context}):n)},this.triggerDataChange()}nodeReorder(e){var{nodeUids:t,parentUid:n}=e;this.data=a()(a()({},this.data),{},{edges:_(this.data,{parentUid:n,nodeUids:t})}),this.triggerDataChange(),this.eventTarget.dispatchEvent(new CustomEvent(U.NODE_REORDER,{detail:e}))}nodeDelete(e){this.data=w(e.$$uid,this.data),this.triggerDataChange()}nodeClick(e){this.eventTarget.dispatchEvent(new CustomEvent(U.NODE_CLICK,{detail:e}))}contextMenuChange(e){this.contextMenuStatus=e,this.eventTarget.dispatchEvent(new CustomEvent(U.CONTEXT_MENU_CHANGE))}onDataChange(e){return this.eventTarget.addEventListener(U.DATA_CHANGE,e),()=>{this.eventTarget.removeEventListener(U.DATA_CHANGE,e)}}onNodeAdd(e){return this.eventTarget.addEventListener(U.NODE_ADD,e),()=>{this.eventTarget.removeEventListener(U.NODE_ADD,e)}}onSnippetApply(e){return this.eventTarget.addEventListener(U.SNIPPET_APPLY,e),()=>{this.eventTarget.removeEventListener(U.SNIPPET_APPLY,e)}}onNodeReorder(e){return this.eventTarget.addEventListener(U.NODE_REORDER,e),()=>{this.eventTarget.removeEventListener(U.NODE_REORDER,e)}}onNodeMove(e){return this.eventTarget.addEventListener(U.NODE_MOVE,e),()=>{this.eventTarget.removeEventListener(U.NODE_MOVE,e)}}onNodeClick(e){return this.eventTarget.addEventListener(U.NODE_CLICK,e),()=>{this.eventTarget.removeEventListener(U.NODE_CLICK,e)}}onContextMenuChange(e){return this.eventTarget.addEventListener(U.CONTEXT_MENU_CHANGE,e),()=>{this.eventTarget.removeEventListener(U.CONTEXT_MENU_CHANGE,e)}}setShowRelatedNodesBasedOnEvents(e){this.showRelatedNodesBasedOnEvents=e,this.eventTarget.dispatchEvent(new CustomEvent(U.SHOW_RELATED_NODES_BASED_ON_EVENTS))}getShowRelatedNodesBasedOnEvents(){return this.showRelatedNodesBasedOnEvents}onShowRelatedNodesBasedOnEventsChange(e){return this.eventTarget.addEventListener(U.SHOW_RELATED_NODES_BASED_ON_EVENTS,e),()=>{this.eventTarget.removeEventListener(U.SHOW_RELATED_NODES_BASED_ON_EVENTS,e)}}setHoverNodeUid(e){this.hoverNodeUid!==e&&(this.hoverNodeUid=e,this.eventTarget.dispatchEvent(new CustomEvent(U.HOVER_NODE_CHANGE)))}getHoverNodeUid(){return this.hoverNodeUid}onHoverNodeChange(e){return this.eventTarget.addEventListener(U.HOVER_NODE_CHANGE,e),()=>{this.eventTarget.removeEventListener(U.HOVER_NODE_CHANGE,e)}}toggleOutline(e){this.outlineDisabledNodes.has(e)?this.outlineDisabledNodes.delete(e):this.outlineDisabledNodes.add(e),this.localJsonStorage.setItem("builder-outline-disabled-nodes",Array.from(this.outlineDisabledNodes)),this.eventTarget.dispatchEvent(new CustomEvent(U.OUTLINE_DISABLED_NODES_CHANGE))}isOutlineEnabled(e){return!this.outlineDisabledNodes.has(e)}onOutlineEnabledNodesChange(e){return this.eventTarget.addEventListener(U.OUTLINE_DISABLED_NODES_CHANGE,e),()=>{this.eventTarget.removeEventListener(U.OUTLINE_DISABLED_NODES_CHANGE,e)}}setHighlightNodes(e){this.highlightNodes=e,this.eventTarget.dispatchEvent(new CustomEvent(U.HIGHLIGHT_NODES_CHANGE))}getHighlightNodes(){return this.highlightNodes}onHighlightNodesChange(e){return this.eventTarget.addEventListener(U.HIGHLIGHT_NODES_CHANGE,e),()=>{this.eventTarget.removeEventListener(U.HIGHLIGHT_NODES_CHANGE,e)}}updateDroppingStatus(e,t,n){var o=this.droppingStatus.get(e);this.droppingStatus=new Map(Array.from(this.droppingStatus.entries()).concat([[e,new Map((o?Array.from(o):[]).concat([[t,n]]))]])),this.eventTarget.dispatchEvent(new CustomEvent(U.DROPPING_STATUS_CHANGE)),this.hoverNodeUid&&Array.from(this.droppingStatus.values()).flatMap(e=>Array.from(e.values())).some(Boolean)&&this.setHoverNodeUid(void 0)}getDroppingStatus(){return this.droppingStatus}onDroppingStatusChange(e){return this.eventTarget.addEventListener(U.DROPPING_STATUS_CHANGE,e),()=>{this.eventTarget.removeEventListener(U.DROPPING_STATUS_CHANGE,e)}}}var q=r.a.createContext({});function G(){var{manager:e}=r.a.useContext(q);if(!e)throw new Error("Expected builder data context");return e}function V(){var e=G(),[t,n]=Object(o.useState)(e.getData());return Object(o.useEffect)(()=>e.onDataChange(()=>{n(e.getData())}),[e]),t}function X({nodeUid:e,isRoot:t}){var{rootId:n,nodes:r}=V(),i=t?n:e;return Object(o.useMemo)(()=>r.find(e=>e.$$uid===i),[r,i])}function z(){var e=G(),[t,n]=Object(o.useState)(e.getContextMenuStatus());return Object(o.useEffect)(()=>e.onContextMenuChange(()=>{n(e.getContextMenuStatus())}),[e]),t}function Y(){var e=G(),[t,n]=Object(o.useState)(e.getShowRelatedNodesBasedOnEvents());return Object(o.useEffect)(()=>e.onShowRelatedNodesBasedOnEventsChange(()=>{n(e.getShowRelatedNodesBasedOnEvents())}),[e]),t}function Q(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var o=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css","top"===n&&o.firstChild?o.insertBefore(r,o.firstChild):o.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}}var K={editorContainer:"EditorContainer--editorContainer--1j8iqnx",nodeAlias:"EditorContainer--nodeAlias--1j8iqnx",highlight:"EditorContainer--highlight--1j8iqnx",hover:"EditorContainer--hover--1j8iqnx",active:"EditorContainer--active--1j8iqnx",dropping:"EditorContainer--dropping--1j8iqnx",editorBody:"EditorContainer--editorBody--1j8iqnx",transparentContainer:"EditorContainer--transparentContainer--1j8iqnx",isUpstreamNode:"EditorContainer--isUpstreamNode--1j8iqnx",isDownstreamNode:"EditorContainer--isDownstreamNode--1j8iqnx",arrow:"EditorContainer--arrow--1j8iqnx"};function F(e,t){for(var n=e;n;){if(n===t)return!0;if(n.classList.contains(K.editorContainer)&&!n.classList.contains(K.isTemplateInternalNode))return!1;n=n.parentElement}return!1}function J(){var e=G(),[t,n]=Object(o.useState)(e.getHoverNodeUid());return Object(o.useEffect)(()=>e.onHoverNodeChange(()=>{n(e.getHoverNodeUid())}),[e]),t}function W(){var e=G(),[t,n]=Object(o.useState)(e.getHighlightNodes());return Object(o.useEffect)(()=>e.onHighlightNodesChange(()=>{n(e.getHighlightNodes())}),[e]),t}function ee(){var e=G(),[t,n]=Object(o.useState)(e.getDroppingStatus());return Object(o.useEffect)(()=>e.onDroppingStatusChange(()=>{n(e.getDroppingStatus())}),[e]),t}function te({nodeUid:e,type:t,isTransparentContainer:n,editorContainerStyle:i,editorBodyStyle:a,children:d}){var s,l,u=Object(o.useRef)(),p=W(),g=X({nodeUid:e}),[v,h]=Object(o.useState)(!1),[m,f]=Object(o.useState)(!1),E=z(),C=J(),b=Y(),N=G(),[D,y]=Object(o.useState)(C===e),O=null!=t?t:c.DEFAULT,x=Object(o.useRef)(C),T=ee();Object(o.useEffect)(()=>{x.current=C},[C]);var $=Object(o.useCallback)(t=>{t.stopPropagation(),y(!0),x.current!==e&&N.setHoverNodeUid(e)},[e,N]),S=Object(o.useCallback)(t=>{t.stopPropagation(),y(!1),x.current===e&&N.setHoverNodeUid(void 0)},[e,N]);Object(o.useEffect)(()=>{if(!g.$$isTemplateInternalNode){var e=u.current;return e.addEventListener("mouseover",$),e.addEventListener("mouseout",S),()=>{e.removeEventListener("mouseover",$),e.removeEventListener("mouseout",S)}}},[$,S,g]),Object(o.useEffect)(()=>{if(!g.$$isTemplateInternalNode&&(y(C===e),b)){var t,n,o=N.getRelatedNodesBasedOnEventsMap(),r=null===(t=o.get(C))||void 0===t?void 0:t.upstreamNodes.has(e);h(r);var i=null===(n=o.get(C))||void 0===n?void 0:n.downstreamNodes.has(e);f(i)}},[C,g,e,b,N]);var k=Object(o.useCallback)(e=>!g.$$isTemplateInternalNode&&F(e.target,u.current),[g]),L=Object(o.useCallback)(e=>{k(e)&&N.nodeClick(g)},[k,N,g]),j=Object(o.useCallback)(e=>{k(e)&&(e.preventDefault(),N.contextMenuChange({active:!0,node:g,x:e.clientX,y:e.clientY}))},[k,N,g]);return r.a.createElement("div",{className:I(K.editorContainer,K[O],{[K.transparentContainer]:n,[K.dropping]:Array.from(null!==(s=null===(l=T.get(e))||void 0===l?void 0:l.values())&&void 0!==s?s:[]).some(Boolean),[K.hover]:D,[K.active]:E.active&&E.node.$$uid===e,[K.isDownstreamNode]:!D&&m,[K.isUpstreamNode]:!D&&v,[K.highlight]:p.has(e),[K.isTemplateInternalNode]:g.$$isTemplateInternalNode}),style:i,ref:u,onClick:L,onContextMenu:j},r.a.createElement("div",{className:K.nodeAlias},!D&&(m?r.a.createElement("span",{className:K.arrow},"↓"):v?r.a.createElement("span",{className:K.arrow},"↑"):null),g.alias||g.brick),r.a.createElement("div",{className:K.editorBody,style:a},d))}Q(".EditorContainer--editorContainer--1j8iqnx {\n position: relative;\n}\n\n.EditorContainer--nodeAlias--1j8iqnx {\n position: absolute;\n top: -25px;\n height: calc(25px + var(--editor-brick-border-radius));\n background-color: #d6d6d6;\n border: 1px solid var(--editor-brick-stroke-color);\n padding: 0 5px;\n border-radius: 2px;\n color: #737373;\n white-space: nowrap;\n visibility: hidden;\n pointer-events: none;\n}\n\n.EditorContainer--editorContainer--1j8iqnx.EditorContainer--highlight--1j8iqnx > .EditorContainer--nodeAlias--1j8iqnx,\n.EditorContainer--editorContainer--1j8iqnx.EditorContainer--hover--1j8iqnx > .EditorContainer--nodeAlias--1j8iqnx,\n.EditorContainer--editorContainer--1j8iqnx.EditorContainer--active--1j8iqnx > .EditorContainer--nodeAlias--1j8iqnx,\n.EditorContainer--editorContainer--1j8iqnx.EditorContainer--dropping--1j8iqnx > .EditorContainer--nodeAlias--1j8iqnx {\n visibility: visible;\n}\n\n.EditorContainer--editorBody--1j8iqnx {\n position: relative;\n border-radius: var(--editor-brick-border-radius);\n background: #fff;\n}\n\n.EditorContainer--transparentContainer--1j8iqnx > .EditorContainer--editorBody--1j8iqnx {\n margin: -1px;\n}\n\n.EditorContainer--transparentContainer--1j8iqnx > .EditorContainer--nodeAlias--1j8iqnx {\n left: -1px;\n}\n\n.EditorContainer--nodeAlias--1j8iqnx,\n.EditorContainer--editorContainer--1j8iqnx.EditorContainer--hover--1j8iqnx > .EditorContainer--editorBody--1j8iqnx,\n.EditorContainer--editorContainer--1j8iqnx.EditorContainer--active--1j8iqnx > .EditorContainer--editorBody--1j8iqnx,\n.EditorContainer--editorContainer--1j8iqnx.EditorContainer--dropping--1j8iqnx > .EditorContainer--editorBody--1j8iqnx {\n box-shadow: 0 0 0 1px var(--editor-brick-stroke-color-active);\n}\n\n.EditorContainer--editorContainer--1j8iqnx.EditorContainer--isUpstreamNode--1j8iqnx > .EditorContainer--nodeAlias--1j8iqnx,\n.EditorContainer--editorContainer--1j8iqnx.EditorContainer--isDownstreamNode--1j8iqnx > .EditorContainer--nodeAlias--1j8iqnx {\n visibility: visible;\n background-color: #f7f7f7;\n}\n\n.EditorContainer--editorContainer--1j8iqnx.EditorContainer--isDownstreamNode--1j8iqnx > .EditorContainer--editorBody--1j8iqnx,\n.EditorContainer--editorContainer--1j8iqnx.EditorContainer--isDownstreamNode--1j8iqnx > .EditorContainer--nodeAlias--1j8iqnx {\n box-shadow: 0 0 0 1px rgba(22, 224, 57, 0.3);\n}\n\n.EditorContainer--editorContainer--1j8iqnx.EditorContainer--isUpstreamNode--1j8iqnx > .EditorContainer--editorBody--1j8iqnx,\n.EditorContainer--editorContainer--1j8iqnx.EditorContainer--isUpstreamNode--1j8iqnx > .EditorContainer--nodeAlias--1j8iqnx {\n box-shadow: 0 0 0 1px rgba(224, 88, 22, 0.3);\n}\n\n.EditorContainer--editorContainer--1j8iqnx.EditorContainer--highlight--1j8iqnx > .EditorContainer--editorBody--1j8iqnx,\n.EditorContainer--editorContainer--1j8iqnx.EditorContainer--highlight--1j8iqnx > .EditorContainer--nodeAlias--1j8iqnx {\n box-shadow: 0 0 0 1px var(--theme-orange-color);\n}\n\n.EditorContainer--arrow--1j8iqnx {\n font-size: 10px;\n padding: 0 4px;\n position: relative;\n bottom: 1px;\n}\n");function ne(){return(ne=C()((function*(e,t){var n=[];if(Object(u.isRouteNode)(e))n.push("basic-bricks.any-route--editor");else{if(!Object(u.isBrickNode)(e))throw new Error("Unsupported node type: ".concat(e.type));e.brick.includes("-")&&n.push("".concat(e.brick,"--editor")),t&&n.push(t),n.push("basic-bricks.any-brick--editor")}for(var o of n){try{yield b.developHelper.loadEditorBricks([o])}catch(e){throw new Error('Load editor brick "'.concat(o,'" failed'))}if(customElements.get(o))return o}throw new Error('Editor brick "'.concat(n.join(", "),'" not found'))}))).apply(this,arguments)}var oe="EditorBrickAsComponent--slotContentLayoutBlock--1aed4lu",re="EditorBrickAsComponent--selfLayoutBlock--1aed4lu",ie="EditorBrickAsComponent--selfLayoutContainer--1aed4lu",ae="EditorBrickAsComponent--slotContentLayoutInline--1aed4lu",de="EditorBrickAsComponent--selfLayoutInline--1aed4lu",se="EditorBrickAsComponent--dragging--1aed4lu",le="EditorBrickAsComponent--baseView--1aed4lu";function ue({node:e,slotContentLayout:t}){var n,[i,a]=r.a.useState(!1),[d,s]=r.a.useState(),[l,c]=r.a.useState(),{edges:h}=V(),m=(n=G(),Object(o.useMemo)(()=>n.getStoryList(),[n])),E=r.a.useMemo(()=>h.some(t=>t.parent===e.$$uid),[e,h]),N=Object(o.useMemo)(()=>Object(b.getRuntime)().getFeatureFlags()["next-builder-installed-bricks"],[]),D=Object(o.useMemo)(()=>N?null:function(e,t){var n=null==t?void 0:t.find(t=>t.storyId===e.brick);return null==n?void 0:n.doc}(e,m),[N,e,m]),y=function(){var e=G(),t=Object(o.useCallback)(()=>new Map(e.getSharedEditorList().map(e=>[e.id,e])),[e]),[n,r]=Object(o.useState)(t());return Object(o.useEffect)(()=>e.onSharedEditorListChange(()=>{r(t())}),[t,e]),n}(),O=Object(o.useMemo)(()=>N&&Object(u.isBrickNode)(e)?y.get(e.brick):null,[y,N,e]);r.a.useEffect(()=>{C()((function*(){var t,n;a(!1);try{t=yield function(e,t){return ne.apply(this,arguments)}(e,N?null==O?void 0:O.editor:null==D?void 0:D.editor)}catch(e){console.error(e),n=e.message}s(t),c(n),a(!0)}))()},[D,O,N,e]);var x=r.a.useMemo(()=>({brick:d,properties:{nodeUid:e.$$uid,editorProps:N?null==O?void 0:O.editorProps:null==D?void 0:D.editorProps}}),[D,d,O,N,e.$$uid]),T=r.a.useMemo(()=>{var e,t;i&&d&&(t=customElements.get(d).selfLayout);return null!==(e=t)&&void 0!==e?e:E?g.CONTAINER:g.INLINE},[i,d,E]),[{isDragging:$},S]=Object(f.useDrag)({item:{type:p.NODE_TO_MOVE,nodeUid:e.$$uid,nodeInstanceId:e.instanceId,nodeId:e.id},options:{dropEffect:"move"},collect:e=>({isDragging:e.isDragging()})});return i?d?r.a.createElement("div",{className:I({[oe]:t===v.BLOCK,[ae]:t===v.INLINE,[de]:T===g.INLINE,[re]:T===g.BLOCK,[ie]:T===g.CONTAINER,[se]:$,__isTemplateInternalNode:e.$$isTemplateInternalNode})},r.a.createElement("div",{ref:e.$$isTemplateInternalNode?void 0:S,draggable:!e.$$isTemplateInternalNode,className:I({[le]:"basic-bricks.micro-view"===e.brick||"basic-bricks.micro-app"===e.brick||"basic-bricks.easy-view"===e.brick})},r.a.createElement(b.BrickAsComponent,{useBrick:x}))):r.a.createElement("span",null,l):r.a.createElement("span",null,"Loading...")}function pe({nodeUid:e,isRoot:t,doNotExpandTemplates:n}){var{rootId:r,nodes:i,edges:a}=V();return Object(o.useMemo)(()=>ce({nodes:i,edges:a,nodeUid:t?r:e,doNotExpandTemplates:n}),[n,a,t,e,i,r])}function ce({nodeUid:e,nodes:t,edges:n,doNotExpandTemplates:o}){var r=new Map,i=Object(l.sortBy)(n.filter(t=>t.parent===e&&(o?!t.$$isTemplateInternal:!t.$$isTemplateDelegated)),[e=>e.sort]),a=function(e){var n=t.find(t=>t.$$uid===e.child);r.has(e.mountPoint)?r.get(e.mountPoint).push(n):r.set(e.mountPoint,[n])};for(var d of i)a(d);return Array.from(r.entries()).map(([e,t])=>({mountPoint:e,childNodes:t}))}function ge(){var{edges:e}=V();return Object(o.useCallback)((t,n)=>{var o=t=>t!==n&&!e.some(e=>e.parent===t&&!o(e.child));return o(t)},[e])}Q(".EditorBrickAsComponent--slotContentLayoutBlock--1aed4lu.EditorBrickAsComponent--selfLayoutBlock--1aed4lu,\n.EditorBrickAsComponent--slotContentLayoutBlock--1aed4lu.EditorBrickAsComponent--selfLayoutContainer--1aed4lu {\n grid-column: 1 / -1;\n}\n\n.EditorBrickAsComponent--slotContentLayoutInline--1aed4lu {\n margin: 0 var(--editor-brick-gap-half);\n}\n\n.EditorBrickAsComponent--slotContentLayoutInline--1aed4lu.EditorBrickAsComponent--selfLayoutInline--1aed4lu,\n.EditorBrickAsComponent--slotContentLayoutInline--1aed4lu.EditorBrickAsComponent--selfLayoutBlock--1aed4lu {\n width: 150px;\n}\n\n.EditorBrickAsComponent--slotContentLayoutInline--1aed4lu.EditorBrickAsComponent--selfLayoutContainer--1aed4lu {\n width: 100%;\n}\n\n.EditorBrickAsComponent--dragging--1aed4lu {\n opacity: 0.3;\n}\n\n.EditorBrickAsComponent--baseView--1aed4lu {\n height: 100%;\n min-height: 100%;\n}\n");function ve(e,t,n,o){var r=function(e,t){var n=e.getBoundingClientRect(),o=[],r=Array.from(t.children).filter(e=>!e.classList.contains("__isTemplateInternalNode"));if(r.length>0){var i={cells:[]},d=[i];r.forEach((e,t)=>{var n,o,r=e.getBoundingClientRect(),a={index:t,top:r.top,bottom:r.bottom,left:r.left,right:r.right},s=i.cells.length>0&&i.cells[i.cells.length-1];!s||he(r.left,s.right)>0&&he(r.top,s.bottom)<0?(i.cells.push(a),i.top=Math.min(null!==(n=i.top)&&void 0!==n?n:1/0,r.top),i.bottom=Math.max(null!==(o=i.bottom)&&void 0!==o?o:-1/0,r.bottom)):(i={cells:[a],top:r.top,bottom:r.bottom},d.push(i))});var s=n.top,l=n.top;d.forEach((e,t)=>{if(1===e.cells.length){var r=e.cells[0],i=(r.top+r.bottom)/2;if(o.push({rect:{top:s,bottom:i,left:n.left,right:n.right},cursor:{index:r.index,y:(l+r.top)/2-n.top}}),s=i,l=r.bottom,t===d.length-1)o.push({rect:{top:s,bottom:n.bottom,left:n.left,right:n.right},cursor:{index:r.index+1,y:Math.min(r.bottom+6,(r.bottom+n.bottom)/2)-n.top}});else if(d[t+1].cells.length>1){var u=d[t+1],p=(r.bottom+u.top)/2;o.push({rect:{top:s,bottom:p,left:n.left,right:n.right},cursor:{index:r.index+1,y:p-n.top}}),s=p}}else{var c=n.left,g=n.left,v=t<d.length-1?(d[t+1].top+e.bottom)/2:n.bottom,h={isVertical:!0,y:e.top-n.top,height:e.bottom-e.top};e.cells.forEach((r,i)=>{var l=(r.left+r.right)/2;o.push({rect:{top:s,bottom:v,left:c,right:l},cursor:a()(a()({},h),{},{index:r.index,x:(g+r.left)/2-n.left})}),c=l,g=r.right,i===e.cells.length-1&&(t===d.length-1?o.push({rect:{top:s,bottom:n.bottom,left:c,right:n.right},cursor:a()(a()({},h),{},{index:r.index+1,x:Math.min(g+6,n.right)-n.left})}):o.push({rect:{top:s,bottom:v,left:c,right:n.right},cursor:a()(a()({},h),{},{index:r.index+1,x:Math.min(g+6,n.right)-n.left})}))}),s=v,l=e.bottom}})}return o}(n,o);for(var{rect:i,cursor:d}of r)if(e>=i.left&&e<=i.right&&t>=i.top&&t<=i.bottom)return d;return{index:0,y:5}}function he(e,t){var n=e-t;return Math.abs(n)<1?0:n}function me(e){var{draggingNodeUid:t,draggingNodeId:n,draggingIndex:o,droppingMountPoint:r,droppingSiblingGroups:i,droppingIndex:a}=e,d=Array.isArray(t)?t:[t],s=i.flatMap(e=>e.childNodes),l=i.flatMap(e=>{var t=e.childNodes.map(e=>e.$$uid).filter(e=>!d.includes(e));return e.mountPoint===r&&t.splice((null!=o?o:-1)>=0&&a>o?a-1:a,0,...d),t}),u=l.map(e=>d.includes(e)?n:s.find(t=>t.$$uid===e).id);return{nodeUids:l,nodeIds:u}}var fe=["properties","events","lifeCycle","params","if","transform"],Ee=["permissionsPreCheck","transformFrom"],Ce=["brick","template","portal","slots","id","children","instanceId"];function be(e,t){return Object.fromEntries(Object.entries(e).map(([e,t])=>void 0===t||Ce.includes(e)?void 0:fe.includes(e)?[e,JSON.stringify(t)]:Ee.includes(e)?[e,D.a.safeDump(t)]:[e,t]).filter(Boolean).concat(Object.entries(t.nodeData),[["brick","template"===t.nodeData.type?e.template:e.brick],["portal",t.isPortalCanvas||e.portal]]))}function Ne({manager:e,type:t,data:n,droppingIndex:o,droppingParentUid:r,droppingParentInstanceId:i,droppingMountPoint:d,droppingChildNodes:s,droppingSiblingGroups:l,isPortalCanvas:u}){if(t===p.NODE_TO_ADD){var{brickType:c="brick",brick:g}=n,v=A();e.nodeAdd(a()(a()({},me({draggingNodeUid:v,draggingNodeId:null,droppingIndex:o,droppingMountPoint:d,droppingSiblingGroups:l})),{},{nodeUid:v,parentUid:r,nodeData:{parent:i,type:c,brick:g,mountPoint:d,bg:!u&&"provider"===c||void 0,portal:u}}))}else if(t===p.SNIPPET_TO_APPLY){var{bricks:h}=n,m=[...new Array(h.length)].map(()=>A());e.snippetApply(a()(a()({},me({draggingNodeUid:m,draggingNodeId:null,droppingIndex:o,droppingMountPoint:d,droppingSiblingGroups:l})),{},{parentUid:r,nodeDetails:h.map((e,t)=>function e({parent:t,parentUid:n,mountPoint:o,nodeUid:r,brickConf:i,isPortalCanvas:a,sort:d}){var s=i.template?"template":i.bg?"provider":"brick";return{nodeUid:r,parentUid:n,nodeData:be(i,{isPortalCanvas:a,nodeData:{type:s,parent:t,mountPoint:o,sort:d}}),children:i.slots?Object.entries(i.slots).flatMap(([e,t])=>t.bricks.map(t=>({childBrickConf:t,mountPoint:e}))).map(({childBrickConf:t,mountPoint:n},o)=>e({parentUid:r,mountPoint:n,nodeUid:A(),brickConf:t,sort:o})):[]}}({parent:i,parentUid:r,mountPoint:d,nodeUid:m[t],brickConf:e,isPortalCanvas:u}))}))}else if(t===p.NODE_TO_MOVE){var{nodeUid:f,nodeId:E,nodeInstanceId:C}=n,b=s.findIndex(e=>e.$$uid===f);b>=0?o!==b&&o!==b+1&&e.nodeReorder(a()(a()({},me({draggingNodeUid:f,draggingNodeId:E,draggingIndex:b,droppingIndex:o,droppingMountPoint:d,droppingSiblingGroups:l})),{},{parentUid:r})):e.nodeMove(a()(a()({},me({draggingNodeUid:f,draggingNodeId:E,droppingIndex:o,droppingMountPoint:d,droppingSiblingGroups:l})),{},{nodeUid:f,parentUid:r,nodeInstanceId:C,nodeData:{parent:i,mountPoint:d}}))}}function De(e){return Object(o.useMemo)(()=>{var t=[],n=[];for(var o of e)o.portal?n.push([o]):t.push(o);return[t,...n,[]]},[e])}var ye={dropZone:"DropZone--dropZone--sngiml",isSlot:"DropZone--isSlot--sngiml",dropping:"DropZone--dropping--sngiml",showOutlineIfEmpty:"DropZone--showOutlineIfEmpty--sngiml",isRoot:"DropZone--isRoot--sngiml",dropZoneBody:"DropZone--dropZoneBody--sngiml",active:"DropZone--active--sngiml",isPortalCanvas:"DropZone--isPortalCanvas--sngiml",fullscreen:"DropZone--fullscreen--sngiml",hasTabs:"DropZone--hasTabs--sngiml",slotContentLayoutBlock:"DropZone--slotContentLayoutBlock--sngiml",slotContentLayoutInline:"DropZone--slotContentLayoutInline--sngiml",slotContentLayoutGrid:"DropZone--slotContentLayoutGrid--sngiml","mode-dialog":"DropZone--mode-dialog--sngiml","mode-large":"DropZone--mode-large--sngiml","mode-small":"DropZone--mode-small--sngiml","mode-drawer":"DropZone--mode-drawer--sngiml",dropCursor:"DropZone--dropCursor--sngiml",dropCursorHorizontal:"DropZone--dropCursorHorizontal--sngiml",dropCursorVertical:"DropZone--dropCursorVertical--sngiml"};Q('.DropZone--dropZone--sngiml {\n position: relative;\n min-height: calc(var(--editor-brick-base-height) + 2px);\n border-radius: var(--editor-brick-border-radius);\n\n --drop-zone-padding: 20px;\n}\n\n.DropZone--isSlot--sngiml {\n border: 1px dashed transparent;\n}\n\n.DropZone--isSlot--sngiml.DropZone--dropping--sngiml {\n background: var(--editor-brick-slot-bg);\n border-color: var(--editor-brick-slot-stroke-color);\n}\n\n.DropZone--showOutlineIfEmpty--sngiml:not(.DropZone--dropping--sngiml) {\n background: var(--editor-brick-skeleton-bg-light);\n}\n\n.DropZone--isRoot--sngiml > .DropZone--dropZoneBody--sngiml {\n padding: calc(var(--drop-zone-padding) + 7px) var(--drop-zone-padding)\n var(--drop-zone-padding);\n}\n\n.DropZone--isRoot--sngiml.DropZone--active--sngiml,\n.DropZone--isRoot--sngiml.DropZone--dropping--sngiml {\n box-shadow: 0 0 0 1px var(--editor-brick-stroke-color-active);\n}\n\n.DropZone--isPortalCanvas--sngiml,\n.DropZone--isRoot--sngiml:not(.DropZone--isPortalCanvas--sngiml) > .DropZone--dropZoneBody--sngiml {\n height: calc(\n 100vh - 148px - var(--editor-brick-toolbar-height) - var(--page-card-gap)\n );\n overflow-y: auto;\n}\n\n.DropZone--fullscreen--sngiml.DropZone--isPortalCanvas--sngiml,\n.DropZone--fullscreen--sngiml:not(.DropZone--isPortalCanvas--sngiml) > .DropZone--dropZoneBody--sngiml {\n height: calc(\n 100vh - var(--editor-brick-overlay-padding) * 2 - var(--page-card-gap) * 2 -\n var(--editor-brick-toolbar-height)\n );\n}\n\n.DropZone--hasTabs--sngiml.DropZone--isPortalCanvas--sngiml,\n.DropZone--hasTabs--sngiml.DropZone--isRoot--sngiml:not(.DropZone--isPortalCanvas--sngiml) > .DropZone--dropZoneBody--sngiml {\n height: calc(\n 100vh - 158px - var(--editor-brick-toolbar-height) - var(--page-card-gap)\n );\n overflow-y: auto;\n}\n\n.DropZone--hasTabs--sngiml.DropZone--fullscreen--sngiml.DropZone--isPortalCanvas--sngiml,\n.DropZone--hasTabs--sngiml.DropZone--fullscreen--sngiml:not(.DropZone--isPortalCanvas--sngiml) > .DropZone--dropZoneBody--sngiml {\n height: calc(\n 100vh - var(--editor-brick-overlay-padding) * 2 - var(--page-card-gap) * 2 -\n 10px - var(--editor-brick-toolbar-height)\n );\n}\n\n.DropZone--slotContentLayoutBlock--sngiml > .DropZone--dropZoneBody--sngiml {\n display: grid;\n grid-gap: var(--editor-brick-gap);\n grid-template-columns: repeat(\n auto-fill,\n minmax(var(--editor-brick-inline-width), 1fr)\n );\n}\n\n.DropZone--slotContentLayoutInline--sngiml > .DropZone--dropZoneBody--sngiml {\n display: flex;\n flex-wrap: wrap;\n margin: 0 calc(var(--editor-brick-gap-half) * -1);\n}\n\n.DropZone--slotContentLayoutGrid--sngiml > .DropZone--dropZoneBody--sngiml {\n display: grid;\n grid-gap: var(--editor-brick-gap);\n grid-template-columns: repeat(\n auto-fill,\n minmax(var(--editor-brick-grid-width), 1fr)\n );\n}\n\n.DropZone--mode-dialog--sngiml > .DropZone--dropZoneBody--sngiml {\n margin: 0 auto;\n max-width: calc(600px + var(--drop-zone-padding) * 2);\n}\n\n.DropZone--mode-dialog--sngiml.DropZone--mode-large--sngiml > .DropZone--dropZoneBody--sngiml {\n max-width: calc(800px + var(--drop-zone-padding) * 2);\n}\n\n.DropZone--mode-dialog--sngiml.DropZone--mode-small--sngiml > .DropZone--dropZoneBody--sngiml {\n max-width: calc(400px + var(--drop-zone-padding) * 2);\n}\n\n.DropZone--mode-drawer--sngiml > .DropZone--dropZoneBody--sngiml {\n margin: 0 auto;\n max-width: calc(900px + var(--drop-zone-padding) * 2);\n}\n\n.DropZone--mode-drawer--sngiml.DropZone--mode-large--sngiml > .DropZone--dropZoneBody--sngiml {\n max-width: calc(1200px + var(--drop-zone-padding) * 2);\n}\n\n.DropZone--mode-drawer--sngiml.DropZone--mode-small--sngiml > .DropZone--dropZoneBody--sngiml {\n max-width: calc(600px + var(--drop-zone-padding) * 2);\n}\n\n.DropZone--dropCursor--sngiml {\n position: absolute;\n background: #bb79bb;\n display: none;\n pointer-events: none;\n}\n\n.DropZone--dropping--sngiml > .DropZone--dropCursor--sngiml {\n display: block;\n}\n\n.DropZone--dropCursorHorizontal--sngiml {\n height: 2px;\n left: 10px;\n right: 10px;\n margin-top: -1px;\n}\n\n.DropZone--dropCursorVertical--sngiml {\n width: 2px;\n margin-left: -1px;\n}\n\n.DropZone--dropCursor--sngiml::before,\n.DropZone--dropCursor--sngiml::after {\n position: absolute;\n content: "";\n background: #bb79bb;\n}\n\n.DropZone--dropCursorHorizontal--sngiml::before,\n.DropZone--dropCursorHorizontal--sngiml::after {\n top: -4px;\n height: 10px;\n width: 2px;\n}\n\n.DropZone--dropCursorHorizontal--sngiml::before {\n left: 0;\n}\n\n.DropZone--dropCursorHorizontal--sngiml::after {\n right: 0;\n}\n\n.DropZone--dropCursorVertical--sngiml::before,\n.DropZone--dropCursorVertical--sngiml::after {\n left: -4px;\n width: 10px;\n height: 2px;\n}\n\n.DropZone--dropCursorVertical--sngiml::before {\n top: 0;\n}\n\n.DropZone--dropCursorVertical--sngiml::after {\n bottom: 0;\n}\n');var Oe=["type"];function xe({nodeUid:e,isRoot:t,separateCanvas:n,isPortalCanvas:o,independentPortalCanvas:i,canvasIndex:d,mountPoint:s,fullscreen:u,delegatedContext:c,dropZoneStyle:g,dropZoneBodyStyle:h,slotContentLayout:E,showOutlineIfEmpty:C}){var b=r.a.useRef(),[N,D]=r.a.useState(null),y=r.a.useRef(),O=z(),x=G(),T=X({nodeUid:e,isRoot:t}),$=pe({nodeUid:e,isRoot:t}),S=i?d>0:o,k=n||i,L=ge(),j=null!=E?E:v.BLOCK,A=r.a.useMemo(()=>{var e,t;return null!==(e=null===(t=$.find(e=>e.mountPoint===s))||void 0===t?void 0:t.childNodes)&&void 0!==e?e:[]},[$,s]),P=De(A),_=r.a.useMemo(()=>n?A.filter(e=>Boolean(Number(Boolean(o))^Number(!e.portal))):i?P[Object(l.clamp)(null!=d?d:0,0,P.length-1)]:A,[d,i,o,A,P,n]),w=r.a.useMemo(()=>{var e;return null===(e=_[0])||void 0===e?void 0:e.$$parsedProperties._canvas_},[_]),B=r.a.useCallback(e=>{if(!k)return e;if(_.length>0){var t=_[0===e?0:e-1];return A.findIndex(e=>e===t)+(0===e?0:1)}return S?A.length:0},[k,_,S,A]),{nodes:U,edges:Z}=V(),R=r.a.useCallback(()=>{if(c){var e,t,n=ce({nodeUid:c.templateUid,nodes:U,edges:Z,doNotExpandTemplates:!0});return{droppingParentUid:c.templateUid,droppingParentInstanceId:U.find(e=>e.$$uid===c.templateUid).instanceId,droppingMountPoint:c.templateMountPoint,droppingChildNodes:null!==(e=null===(t=n.find(e=>e.mountPoint===c.templateMountPoint))||void 0===t?void 0:t.childNodes)&&void 0!==e?e:[],droppingSiblingGroups:n}}return{droppingParentUid:T.$$uid,droppingParentInstanceId:T.instanceId,droppingMountPoint:s,droppingChildNodes:A,droppingSiblingGroups:$}},[c,Z,$,s,T,U,A]),[{isDraggingOverCurrent:M},H]=Object(f.useDrop)({accept:[p.NODE_TO_ADD,p.NODE_TO_MOVE,p.SNIPPET_TO_APPLY],canDrop:n=>i&&S?0===_.length:n.type===p.NODE_TO_ADD||n.type===p.SNIPPET_TO_APPLY||t||L(n.nodeUid,e),collect:e=>({isDraggingOverCurrent:e.isOver({shallow:!0})&&e.canDrop()}),hover:(e,t)=>{if(t.isOver({shallow:!0})&&t.canDrop()){var{x:n,y:o}=t.getClientOffset();y.current=ve(n,o,b.current.parentElement,b.current),D(y.current)}},drop:(e,t)=>{if(!t.didDrop()){var{type:n}=e,o=m()(e,Oe);Ne(a()({type:n,data:o,droppingIndex:B(y.current.index),isPortalCanvas:S,manager:x},R()))}}});r.a.useEffect(()=>{x.updateDroppingStatus(c?c.templateUid:T.$$uid,c?c.templateMountPoint:s,M)},[M,s,x,c,T]);var q=!!c||!(T.$$isExpandableTemplate||T.$$isTemplateInternalNode),Y=r.a.useRef(),Q=r.a.useCallback(e=>{Y.current=e,q&&H(e)},[H,q]),K=r.a.useCallback(e=>{!S&&F(e.target,Y.current)&&(e.preventDefault(),x.contextMenuChange({active:!0,node:T,x:e.clientX,y:e.clientY}))},[S,x,T]);return r.a.createElement("div",{ref:Q,className:I(ye.dropZone,t?I(ye.isRoot,(null==w?void 0:w.mode)&&String(w.mode).split(/\s+/g).map(e=>ye["mode-".concat(e)]),{[ye.fullscreen]:u,[ye.hasTabs]:k}):ye.isSlot,{[ye.isPortalCanvas]:S,[ye.dropping]:M,[ye.active]:t&&O.active&&O.node.$$uid===T.$$uid,[ye.showOutlineIfEmpty]:!t&&C&&0===A.length,[ye.slotContentLayoutBlock]:j===v.BLOCK,[ye.slotContentLayoutInline]:j===v.INLINE,[ye.slotContentLayoutGrid]:j===v.GRID}),style:g,onContextMenu:t?K:null},r.a.createElement("div",{ref:b,className:ye.dropZoneBody,style:h},_.map(e=>r.a.createElement(ue,{key:e.$$uid,node:e,slotContentLayout:j}))),r.a.createElement("div",{className:I(ye.dropCursor,null!=N&&N.isVertical?ye.dropCursorVertical:ye.dropCursorHorizontal),style:{top:null==N?void 0:N.y,left:null==N?void 0:N.x,height:null==N?void 0:N.height}}))}var Te="SlotContainer--slotContainer--ya4ml4",$e="SlotContainer--slotName--ya4ml4",Se="SlotContainer--dropping--ya4ml4";function Ie({nodeUid:e,slotName:t,slotContainerStyle:n,dropZoneStyle:i,dropZoneBodyStyle:a,slotContentLayout:d,showOutlineIfEmpty:s}){var l,u=X({nodeUid:e}),p=ee(),c=Object(o.useMemo)(()=>{var e,n=null===(e=u.$$delegatedSlots)||void 0===e?void 0:e.get(t);return 1===(null==n?void 0:n.length)?n[0]:null},[u,t]);return r.a.createElement("div",{className:I(Te,{[Se]:null===(l=p.get(c?c.templateUid:e))||void 0===l?void 0:l.get(c?c.templateMountPoint:t)}),style:n},r.a.createElement("div",{className:$e},c?c.templateMountPoint:t),r.a.createElement(xe,{nodeUid:e,mountPoint:t,delegatedContext:c,dropZoneStyle:i,dropZoneBodyStyle:a,slotContentLayout:d,showOutlineIfEmpty:s}))}Q(".SlotContainer--slotContainer--ya4ml4 {\n position: relative;\n}\n\n.SlotContainer--slotName--ya4ml4 {\n position: absolute;\n top: -23px;\n height: calc(23px + var(--editor-brick-border-radius));\n line-height: 20px;\n color: var(--text-color-secondary);\n padding: 0 5px;\n border-radius: 2px;\n color: #737373;\n white-space: nowrap;\n visibility: hidden;\n pointer-events: none;\n border: 1px dashed var(--editor-brick-slot-stroke-color);\n background: var(--editor-brick-slot-bg);\n}\n\n.SlotContainer--slotContainer--ya4ml4.SlotContainer--dropping--ya4ml4 > .SlotContainer--slotName--ya4ml4 {\n visibility: visible;\n}\n");var ke=r.a.memo(Pe),Le=Symbol.for("__BRICK_NEXT_BUILDER_CONTEXT_INSTANCE__");function je(){var e=window;return e[Le]||(e[Le]={manager:new H}),e[Le]}var Ae=0;function Pe({children:e}){var t=je();return r.a.useEffect(()=>(Ae++,()=>{0===--Ae&&(window[Le]=null)}),[]),r.a.createElement(q.Provider,{value:t},e)}function _e(e,t){return O()(null,(function(n,o){return{F:class extends o{constructor(...e){super(...e),n(this)}},d:[{kind:"get",static:!0,key:"selfLayout",value:function(){return null==t?void 0:t.selfLayout}},{kind:"field",decorators:[Object(b.property)({type:Number})],key:"nodeUid",value:void 0},{kind:"field",decorators:[Object(b.property)({attribute:!1})],key:"editorProps",value:void 0},{kind:"method",key:"connectedCallback",value:function(){if(this.style.display||(this.style.display="block"),null!=t&&t.brickStyle)for(var[e,n]of Object.entries(t.brickStyle))this.style[e]=n;this._render()}},{kind:"method",key:"disconnectedCallback",value:function(){T.a.unmountComponentAtNode(this)}},{kind:"method",key:"_render",value:function(){this.isConnected&&this.nodeUid&&T.a.render(r.a.createElement(b.BrickWrapper,null,r.a.createElement(ke,null,r.a.createElement(f.DndProvider,{backend:$.HTML5Backend},r.a.createElement(e,{nodeUid:this.nodeUid,editorProps:this.editorProps})))),this)}}]}}),b.UpdatingElement)}var we=Object(o.createContext)({});function Be({nodeUid:e,isRoot:t,doNotExpandTemplates:n}){var{rootId:r,edges:i}=V(),a=t?r:e;return Object(o.useMemo)(()=>{var e=new Set,t=Object(l.sortBy)(i.filter(e=>e.parent===a&&(n?!e.$$isTemplateInternal:!e.$$isTemplateDelegated)),[e=>e.sort]);for(var o of t)e.add(o.mountPoint);return Array.from(e)},[a,i,n])}function Ue(e){var{nodes:t,edges:n}=V();return Object(o.useMemo)(()=>{var o=n.find(t=>t.child===e&&!t.$$isTemplateExpanded).parent;return t.find(e=>e.$$uid===o)},[n,e,t])}function Ze(){var e=G(),[t,n]=Object(o.useState)(e.getRouteList());return Object(o.useEffect)(()=>e.onRouteListChange(()=>{n(e.getRouteList())}),[e]),t}function Re(e,t){var n=G(),[r,i]=Object(o.useState)(!t&&n.isOutlineEnabled(e));return Object(o.useEffect)(()=>{if(!t)return n.onOutlineEnabledNodesChange(()=>{i(n.isOutlineEnabled(e))})},[t,n,e]),r}},XuQu:function(e,t){e.exports=dll},ZR4k:function(e,t,n){e.exports=n("XuQu")("ZR4k")},i8i4:function(e,t,n){e.exports=n("XuQu")("i8i4")},lSNA:function(e,t,n){e.exports=n("XuQu")("lSNA")},q1tI:function(e,t,n){e.exports=n("/8r5")("q1tI")},qJlv:function(e,t,n){e.exports=n("/8r5")("qJlv")},tYg3:function(e,t,n){e.exports=n("XuQu")("tYg3")},yXPU:function(e,t,n){e.exports=n("XuQu")("yXPU")}});
8
+ //# sourceMappingURL=dll-of-editor-bricks-helper.b751650b.js.map