@next-bricks/visual-builder 1.31.0 → 1.32.1

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.
Files changed (128) hide show
  1. package/dist/bricks.json +7 -7
  2. package/dist/chunks/{1122.a2e4f62e.js → 1122.1f550956.js} +2 -2
  3. package/dist/chunks/1122.1f550956.js.map +1 -0
  4. package/dist/chunks/{114.63bf1208.js → 114.c25646f6.js} +2 -2
  5. package/dist/chunks/{114.63bf1208.js.map → 114.c25646f6.js.map} +1 -1
  6. package/dist/chunks/{1940.5f0efc53.js → 1940.fa7d69c6.js} +2 -2
  7. package/dist/chunks/{1940.5f0efc53.js.map → 1940.fa7d69c6.js.map} +1 -1
  8. package/dist/chunks/{2252.6c4f85f9.js → 2252.8c147e6c.js} +3 -3
  9. package/dist/chunks/2252.8c147e6c.js.map +1 -0
  10. package/dist/chunks/{2277.06e20216.js → 2277.e16c7cbf.js} +2 -2
  11. package/dist/chunks/{2277.06e20216.js.map → 2277.e16c7cbf.js.map} +1 -1
  12. package/dist/chunks/2528.6af6d36b.js +3 -0
  13. package/dist/chunks/{9130.51e9c8f2.js.LICENSE.txt → 2528.6af6d36b.js.LICENSE.txt} +4 -0
  14. package/dist/chunks/2528.6af6d36b.js.map +1 -0
  15. package/dist/chunks/{2980.56778607.js → 2980.51717b3f.js} +2 -2
  16. package/dist/chunks/{2980.56778607.js.map → 2980.51717b3f.js.map} +1 -1
  17. package/dist/chunks/{3171.fed38379.js → 3171.9c6b399c.js} +2 -2
  18. package/dist/chunks/{3171.fed38379.js.map → 3171.9c6b399c.js.map} +1 -1
  19. package/dist/chunks/{3933.5bb88d4a.js → 3933.374de7c2.js} +2 -2
  20. package/dist/chunks/{3933.5bb88d4a.js.map → 3933.374de7c2.js.map} +1 -1
  21. package/dist/chunks/{4658.6f1f1b37.js → 4658.e9f4df8f.js} +2 -2
  22. package/dist/chunks/{4658.6f1f1b37.js.map → 4658.e9f4df8f.js.map} +1 -1
  23. package/dist/chunks/{4837.df62d8e1.js → 4837.58fb5576.js} +2 -2
  24. package/dist/chunks/{4837.df62d8e1.js.map → 4837.58fb5576.js.map} +1 -1
  25. package/dist/chunks/{5399.3fbcbf7e.js → 5399.eb4a18e3.js} +2 -2
  26. package/dist/chunks/{5399.3fbcbf7e.js.map → 5399.eb4a18e3.js.map} +1 -1
  27. package/dist/chunks/{5552.cabbd277.js → 5552.c264a000.js} +2 -2
  28. package/dist/chunks/{5552.cabbd277.js.map → 5552.c264a000.js.map} +1 -1
  29. package/dist/chunks/{6314.9d427e15.js → 6314.ed6c5313.js} +2 -2
  30. package/dist/chunks/{6314.9d427e15.js.map → 6314.ed6c5313.js.map} +1 -1
  31. package/dist/chunks/6846.56c301e6.js +3 -0
  32. package/dist/chunks/6846.56c301e6.js.map +1 -0
  33. package/dist/chunks/7150.ebb95d53.js +3 -0
  34. package/dist/chunks/7150.ebb95d53.js.map +1 -0
  35. package/dist/chunks/{7218.57b21ecf.js → 7218.417c6054.js} +2 -2
  36. package/dist/chunks/{7218.57b21ecf.js.map → 7218.417c6054.js.map} +1 -1
  37. package/dist/chunks/{7434.99b24ba5.js → 7434.4ddb3aab.js} +2 -2
  38. package/dist/chunks/{7434.99b24ba5.js.map → 7434.4ddb3aab.js.map} +1 -1
  39. package/dist/chunks/{7733.6aaf0acb.js → 7733.4fc7b710.js} +2 -2
  40. package/dist/chunks/{7733.6aaf0acb.js.map → 7733.4fc7b710.js.map} +1 -1
  41. package/dist/chunks/{790.77b44e6b.js → 790.5aa68ffb.js} +2 -2
  42. package/dist/chunks/{790.77b44e6b.js.map → 790.5aa68ffb.js.map} +1 -1
  43. package/dist/chunks/{9027.21af2a5d.js → 9027.e3490283.js} +2 -2
  44. package/dist/chunks/{9027.21af2a5d.js.map → 9027.e3490283.js.map} +1 -1
  45. package/dist/chunks/9080.c73b20aa.js +2 -0
  46. package/dist/chunks/9080.c73b20aa.js.map +1 -0
  47. package/dist/chunks/{9559.a7cc0fe6.js → 9559.34ed0b2d.js} +2 -2
  48. package/dist/chunks/{9559.a7cc0fe6.js.map → 9559.34ed0b2d.js.map} +1 -1
  49. package/dist/chunks/{chat-conversation.06c03ce2.js → chat-conversation.918f65c5.js} +3 -3
  50. package/dist/chunks/{chat-conversation.06c03ce2.js.map → chat-conversation.918f65c5.js.map} +1 -1
  51. package/dist/chunks/{chat-preview.75a05ac5.js → chat-preview.f7014cdb.js} +3 -3
  52. package/dist/chunks/{chat-preview.75a05ac5.js.map → chat-preview.f7014cdb.js.map} +1 -1
  53. package/dist/chunks/{check-editor-by-name.151786ec.js → check-editor-by-name.7e2f27ec.js} +2 -2
  54. package/dist/chunks/{check-editor-by-name.151786ec.js.map → check-editor-by-name.7e2f27ec.js.map} +1 -1
  55. package/dist/chunks/{contract-select.b4daeecc.js → contract-select.858bf125.js} +3 -3
  56. package/dist/chunks/{contract-select.b4daeecc.js.map → contract-select.858bf125.js.map} +1 -1
  57. package/dist/chunks/{generate-snippets-context-menu.a076f5f7.js → generate-snippets-context-menu.83328abe.js} +2 -2
  58. package/dist/chunks/{generate-snippets-context-menu.a076f5f7.js.map → generate-snippets-context-menu.83328abe.js.map} +1 -1
  59. package/dist/chunks/{get-data-deps.e521c8d2.js → get-data-deps.d2ca1894.js} +2 -2
  60. package/dist/chunks/{get-data-deps.e521c8d2.js.map → get-data-deps.d2ca1894.js.map} +1 -1
  61. package/dist/chunks/{get-dependency-tree.a0216e9a.js → get-dependency-tree.e2a26654.js} +2 -2
  62. package/dist/chunks/{get-dependency-tree.a0216e9a.js.map → get-dependency-tree.e2a26654.js.map} +1 -1
  63. package/dist/chunks/{inject-chat-preview-agent.79f723c0.js → inject-chat-preview-agent.2c1c58bf.js} +2 -2
  64. package/dist/chunks/{inject-chat-preview-agent.79f723c0.js.map → inject-chat-preview-agent.2c1c58bf.js.map} +1 -1
  65. package/dist/chunks/{inject-preview-agent.4cc9a12f.js → inject-preview-agent.84654232.js} +2 -2
  66. package/dist/chunks/{inject-preview-agent.4cc9a12f.js.map → inject-preview-agent.84654232.js.map} +1 -1
  67. package/dist/chunks/main.5435b169.js +2 -0
  68. package/dist/chunks/{main.6f9e0b32.js.map → main.5435b169.js.map} +1 -1
  69. package/dist/chunks/{page-arch-node.50fe50b2.js → page-arch-node.59e3fed0.js} +3 -3
  70. package/dist/chunks/{page-arch-node.50fe50b2.js.map → page-arch-node.59e3fed0.js.map} +1 -1
  71. package/dist/chunks/{parse-path.571d7d62.js → parse-path.b34df33b.js} +2 -2
  72. package/dist/chunks/{parse-path.571d7d62.js.map → parse-path.b34df33b.js.map} +1 -1
  73. package/dist/chunks/{pre-generated-container.d8e62dfd.js → pre-generated-container.d2f83710.js} +2 -2
  74. package/dist/chunks/{pre-generated-container.d8e62dfd.js.map → pre-generated-container.d2f83710.js.map} +1 -1
  75. package/dist/chunks/{pre-generated-preview.78d438ab.js → pre-generated-preview.03d5b930.js} +3 -3
  76. package/dist/chunks/{pre-generated-preview.78d438ab.js.map → pre-generated-preview.03d5b930.js.map} +1 -1
  77. package/dist/chunks/{pre-generated-table-view.a76e65eb.js → pre-generated-table-view.1a7bcbab.js} +2 -2
  78. package/dist/chunks/{pre-generated-table-view.a76e65eb.js.map → pre-generated-table-view.1a7bcbab.js.map} +1 -1
  79. package/dist/chunks/property-editor.a3793d5c.js +2 -0
  80. package/dist/chunks/property-editor.a3793d5c.js.map +1 -0
  81. package/dist/chunks/{workbench-action-list.29085ba6.js → workbench-action-list.dbcbbdac.js} +2 -2
  82. package/dist/chunks/{workbench-action-list.29085ba6.js.map → workbench-action-list.dbcbbdac.js.map} +1 -1
  83. package/dist/chunks/{workbench-action.5cd875ea.js → workbench-action.fecc0cc7.js} +3 -3
  84. package/dist/chunks/{workbench-action.5cd875ea.js.map → workbench-action.fecc0cc7.js.map} +1 -1
  85. package/dist/chunks/{workbench-history-action.6927ae60.js → workbench-history-action.a713bacf.js} +3 -3
  86. package/dist/chunks/{workbench-history-action.6927ae60.js.map → workbench-history-action.a713bacf.js.map} +1 -1
  87. package/dist/chunks/{workbench-pane.9634f35a.js → workbench-pane.76c5f450.js} +3 -3
  88. package/dist/chunks/{workbench-pane.9634f35a.js.map → workbench-pane.76c5f450.js.map} +1 -1
  89. package/dist/chunks/{workbench-sidebar.d9bc1d1a.js → workbench-sidebar.9ff63381.js} +2 -2
  90. package/dist/chunks/{workbench-sidebar.d9bc1d1a.js.map → workbench-sidebar.9ff63381.js.map} +1 -1
  91. package/dist/chunks/{workbench-tree.c3469448.js → workbench-tree.7a82e0b6.js} +3 -3
  92. package/dist/chunks/{workbench-tree.c3469448.js.map → workbench-tree.7a82e0b6.js.map} +1 -1
  93. package/dist/examples.json +3 -3
  94. package/dist/index.bd6e026e.js +2 -0
  95. package/dist/index.bd6e026e.js.map +1 -0
  96. package/dist/manifest.json +56 -56
  97. package/dist/types.json +13 -174
  98. package/dist-types/property-editor/components/common/CustomOptionsComponent.d.ts +10 -0
  99. package/dist-types/property-editor/index.d.ts +23 -53
  100. package/dist-types/property-editor/utils/formilySchemaFormatter.d.ts +4 -1
  101. package/package.json +4 -4
  102. package/dist/chunks/1122.a2e4f62e.js.map +0 -1
  103. package/dist/chunks/2252.6c4f85f9.js.map +0 -1
  104. package/dist/chunks/5021.46f6c912.js +0 -2
  105. package/dist/chunks/5021.46f6c912.js.map +0 -1
  106. package/dist/chunks/6846.9781d710.js +0 -3
  107. package/dist/chunks/6846.9781d710.js.map +0 -1
  108. package/dist/chunks/7150.ac864502.js +0 -3
  109. package/dist/chunks/7150.ac864502.js.map +0 -1
  110. package/dist/chunks/9130.51e9c8f2.js +0 -3
  111. package/dist/chunks/9130.51e9c8f2.js.map +0 -1
  112. package/dist/chunks/main.6f9e0b32.js +0 -2
  113. package/dist/chunks/property-editor.6e901980.js +0 -2
  114. package/dist/chunks/property-editor.6e901980.js.map +0 -1
  115. package/dist/index.77a68705.js +0 -2
  116. package/dist/index.77a68705.js.map +0 -1
  117. /package/dist/chunks/{2252.6c4f85f9.js.LICENSE.txt → 2252.8c147e6c.js.LICENSE.txt} +0 -0
  118. /package/dist/chunks/{6846.9781d710.js.LICENSE.txt → 6846.56c301e6.js.LICENSE.txt} +0 -0
  119. /package/dist/chunks/{7150.ac864502.js.LICENSE.txt → 7150.ebb95d53.js.LICENSE.txt} +0 -0
  120. /package/dist/chunks/{chat-conversation.06c03ce2.js.LICENSE.txt → chat-conversation.918f65c5.js.LICENSE.txt} +0 -0
  121. /package/dist/chunks/{chat-preview.75a05ac5.js.LICENSE.txt → chat-preview.f7014cdb.js.LICENSE.txt} +0 -0
  122. /package/dist/chunks/{contract-select.b4daeecc.js.LICENSE.txt → contract-select.858bf125.js.LICENSE.txt} +0 -0
  123. /package/dist/chunks/{page-arch-node.50fe50b2.js.LICENSE.txt → page-arch-node.59e3fed0.js.LICENSE.txt} +0 -0
  124. /package/dist/chunks/{pre-generated-preview.78d438ab.js.LICENSE.txt → pre-generated-preview.03d5b930.js.LICENSE.txt} +0 -0
  125. /package/dist/chunks/{workbench-action.5cd875ea.js.LICENSE.txt → workbench-action.fecc0cc7.js.LICENSE.txt} +0 -0
  126. /package/dist/chunks/{workbench-history-action.6927ae60.js.LICENSE.txt → workbench-history-action.a713bacf.js.LICENSE.txt} +0 -0
  127. /package/dist/chunks/{workbench-pane.9634f35a.js.LICENSE.txt → workbench-pane.76c5f450.js.LICENSE.txt} +0 -0
  128. /package/dist/chunks/{workbench-tree.c3469448.js.LICENSE.txt → workbench-tree.7a82e0b6.js.LICENSE.txt} +0 -0
@@ -1,2 +1,2 @@
1
- "use strict";(globalThis.webpackChunk_next_bricks_visual_builder=globalThis.webpackChunk_next_bricks_visual_builder||[]).push([[9027],{6788:(e,t,o)=>{o.d(t,{b:()=>i});var n=o(8896),a=o(2153),r=o(6946);function i(e){const t=function(e){const t=new Set;return(0,a.h)(e,(e=>{switch(e.type){case"Resolvable":case"EventHandler":{var o;const n=null===(o=e.raw)||void 0===o?void 0:o.useProvider;n&&t.add(n)}}})),t}((0,r.lN)(e)),o=[];for(const e of t)e.includes("@")&&o.push(e);return o}customElements.define("visual-builder.collect-used-contracts",(0,n.createProviderClass)(i))},9027:(e,t,o)=>{o.d(t,{A:()=>D,w:()=>N});var n=o(6916),a=o(3465),r=o(6055),i=o(1030),s=o(8317),d=o.n(s);let l;function c(e){e.preventDefault(),e.stopPropagation(),function(e){const t=g(e);t.length>0&&window.parent.postMessage({sender:"previewer",type:"select-brick",iidList:t},l)}(e.composedPath())}function p(e){e.preventDefault(),e.stopPropagation()}const u=(0,i.throttle)((e=>{const t=g(e);t.length>0&&window.parent.postMessage({sender:"previewer",type:"hover-on-brick",iidList:t},l)}),100,{leading:!1});function v(e){e.preventDefault(),e.stopPropagation(),u(e.composedPath())}function h(e){e.preventDefault(),e.stopPropagation(),u(e.composedPath())}function w(e){e.preventDefault(),e.stopPropagation(),window.parent.postMessage({sender:"previewer",type:"hover-on-brick",iidList:[]},l)}function m(e){e.preventDefault(),e.stopPropagation(),function(e,t){const o=g(e);o.length>0&&window.parent.postMessage({sender:"previewer",type:"context-menu-on-brick",iidList:o,position:t},l)}(e.composedPath(),{x:e.clientX,y:e.clientY})}function g(e){const t=[];for(const o of e)o instanceof HTMLElement&&"string"==typeof o.dataset.iid&&t.push(o.dataset.iid);return t}var y=o(6788);function f(e){const t=typeof e;switch(t){case"string":case"boolean":case"number":return{type:t,value:e};case"undefined":return{type:t}}return null===e?{type:"null"}:Array.isArray(e)?{type:"array",length:e.length}:{type:"object"}}let b=!1,S=n.getHistory,I=n.matchPath,E=n.__secret_internals,L=r.flowApi,k=!1;try{var P;const e=window.dll;if(e&&null!==(P=window.BRICK_NEXT_VERSIONS)&&void 0!==P&&null!==(P=P["brick-container"])&&void 0!==P&&P.startsWith("2.")){const{getHistory:t,developHelper:o,collectDebugContract:n}=e("tYg3"),{matchPath:a}=e("A+yw");S=t,I=a,E={...o,getContextValue(e,t){let{tplStateStoreId:n}=t;return o.getContextValue(e,{tplContextId:n})},getAllContextValues(e){let{tplStateStoreId:t}=e;const n=o.getAllContextValues({tplContextId:t});return Object.fromEntries([...n].map((e=>{let[t,o]=e;return[t,o.value]})))},debugDataValue(e,t){let{tplStateStoreId:n}=t;return o.debugDataValue(e,{tplContextId:n})}},L={collectDebugContract:n},k=!0}}catch(e){console.error("Try to use v2 runtime APIs failed:",e)}let x=null,C=null;async function D(e,t){var o,r;if(b)return;b=!0;const s=t=>{window.parent.postMessage({sender:"previewer",...t},e)};let u,g,k,P;s({type:"preview-started"}),l=e;const D=(e,t,o)=>{const n=T(t);s({type:"highlight-brick",highlightType:e,outlines:n,iid:t,alias:o})};let N;t.templateId&&(N=t.settings);const R=()=>{E.updateTemplatePreviewSettings(t.appId,t.templateId,N),S().reload()},O=()=>{E.updateSnippetPreviewSettings(t.appId,JSON.parse(t.snippetData)),S().reload()},_=()=>{E.updateFormPreviewSettings(t.appId,t.formId,t.formData),S().reload()},q=S();window.addEventListener("message",(async o=>{var r,f;let{data:b,origin:I}=o;if(I===e&&b&&"preview-container"===b.sender)if("builder"===b.forwardedFor)switch(b.type){case"hover-on-brick":u=b.iid,g=b.alias,D("hover",b.iid,b.alias);break;case"hover-on-main":D("hover","#main-mount-point","root");break;case"hover-on-context":(e=>{const t=e.map((e=>T(e.iid,e.alias))).flat();s({type:"highlight-context",outlines:t})})(b.highlightNodes);break;case"select-brick":k=b.iid,P=b.alias,D("active",b.iid,b.alias);break;case"hover-on-iframe":(e=>{const t=document.elementFromPoint(e.x,e.y);if("BODY"===(null==t?void 0:t.tagName))window.parent.postMessage({sender:"previewer",type:"hover-on-main",isDirection:!0,position:{x:e.x,y:e.y}},l);else{const o=function(e){const t=[];let o=e;for(;o;)"string"==typeof o.dataset.iid&&t.push(o.dataset.iid),o=o.parentElement;return t}(t);window.parent.postMessage({sender:"previewer",type:"hover-on-brick",iidList:o,isDirection:!0,position:{x:e.x,y:e.y}},l)}})(b.position)}else switch(b.type){case"toggle-inspecting":b.enabled?(window.addEventListener("click",c,!0),window.addEventListener("mousedown",p,!0),window.addEventListener("mouseover",p,!0),window.addEventListener("mouseup",p,!0),window.addEventListener("pointerdown",v,!0),window.addEventListener("pointermove",h,!0),window.addEventListener("pointerup",p,!0),window.addEventListener("pointerleave",w,!0),window.addEventListener("contextmenu",m,!0)):(window.removeEventListener("click",c,!0),window.removeEventListener("mousedown",p,!0),window.removeEventListener("mouseover",p,!0),window.removeEventListener("mouseup",p,!0),window.removeEventListener("pointerdown",v,!0),window.removeEventListener("pointermove",h,!0),window.removeEventListener("pointerup",p,!0),window.removeEventListener("pointerleave",w,!0),window.removeEventListener("contextmenu",m,!0));break;case"refresh":if(null!==(r=b.options)&&void 0!==r&&r.updateStoryboardType){var x;let e;var C,M;"route"===b.options.updateStoryboardType?E.updateStoryboardByRoute(t.appId,b.storyboardPatch):"template"===b.options.updateStoryboardType?E.updateStoryboardByTemplate(t.appId,b.storyboardPatch,b.options.settings):"snippet"===b.options.updateStoryboardType?E.updateStoryboardBySnippet(t.appId,b.storyboardPatch):"form"===b.options.updateStoryboardType&&E.updateFormPreviewSettings(t.appId,t.formId,b.storyboardPatch),"form"!==(null===(x=b.options)||void 0===x?void 0:x.updateStoryboardType)&&(e=await(null===(C=(M=E).getAddedContracts)||void 0===C?void 0:C.call(M,b.storyboardPatch,{appId:t.appId,updateStoryboardType:b.options.updateStoryboardType,formId:t.formId,collectUsedContracts:y.b}))),(0,i.isEmpty)(e)?S().reload():s({type:"contract-update",data:{add:e}});break}E.updateStoryboard(t.appId,b.storyboardPatch),t.templateId?(N=b.settings,R()):t.formId||t.formData?_():null!==(f=b.options)&&void 0!==f&&f.snippetData?(t.snippetData=b.options.snippetData,O()):S().reload();break;case"reload":location.reload();break;case"back":q.goBack();break;case"forward":q.goForward();break;case"capture":(async function(e,t){const o=await d()(document.body,{logging:!1,scale:1,width:window.innerWidth,height:window.innerHeight,foreignObjectRendering:!0}),n=document.createElement("canvas");var a;return function(e,t,o,n){const a=o/n,{width:r,height:i}=e,s=r/i,d=s>=a,l=d?o:n*s,c=d?o/s:n;t.width=l,t.height=c,t.getContext("2d").drawImage(e,0,0,r,i,0,0,l,c),t.toDataURL()}(o,n,e,t),await(a=n,new Promise((function(e,t){a.toBlob((function(o){o?e(o):t()}))})))})(b.maxWidth,b.maxHeight).then((e=>{s({type:"capture-ok",screenshot:e})}),(()=>{s({type:"capture-failed"})}));break;case"inspect-data-value":((e,t)=>{try{const{dataType:o}=t;let n,a,r;if("state"===o&&(n=A(),!n))return void s({type:"inspect-data-value-error",data:{error:{message:"tplStateStoreId not found, unable to preview STATE value"}}});if(e)r="inspect-single-data-value-success",a=E.getContextValue(e,{tplStateStoreId:n});else{r="inspect-all-data-values-success";const e=E.getAllContextValues({tplStateStoreId:n});a=Object.entries(e).map((e=>{let[t,o]=e;return{name:t,value:o}}))}s({type:r,data:{name:e,value:a}})}catch(e){s({type:"inspect-data-value-error",data:{message:e.message}})}})(b.name,b.option);break;case"update-preview-url":{const e=b.previewUrl.startsWith(window.origin)?b.previewUrl.substring(window.origin.length):b.previewUrl,t=(0,n.getBasePath)(),o=e.startsWith(t)?e.substring(t.length-1):e;S().push(o);break}case"update-preview-route":t.routePath=b.routePath,t.routeExact=b.routeExact,B();break;case"debug-data-value":(async(e,o,n)=>{try{o&&L.collectDebugContract([o]);const a=await E.debugDataValue(e,{tplStateStoreId:"state"===n.dataType?A():void 0,routeId:t.routeId});s({type:"debug-data-value-success",data:{debugConf:e,value:a}})}catch(e){s({type:"debug-data-value-error",data:e instanceof a.HttpResponseError?e.responseJson:{message:e.message}})}})(b.debugData,b.contractData,b.options)}})),window.addEventListener("scroll",(()=>{s({type:"scroll",scroll:{x:window.scrollX,y:window.scrollY}})}));let M,H=!0;const V=e=>{s({type:"url-change",url:location.origin+q.createHref(e)}),M=e,B()};function B(){if(t.routePath){const e=!!I(M.pathname,{path:t.routePath,exact:t.routeExact});if(s({type:"route-match-change",match:e}),t.templateId&&!H&&e){const e=document.querySelector("#main-mount-point"),t=new MutationObserver((()=>{1===e.childNodes.length&&"SPAN"===e.firstChild.tagName&&0===e.firstChild.childNodes.length&&(R(),t.disconnect())}));t.observe(e,{childList:!0})}if(t.formId&&!H&&e){const e=document.querySelector("#main-mount-point"),t=new MutationObserver((()=>{1===e.childNodes.length&&"SPAN"===e.firstChild.tagName&&0===e.firstChild.childNodes.length&&(_(),t.disconnect())}));t.observe(e,{childList:!0})}if(t.snippetData&&!H&&e){const e=document.querySelector("#main-mount-point"),t=new MutationObserver((()=>{1===e.childNodes.length&&"SPAN"===e.firstChild.tagName&&0===e.firstChild.childNodes.length&&(O(),t.disconnect())}));t.observe(e,{childList:!0})}H=e}}function j(){var e;const t=document.querySelector("eo-page-view"),o=(null==t||null===(e=t.shadowRoot)||void 0===e?void 0:e.querySelector(".content"))??null;var n;o!==x&&(null===(n=x)||void 0===n||n.removeEventListener("scroll",F),null==o||o.addEventListener("scroll",F),x=o,C=t)}function F(){s({type:"content-scroll",scroll:{x:this.scrollLeft,y:this.scrollTop}})}V(q.location),q.listen(V),t.templateId&&R(),(t.formId||t.formData)&&_(),t.snippetData&&O();const U=()=>{var e;const o=t.routeId,n=E.getLegalRuntimeValue({routeId:o});s({type:"inspect-runtime-data-value",data:{...(0,i.omit)(n,"query"),query:n.query?Object.fromEntries(n.query.entries()):{},path:null===(e=n.match)||void 0===e?void 0:e.params}})};let W;function Y(e){const o=t.templateId?A():void 0;var n,a;(W!==o||e)&&(W=o,null===(n=(a=E).setRealTimeDataInspectRoot)||void 0===n||n.call(a,{tplStateStoreId:o}))}null===(o=(r=E).addRealTimeDataInspectHook)||void 0===o||o.call(r,(e=>{let{changeType:t,tplStateStoreId:o,detail:n}=e;s({type:"real-time-data-inspect-change",changeType:t,tplStateStoreId:o,detail:"update"===t?{name:n.name,annotation:f(n.value)}:{data:Object.fromEntries(Object.entries(n.data).map((e=>{let[t,o]=e;return[t,f(o)]})))}})})),window.addEventListener("route.render",(()=>{Y(!0),U()})),j(),Y(!0),U(),new MutationObserver((0,i.throttle)((()=>{j(),Y(),u&&D("hover",u,g),k&&D("active",k,P)}),100,{leading:!1})).observe(document.body,{subtree:!0,childList:!0})}function T(e,t){if(!e)return[];const o=e.includes("#"),n=function(e,t){return e.map((e=>{var o;const n=null===(o=C)||void 0===o?void 0:o.contains(e),{width:a,height:r,left:i,top:s}=e.getBoundingClientRect();return{width:a,height:r,left:i+window.scrollX+(n?x.scrollLeft:0),top:s+window.scrollY+(n?x.scrollTop:0),alias:t,hasContentScroll:n}}))}(N(e,o),t);return o?n.map((e=>({...e,height:window.innerHeight-e.top}))):n}function N(e,t){const o=[];return function n(a){const r=a.querySelectorAll(t?e:`[data-iid="${e}"]`);if(o.push(...r),!(a===document&&r.length>0))for(const e of a.querySelectorAll("*"))e.shadowRoot&&n(e.shadowRoot)}(document),o}function A(){var e;const t=document.querySelector("#main-mount-point");return null==t||null===(e=t.firstChild)||void 0===e?void 0:e.dataset[k?"tplContextId":"tplStateStoreId"]}}}]);
2
- //# sourceMappingURL=9027.21af2a5d.js.map
1
+ "use strict";(globalThis.webpackChunk_next_bricks_visual_builder=globalThis.webpackChunk_next_bricks_visual_builder||[]).push([[9027],{6788:(e,t,o)=>{o.d(t,{b:()=>i});var n=o(3518),a=o(2153),r=o(6946);function i(e){const t=function(e){const t=new Set;return(0,a.h)(e,(e=>{switch(e.type){case"Resolvable":case"EventHandler":{var o;const n=null===(o=e.raw)||void 0===o?void 0:o.useProvider;n&&t.add(n)}}})),t}((0,r.lN)(e)),o=[];for(const e of t)e.includes("@")&&o.push(e);return o}customElements.define("visual-builder.collect-used-contracts",(0,n.createProviderClass)(i))},9027:(e,t,o)=>{o.d(t,{A:()=>D,w:()=>N});var n=o(1653),a=o(9422),r=o(6055),i=o(1030),s=o(8317),d=o.n(s);let l;function c(e){e.preventDefault(),e.stopPropagation(),function(e){const t=g(e);t.length>0&&window.parent.postMessage({sender:"previewer",type:"select-brick",iidList:t},l)}(e.composedPath())}function p(e){e.preventDefault(),e.stopPropagation()}const u=(0,i.throttle)((e=>{const t=g(e);t.length>0&&window.parent.postMessage({sender:"previewer",type:"hover-on-brick",iidList:t},l)}),100,{leading:!1});function v(e){e.preventDefault(),e.stopPropagation(),u(e.composedPath())}function h(e){e.preventDefault(),e.stopPropagation(),u(e.composedPath())}function w(e){e.preventDefault(),e.stopPropagation(),window.parent.postMessage({sender:"previewer",type:"hover-on-brick",iidList:[]},l)}function m(e){e.preventDefault(),e.stopPropagation(),function(e,t){const o=g(e);o.length>0&&window.parent.postMessage({sender:"previewer",type:"context-menu-on-brick",iidList:o,position:t},l)}(e.composedPath(),{x:e.clientX,y:e.clientY})}function g(e){const t=[];for(const o of e)o instanceof HTMLElement&&"string"==typeof o.dataset.iid&&t.push(o.dataset.iid);return t}var y=o(6788);function f(e){const t=typeof e;switch(t){case"string":case"boolean":case"number":return{type:t,value:e};case"undefined":return{type:t}}return null===e?{type:"null"}:Array.isArray(e)?{type:"array",length:e.length}:{type:"object"}}let b=!1,S=n.getHistory,I=n.matchPath,E=n.__secret_internals,L=r.flowApi,k=!1;try{var P;const e=window.dll;if(e&&null!==(P=window.BRICK_NEXT_VERSIONS)&&void 0!==P&&null!==(P=P["brick-container"])&&void 0!==P&&P.startsWith("2.")){const{getHistory:t,developHelper:o,collectDebugContract:n}=e("tYg3"),{matchPath:a}=e("A+yw");S=t,I=a,E={...o,getContextValue(e,t){let{tplStateStoreId:n}=t;return o.getContextValue(e,{tplContextId:n})},getAllContextValues(e){let{tplStateStoreId:t}=e;const n=o.getAllContextValues({tplContextId:t});return Object.fromEntries([...n].map((e=>{let[t,o]=e;return[t,o.value]})))},debugDataValue(e,t){let{tplStateStoreId:n}=t;return o.debugDataValue(e,{tplContextId:n})}},L={collectDebugContract:n},k=!0}}catch(e){console.error("Try to use v2 runtime APIs failed:",e)}let x=null,C=null;async function D(e,t){var o,r;if(b)return;b=!0;const s=t=>{window.parent.postMessage({sender:"previewer",...t},e)};let u,g,k,P;s({type:"preview-started"}),l=e;const D=(e,t,o)=>{const n=T(t);s({type:"highlight-brick",highlightType:e,outlines:n,iid:t,alias:o})};let N;t.templateId&&(N=t.settings);const R=()=>{E.updateTemplatePreviewSettings(t.appId,t.templateId,N),S().reload()},O=()=>{E.updateSnippetPreviewSettings(t.appId,JSON.parse(t.snippetData)),S().reload()},_=()=>{E.updateFormPreviewSettings(t.appId,t.formId,t.formData),S().reload()},q=S();window.addEventListener("message",(async o=>{var r,f;let{data:b,origin:I}=o;if(I===e&&b&&"preview-container"===b.sender)if("builder"===b.forwardedFor)switch(b.type){case"hover-on-brick":u=b.iid,g=b.alias,D("hover",b.iid,b.alias);break;case"hover-on-main":D("hover","#main-mount-point","root");break;case"hover-on-context":(e=>{const t=e.map((e=>T(e.iid,e.alias))).flat();s({type:"highlight-context",outlines:t})})(b.highlightNodes);break;case"select-brick":k=b.iid,P=b.alias,D("active",b.iid,b.alias);break;case"hover-on-iframe":(e=>{const t=document.elementFromPoint(e.x,e.y);if("BODY"===(null==t?void 0:t.tagName))window.parent.postMessage({sender:"previewer",type:"hover-on-main",isDirection:!0,position:{x:e.x,y:e.y}},l);else{const o=function(e){const t=[];let o=e;for(;o;)"string"==typeof o.dataset.iid&&t.push(o.dataset.iid),o=o.parentElement;return t}(t);window.parent.postMessage({sender:"previewer",type:"hover-on-brick",iidList:o,isDirection:!0,position:{x:e.x,y:e.y}},l)}})(b.position)}else switch(b.type){case"toggle-inspecting":b.enabled?(window.addEventListener("click",c,!0),window.addEventListener("mousedown",p,!0),window.addEventListener("mouseover",p,!0),window.addEventListener("mouseup",p,!0),window.addEventListener("pointerdown",v,!0),window.addEventListener("pointermove",h,!0),window.addEventListener("pointerup",p,!0),window.addEventListener("pointerleave",w,!0),window.addEventListener("contextmenu",m,!0)):(window.removeEventListener("click",c,!0),window.removeEventListener("mousedown",p,!0),window.removeEventListener("mouseover",p,!0),window.removeEventListener("mouseup",p,!0),window.removeEventListener("pointerdown",v,!0),window.removeEventListener("pointermove",h,!0),window.removeEventListener("pointerup",p,!0),window.removeEventListener("pointerleave",w,!0),window.removeEventListener("contextmenu",m,!0));break;case"refresh":if(null!==(r=b.options)&&void 0!==r&&r.updateStoryboardType){var x;let e;var C,M;"route"===b.options.updateStoryboardType?E.updateStoryboardByRoute(t.appId,b.storyboardPatch):"template"===b.options.updateStoryboardType?E.updateStoryboardByTemplate(t.appId,b.storyboardPatch,b.options.settings):"snippet"===b.options.updateStoryboardType?E.updateStoryboardBySnippet(t.appId,b.storyboardPatch):"form"===b.options.updateStoryboardType&&E.updateFormPreviewSettings(t.appId,t.formId,b.storyboardPatch),"form"!==(null===(x=b.options)||void 0===x?void 0:x.updateStoryboardType)&&(e=await(null===(C=(M=E).getAddedContracts)||void 0===C?void 0:C.call(M,b.storyboardPatch,{appId:t.appId,updateStoryboardType:b.options.updateStoryboardType,formId:t.formId,collectUsedContracts:y.b}))),(0,i.isEmpty)(e)?S().reload():s({type:"contract-update",data:{add:e}});break}E.updateStoryboard(t.appId,b.storyboardPatch),t.templateId?(N=b.settings,R()):t.formId||t.formData?_():null!==(f=b.options)&&void 0!==f&&f.snippetData?(t.snippetData=b.options.snippetData,O()):S().reload();break;case"reload":location.reload();break;case"back":q.goBack();break;case"forward":q.goForward();break;case"capture":(async function(e,t){const o=await d()(document.body,{logging:!1,scale:1,width:window.innerWidth,height:window.innerHeight,foreignObjectRendering:!0}),n=document.createElement("canvas");var a;return function(e,t,o,n){const a=o/n,{width:r,height:i}=e,s=r/i,d=s>=a,l=d?o:n*s,c=d?o/s:n;t.width=l,t.height=c,t.getContext("2d").drawImage(e,0,0,r,i,0,0,l,c),t.toDataURL()}(o,n,e,t),await(a=n,new Promise((function(e,t){a.toBlob((function(o){o?e(o):t()}))})))})(b.maxWidth,b.maxHeight).then((e=>{s({type:"capture-ok",screenshot:e})}),(()=>{s({type:"capture-failed"})}));break;case"inspect-data-value":((e,t)=>{try{const{dataType:o}=t;let n,a,r;if("state"===o&&(n=A(),!n))return void s({type:"inspect-data-value-error",data:{error:{message:"tplStateStoreId not found, unable to preview STATE value"}}});if(e)r="inspect-single-data-value-success",a=E.getContextValue(e,{tplStateStoreId:n});else{r="inspect-all-data-values-success";const e=E.getAllContextValues({tplStateStoreId:n});a=Object.entries(e).map((e=>{let[t,o]=e;return{name:t,value:o}}))}s({type:r,data:{name:e,value:a}})}catch(e){s({type:"inspect-data-value-error",data:{message:e.message}})}})(b.name,b.option);break;case"update-preview-url":{const e=b.previewUrl.startsWith(window.origin)?b.previewUrl.substring(window.origin.length):b.previewUrl,t=(0,n.getBasePath)(),o=e.startsWith(t)?e.substring(t.length-1):e;S().push(o);break}case"update-preview-route":t.routePath=b.routePath,t.routeExact=b.routeExact,B();break;case"debug-data-value":(async(e,o,n)=>{try{o&&L.collectDebugContract([o]);const a=await E.debugDataValue(e,{tplStateStoreId:"state"===n.dataType?A():void 0,routeId:t.routeId});s({type:"debug-data-value-success",data:{debugConf:e,value:a}})}catch(e){s({type:"debug-data-value-error",data:e instanceof a.HttpResponseError?e.responseJson:{message:e.message}})}})(b.debugData,b.contractData,b.options)}})),window.addEventListener("scroll",(()=>{s({type:"scroll",scroll:{x:window.scrollX,y:window.scrollY}})}));let M,H=!0;const V=e=>{s({type:"url-change",url:location.origin+q.createHref(e)}),M=e,B()};function B(){if(t.routePath){const e=!!I(M.pathname,{path:t.routePath,exact:t.routeExact});if(s({type:"route-match-change",match:e}),t.templateId&&!H&&e){const e=document.querySelector("#main-mount-point"),t=new MutationObserver((()=>{1===e.childNodes.length&&"SPAN"===e.firstChild.tagName&&0===e.firstChild.childNodes.length&&(R(),t.disconnect())}));t.observe(e,{childList:!0})}if(t.formId&&!H&&e){const e=document.querySelector("#main-mount-point"),t=new MutationObserver((()=>{1===e.childNodes.length&&"SPAN"===e.firstChild.tagName&&0===e.firstChild.childNodes.length&&(_(),t.disconnect())}));t.observe(e,{childList:!0})}if(t.snippetData&&!H&&e){const e=document.querySelector("#main-mount-point"),t=new MutationObserver((()=>{1===e.childNodes.length&&"SPAN"===e.firstChild.tagName&&0===e.firstChild.childNodes.length&&(O(),t.disconnect())}));t.observe(e,{childList:!0})}H=e}}function j(){var e;const t=document.querySelector("eo-page-view"),o=(null==t||null===(e=t.shadowRoot)||void 0===e?void 0:e.querySelector(".content"))??null;var n;o!==x&&(null===(n=x)||void 0===n||n.removeEventListener("scroll",F),null==o||o.addEventListener("scroll",F),x=o,C=t)}function F(){s({type:"content-scroll",scroll:{x:this.scrollLeft,y:this.scrollTop}})}V(q.location),q.listen(V),t.templateId&&R(),(t.formId||t.formData)&&_(),t.snippetData&&O();const U=()=>{var e;const o=t.routeId,n=E.getLegalRuntimeValue({routeId:o});s({type:"inspect-runtime-data-value",data:{...(0,i.omit)(n,"query"),query:n.query?Object.fromEntries(n.query.entries()):{},path:null===(e=n.match)||void 0===e?void 0:e.params}})};let W;function Y(e){const o=t.templateId?A():void 0;var n,a;(W!==o||e)&&(W=o,null===(n=(a=E).setRealTimeDataInspectRoot)||void 0===n||n.call(a,{tplStateStoreId:o}))}null===(o=(r=E).addRealTimeDataInspectHook)||void 0===o||o.call(r,(e=>{let{changeType:t,tplStateStoreId:o,detail:n}=e;s({type:"real-time-data-inspect-change",changeType:t,tplStateStoreId:o,detail:"update"===t?{name:n.name,annotation:f(n.value)}:{data:Object.fromEntries(Object.entries(n.data).map((e=>{let[t,o]=e;return[t,f(o)]})))}})})),window.addEventListener("route.render",(()=>{Y(!0),U()})),j(),Y(!0),U(),new MutationObserver((0,i.throttle)((()=>{j(),Y(),u&&D("hover",u,g),k&&D("active",k,P)}),100,{leading:!1})).observe(document.body,{subtree:!0,childList:!0})}function T(e,t){if(!e)return[];const o=e.includes("#"),n=function(e,t){return e.map((e=>{var o;const n=null===(o=C)||void 0===o?void 0:o.contains(e),{width:a,height:r,left:i,top:s}=e.getBoundingClientRect();return{width:a,height:r,left:i+window.scrollX+(n?x.scrollLeft:0),top:s+window.scrollY+(n?x.scrollTop:0),alias:t,hasContentScroll:n}}))}(N(e,o),t);return o?n.map((e=>({...e,height:window.innerHeight-e.top}))):n}function N(e,t){const o=[];return function n(a){const r=a.querySelectorAll(t?e:`[data-iid="${e}"]`);if(o.push(...r),!(a===document&&r.length>0))for(const e of a.querySelectorAll("*"))e.shadowRoot&&n(e.shadowRoot)}(document),o}function A(){var e;const t=document.querySelector("#main-mount-point");return null==t||null===(e=t.firstChild)||void 0===e?void 0:e.dataset[k?"tplContextId":"tplStateStoreId"]}}}]);
2
+ //# sourceMappingURL=9027.e3490283.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"chunks/9027.21af2a5d.js","mappings":"yMAgCO,SAASA,EAAqBC,GACnC,MAAMC,EArBR,SAAiBC,GACf,MAAMD,EAAa,IAAIE,IAgBvB,OAdAC,EAAAA,EAAAA,GAASF,GAAcG,IACrB,OAAQA,EAAKC,MACX,IAAK,aACL,IAAK,eAAgB,KAAAC,EACnB,MAAMC,EACI,QADOD,EACfF,EAAKI,WAAG,IAAAF,OAAA,EADUA,EAEjBC,YACCA,GACFP,EAAWS,IAAIF,EAEnB,EACF,IAGKP,CACT,CAGqBU,EAAQC,EAAAA,EAAAA,IAAgBZ,IAErCa,EAAY,GAElB,IAAK,MAAMC,KAAQb,EACba,EAAKC,SAAS,MAChBF,EAAUG,KAAKF,GAInB,OAAOD,CACT,CAEAI,eAAeC,OACb,yCACAC,EAAAA,EAAAA,qBAAoBpB,G,yGCvCf,IAAIqB,EAsCX,SAASC,EAAQC,GACfA,EAAMC,iBACND,EAAME,kBAmFR,SAAqBC,GACnB,MAAMC,EAAUC,EAAwBF,GACpCC,EAAQE,OAAS,GACnBC,OAAOC,OAAOC,YACZ,CACEC,OAAQ,YACR1B,KAAM,eACNoB,WAEFN,EAGN,CA9FEa,CAAYX,EAAMY,eACpB,CAEA,SAASC,EAAab,GACpBA,EAAMC,iBACND,EAAME,iBACR,CAEA,MAAMY,GAAeC,EAAAA,EAAAA,WAClBZ,IACC,MAAMC,EAAUC,EAAwBF,GAEpCC,EAAQE,OAAS,GACnBC,OAAOC,OAAOC,YACZ,CACEC,OAAQ,YACR1B,KAAM,iBACNoB,WAEFN,EAEJ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AAjBA,EAAmBE,SAAS1I,IAC/C,MAAEmC,EAAK,OAAEE,EAAM,KAAEsG,EAAI,IAAEC,GAAQ5I,EAAQ6I,wBAC7C,MAAO,CACL1G,QACAE,SACAsG,KACEA,EACA3P,OAAOoM,SACNqD,EAAmBrL,EAAqB2J,WAAa,GACxD6B,IACEA,EACA5P,OAAOqM,SACNoD,EAAmBrL,EAAqB4J,UAAY,GACvD7I,QACAsK,mBACD,GAEL,CA1DmBK,CADAC,EAAgCvO,EAAK8N,GACfnK,GACvC,OAAOmK,EACHlK,EAAS1B,KAAKzE,IAAI,IACbA,EACHoK,OAAQrJ,OAAOsJ,YAAcrK,EAAK2Q,QAEpCxK,CACN,CAEO,SAAS2K,EACdvO,EACA8N,GAEA,MAAMC,EAA0B,GAuBhC,OArBA,SAASS,EAAKC,GACZ,MAAMC,EAAaD,EAAKE,iBACtBb,EAAS9N,EAAM,cAAcA,OAK/B,GAHA+N,EAASpQ,QAAQ+Q,KAGbD,IAAShJ,UAAYiJ,EAAWnQ,OAAS,GAK7C,IAAK,MAAMd,KAAQgR,EAAKE,iBAAiB,KACnClR,EAAK0O,YACPqC,EAAK/Q,EAAK0O,WAGhB,CAEAqC,CAAK/I,UAEEsI,CACT,CAuBA,SAASxE,IAA6C,IAAAqF,EACpD,MAAMrD,EAAiB9F,SAAS+F,cAAc,qBAE9C,OAAQD,SAA0B,QAAZqD,EAAdrD,EAAgBK,kBAAU,IAAAgD,OAAA,EAA3BA,EAA6C7O,QAClDe,EAAO,eAAiB,kBAE5B,C","sources":["webpack:///./src/data-providers/collect-used-contracts.ts","webpack:///./src/data-providers/preview/inspector.ts","webpack:///./src/data-providers/preview/realTimeDataInspect.ts","webpack:///./src/data-providers/preview/connect.ts","webpack:///./src/data-providers/preview/capture.ts","webpack:///./src/data-providers/preview/resizeScreenshot.ts"],"sourcesContent":["import { createProviderClass } from \"@next-core/utils/general\";\nimport {\n type StoryboardNode,\n parseStoryboard,\n traverse,\n} from \"@next-core/storyboard\";\nimport {\n Storyboard,\n UseProviderResolveConf,\n UseProviderEventHandler,\n} from \"@next-core/types\";\n\nfunction collect(nodeOrNodes: StoryboardNode | StoryboardNode[]): Set<string> {\n const collection = new Set<string>();\n\n traverse(nodeOrNodes, (node) => {\n switch (node.type) {\n case \"Resolvable\":\n case \"EventHandler\": {\n const useProvider = (\n node.raw as UseProviderResolveConf | UseProviderEventHandler\n )?.useProvider;\n if (useProvider) {\n collection.add(useProvider);\n }\n }\n }\n });\n\n return collection;\n}\n\nexport function collectUsedContracts(storyboard: Storyboard): string[] {\n const collection = collect(parseStoryboard(storyboard as any));\n\n const contracts = [];\n\n for (const item of collection) {\n if (item.includes(\"@\")) {\n contracts.push(item);\n }\n }\n\n return contracts;\n}\n\ncustomElements.define(\n \"visual-builder.collect-used-contracts\",\n createProviderClass(collectUsedContracts)\n);\n","// istanbul ignore file: working in progress\n// https://github.com/facebook/react/blob/cae635054e17a6f107a39d328649137b83f25972/packages/react-devtools-shared/src/backend/views/Highlighter/index.js\nimport { throttle } from \"lodash\";\nimport type {\n PreviewMessagePreviewerHoverOnBrick,\n PreviewMessagePreviewerSelectBrick,\n PreviewMessagePreviewerContextMenuOnBrick,\n} from \"./interfaces.js\";\n\nexport let previewProxyOrigin: string;\n\nexport function setPreviewFromOrigin(origin: string): void {\n previewProxyOrigin = origin;\n}\n\nexport function startInspecting(): void {\n registerListeners();\n}\n\nexport function stopInspecting(): void {\n unregisterListeners();\n}\n\nfunction registerListeners(): void {\n window.addEventListener(\"click\", onClick, true);\n window.addEventListener(\"mousedown\", onMouseEvent, true);\n window.addEventListener(\"mouseover\", onMouseEvent, true);\n window.addEventListener(\"mouseup\", onMouseEvent, true);\n window.addEventListener(\"pointerdown\", onPointerDown, true);\n window.addEventListener(\"pointermove\", onPointerMove, true);\n window.addEventListener(\"pointerup\", onMouseEvent, true);\n window.addEventListener(\"pointerleave\", onPointerLeave, true);\n window.addEventListener(\"contextmenu\", onContextMenu, true);\n}\n\nfunction unregisterListeners(): void {\n window.removeEventListener(\"click\", onClick, true);\n window.removeEventListener(\"mousedown\", onMouseEvent, true);\n window.removeEventListener(\"mouseover\", onMouseEvent, true);\n window.removeEventListener(\"mouseup\", onMouseEvent, true);\n window.removeEventListener(\"pointerdown\", onPointerDown, true);\n window.removeEventListener(\"pointermove\", onPointerMove, true);\n window.removeEventListener(\"pointerup\", onMouseEvent, true);\n window.removeEventListener(\"pointerleave\", onPointerLeave, true);\n window.removeEventListener(\"contextmenu\", onContextMenu, true);\n}\n\nfunction onClick(event: MouseEvent): void {\n event.preventDefault();\n event.stopPropagation();\n selectBrick(event.composedPath());\n}\n\nfunction onMouseEvent(event: MouseEvent): void {\n event.preventDefault();\n event.stopPropagation();\n}\n\nconst hoverOnBrick = throttle(\n (eventTargets: EventTarget[]) => {\n const iidList = getPossibleBrickTargets(eventTargets);\n\n if (iidList.length > 0) {\n window.parent.postMessage(\n {\n sender: \"previewer\",\n type: \"hover-on-brick\",\n iidList,\n } as PreviewMessagePreviewerHoverOnBrick,\n previewProxyOrigin\n );\n }\n },\n 100,\n { leading: false }\n);\n\nfunction onPointerDown(event: MouseEvent): void {\n event.preventDefault();\n event.stopPropagation();\n hoverOnBrick(event.composedPath());\n}\n\nfunction onPointerMove(event: MouseEvent): void {\n event.preventDefault();\n event.stopPropagation();\n hoverOnBrick(event.composedPath());\n}\n\nfunction onPointerLeave(event: MouseEvent): void {\n event.preventDefault();\n event.stopPropagation();\n window.parent.postMessage(\n {\n sender: \"previewer\",\n type: \"hover-on-brick\",\n iidList: [],\n } as PreviewMessagePreviewerHoverOnBrick,\n previewProxyOrigin\n );\n}\n\nfunction onContextMenu(event: MouseEvent): void {\n event.preventDefault();\n event.stopPropagation();\n contextMenuOnBrick(event.composedPath(), {\n x: event.clientX,\n y: event.clientY,\n });\n}\n\nfunction contextMenuOnBrick(\n eventTargets: EventTarget[],\n position: {\n x: number;\n y: number;\n }\n): void {\n const iidList = getPossibleBrickTargets(eventTargets);\n if (iidList.length > 0) {\n window.parent.postMessage(\n {\n sender: \"previewer\",\n type: \"context-menu-on-brick\",\n iidList,\n position,\n } as PreviewMessagePreviewerContextMenuOnBrick,\n previewProxyOrigin\n );\n }\n}\n\nfunction selectBrick(eventTargets: EventTarget[]): void {\n const iidList = getPossibleBrickTargets(eventTargets);\n if (iidList.length > 0) {\n window.parent.postMessage(\n {\n sender: \"previewer\",\n type: \"select-brick\",\n iidList,\n } as PreviewMessagePreviewerSelectBrick,\n previewProxyOrigin\n );\n }\n}\n\nexport function getPossibleBrickIidList(brick: HTMLElement): string[] {\n const iidList: string[] = [];\n // Traverse from bottom to up, to find bricks current hover on.\n let cursor: HTMLElement | null = brick;\n while (cursor) {\n if (typeof cursor.dataset.iid === \"string\") {\n iidList.push(cursor.dataset.iid);\n }\n cursor = cursor.parentElement;\n }\n return iidList;\n}\n\nexport function getPossibleBrickTargets(eventTargets: EventTarget[]) {\n const targets: string[] = [];\n for (const target of eventTargets) {\n if (\n target instanceof HTMLElement &&\n typeof target.dataset.iid === \"string\"\n ) {\n targets.push(target.dataset.iid);\n }\n }\n return targets;\n}\n","export function getRealTimeDataAnnotation(value: unknown) {\n const type = typeof value;\n switch (type) {\n case \"string\":\n case \"boolean\":\n case \"number\":\n return {\n type,\n value,\n };\n case \"undefined\":\n return { type };\n }\n if (value === null) {\n return { type: \"null\" };\n }\n if (Array.isArray(value)) {\n return { type: \"array\", length: value.length };\n }\n return { type: \"object\" };\n}\n","import {\n getHistory as _getHistory,\n getBasePath,\n matchPath as _matchPath,\n __secret_internals as _internals,\n type NextLocation,\n} from \"@next-core/runtime\";\nimport { HttpResponseError } from \"@next-core/http\";\nimport { flowApi as _flowAPi } from \"@next-core/easyops-runtime\";\nimport type {\n BrickConf,\n Contract,\n CustomTemplate,\n RouteConf,\n} from \"@next-core/types\";\nimport { isEmpty, throttle, omit } from \"lodash\";\nimport type {\n BrickOutline,\n HighLightNode,\n Position,\n PreviewDataOption,\n PreviewMessageFromPreviewer,\n PreviewMessagePreviewContractUpdate,\n PreviewMessagePreviewDataValueError,\n PreviewMessagePreviewDataValueSuccess,\n PreviewMessagePreviewDebugValueSuccess,\n PreviewMessagePreviewDebugValueError,\n PreviewMessagePreviewerCaptureFailed,\n PreviewMessagePreviewerCaptureOk,\n PreviewMessagePreviewerContentScroll,\n PreviewMessagePreviewerHighlightBrick,\n PreviewMessagePreviewerHighlightContext,\n PreviewMessagePreviewerHoverOnMain,\n PreviewMessagePreviewerRealTimeDataInspectChange,\n PreviewMessagePreviewerRouteMatchChange,\n PreviewMessagePreviewerScroll,\n PreviewMessagePreviewerUrlChange,\n PreviewMessageToPreviewer,\n PreviewSettings,\n PreviewStartOptions,\n PreviewDebugData,\n PreviewMessagePreviewInspectRuntimeValue,\n} from \"./interfaces.js\";\nimport { capture } from \"./capture.js\";\nimport {\n previewProxyOrigin,\n getPossibleBrickIidList,\n setPreviewFromOrigin,\n startInspecting,\n stopInspecting,\n} from \"./inspector.js\";\nimport { collectUsedContracts } from \"../collect-used-contracts.js\";\nimport { getRealTimeDataAnnotation } from \"./realTimeDataInspect.js\";\n\nlet connected = false;\n\ninterface DLL {\n (moduleId: \"tYg3\"): {\n getHistory: typeof _getHistory;\n developHelper: typeof _internals;\n collectDebugContract: typeof flowApi.collectDebugContract;\n };\n (moduleId: \"A+yw\"): {\n matchPath: typeof _matchPath;\n };\n}\n\nlet getHistory = _getHistory;\nlet matchPath = _matchPath;\nlet __secret_internals = _internals;\nlet flowApi = _flowAPi;\nlet isV2 = false;\n\n// istanbul ignore next\n// Make v3 bricks compatible with Brick Next v2.\ntry {\n const dll = (window as unknown as { dll?: DLL }).dll;\n if (\n dll &&\n window.BRICK_NEXT_VERSIONS?.[\"brick-container\"]?.startsWith(\"2.\")\n ) {\n const {\n getHistory: getHistoryV2,\n developHelper: developHelperV2,\n collectDebugContract,\n } = dll(\"tYg3\");\n const { matchPath: matchPathV2 } = dll(\"A+yw\");\n getHistory = getHistoryV2;\n matchPath = matchPathV2;\n // The `__secret_internals` of v3 has pretty the same API as\n // `developHelper` of v2, especially those for preview usage.\n __secret_internals = {\n ...developHelperV2,\n getContextValue(name, { tplStateStoreId }) {\n return developHelperV2.getContextValue(name, {\n tplContextId: tplStateStoreId,\n } as any);\n },\n getAllContextValues({ tplStateStoreId }) {\n // V3 returns an object of key-value.\n // While v2 returns a map of ContextItem.\n const v2Map = developHelperV2.getAllContextValues({\n tplContextId: tplStateStoreId,\n } as any) as unknown as Map<string, { value: unknown }>;\n return Object.fromEntries(\n [...v2Map].map(([k, v]) => [k, (v as any).value])\n );\n },\n debugDataValue(data, { tplStateStoreId }) {\n return developHelperV2.debugDataValue(data, {\n tplContextId: tplStateStoreId,\n } as any);\n },\n };\n\n flowApi = {\n collectDebugContract,\n } as any;\n isV2 = true;\n }\n} catch (e) {\n // eslint-disable-next-line no-console\n console.error(\"Try to use v2 runtime APIs failed:\", e);\n}\n\nlet contentScrollElement: Element | null = null;\nlet contentScrollHost: Element | null = null;\n\nexport default async function connect(\n previewFromOrigin: string,\n options: PreviewStartOptions\n) {\n if (connected) {\n return;\n }\n connected = true;\n\n const sendMessage = <T extends PreviewMessageFromPreviewer>(\n message: Omit<T, \"sender\">\n ): void => {\n window.parent.postMessage(\n {\n sender: \"previewer\",\n ...message,\n },\n previewFromOrigin\n );\n };\n\n sendMessage({ type: \"preview-started\" });\n setPreviewFromOrigin(previewFromOrigin);\n\n let hoverIid: string;\n let hoverAlias: string;\n let activeIid: string;\n let activeAlias: string;\n\n const handleHoverOnIframe = (pos: Position): void => {\n const element = document.elementFromPoint(pos.x, pos.y);\n if (element?.tagName === \"BODY\") {\n window.parent.postMessage(\n {\n sender: \"previewer\",\n type: \"hover-on-main\",\n isDirection: true,\n position: {\n x: pos.x,\n y: pos.y,\n },\n } as PreviewMessagePreviewerHoverOnMain,\n previewProxyOrigin\n );\n } else {\n const iidList = getPossibleBrickIidList(element as HTMLElement);\n window.parent.postMessage(\n {\n sender: \"previewer\",\n type: \"hover-on-brick\",\n iidList,\n isDirection: true,\n position: {\n x: pos.x,\n y: pos.y,\n },\n },\n previewProxyOrigin\n );\n }\n };\n\n const sendHighlightBrickOutlines = (\n type: \"hover\" | \"active\",\n iid: string,\n alias: string\n ): void => {\n const outlines = getBrickOutlines(iid);\n sendMessage<PreviewMessagePreviewerHighlightBrick>({\n type: \"highlight-brick\",\n highlightType: type,\n outlines,\n iid: iid,\n alias: alias,\n });\n };\n\n const sendHighlightBricksOutlines = (nodes: HighLightNode[]): void => {\n const outlines = nodes\n .map((node) => getBrickOutlines(node.iid, node.alias))\n .flat();\n sendMessage<PreviewMessagePreviewerHighlightContext>({\n type: \"highlight-context\",\n outlines,\n });\n };\n\n let lastTemplatePreviewSettings: PreviewSettings | undefined;\n if (options.templateId) {\n lastTemplatePreviewSettings = options.settings;\n }\n\n const updateTemplatePreviewSettings = (): void => {\n __secret_internals.updateTemplatePreviewSettings(\n options.appId,\n options.templateId!,\n lastTemplatePreviewSettings\n );\n getHistory().reload();\n };\n\n const updateSnippetPreviewSettings = (): void => {\n __secret_internals.updateSnippetPreviewSettings(\n options.appId,\n JSON.parse(options.snippetData)\n );\n getHistory().reload();\n };\n\n const updateFormPreviewSettings = (): void => {\n (__secret_internals as any).updateFormPreviewSettings(\n options.appId,\n options.formId,\n options.formData\n );\n getHistory().reload();\n };\n\n const handlePreviewData = (name: string, option: PreviewDataOption): void => {\n try {\n const { dataType } = option;\n let tplStateStoreId;\n\n if (dataType === \"state\") {\n tplStateStoreId = getRootTplStateStoreId();\n\n if (!tplStateStoreId) {\n sendMessage<PreviewMessagePreviewDataValueError>({\n type: \"inspect-data-value-error\",\n data: {\n error: {\n message:\n \"tplStateStoreId not found, unable to preview STATE value\",\n },\n },\n });\n\n return;\n }\n }\n\n let value, type: PreviewMessagePreviewDataValueSuccess[\"type\"];\n if (name) {\n type = \"inspect-single-data-value-success\";\n value = __secret_internals.getContextValue(name, {\n tplStateStoreId,\n });\n } else {\n type = \"inspect-all-data-values-success\";\n const data = __secret_internals.getAllContextValues({\n tplStateStoreId,\n });\n value = Object.entries(data).map(([name, value]) => ({ name, value }));\n }\n\n sendMessage<PreviewMessagePreviewDataValueSuccess>({\n type,\n data: {\n name,\n value,\n },\n });\n\n // istanbul ignore next\n } catch (error) {\n sendMessage<PreviewMessagePreviewDataValueError>({\n type: \"inspect-data-value-error\",\n data: {\n message: (error as Error).message,\n },\n });\n }\n };\n\n const debugDataValue = async (\n data: PreviewDebugData,\n contractData: Contract,\n previewOption: PreviewDataOption\n ) => {\n try {\n if (contractData) {\n flowApi.collectDebugContract([contractData]);\n }\n const value = await __secret_internals.debugDataValue(data, {\n tplStateStoreId:\n previewOption.dataType === \"state\"\n ? getRootTplStateStoreId()\n : undefined,\n routeId: options.routeId,\n });\n\n sendMessage<PreviewMessagePreviewDebugValueSuccess>({\n type: \"debug-data-value-success\",\n data: {\n debugConf: data,\n value,\n },\n });\n } catch (error) {\n sendMessage<PreviewMessagePreviewDebugValueError>({\n type: \"debug-data-value-error\",\n data:\n error instanceof HttpResponseError\n ? error.responseJson\n : { message: (error as Error).message },\n });\n }\n };\n\n const history = getHistory();\n\n window.addEventListener(\n \"message\",\n async ({ data, origin }: MessageEvent<PreviewMessageToPreviewer>) => {\n if (\n origin !== previewFromOrigin ||\n !data ||\n data.sender !== \"preview-container\"\n ) {\n return;\n }\n if (data.forwardedFor === \"builder\") {\n switch (data.type) {\n case \"hover-on-brick\":\n hoverIid = data.iid;\n hoverAlias = data.alias;\n sendHighlightBrickOutlines(\"hover\", data.iid, data.alias);\n break;\n case \"hover-on-main\":\n sendHighlightBrickOutlines(\"hover\", \"#main-mount-point\", \"root\");\n break;\n case \"hover-on-context\":\n sendHighlightBricksOutlines(data.highlightNodes);\n break;\n case \"select-brick\":\n activeIid = data.iid;\n activeAlias = data.alias;\n sendHighlightBrickOutlines(\"active\", data.iid, data.alias);\n break;\n case \"hover-on-iframe\":\n handleHoverOnIframe(data.position);\n break;\n }\n } else\n switch (data.type) {\n case \"toggle-inspecting\":\n data.enabled ? startInspecting() : stopInspecting();\n break;\n case \"refresh\":\n if (data.options?.updateStoryboardType) {\n if (data.options.updateStoryboardType === \"route\") {\n __secret_internals.updateStoryboardByRoute(\n options.appId,\n data.storyboardPatch as RouteConf\n );\n } else if (data.options.updateStoryboardType === \"template\") {\n __secret_internals.updateStoryboardByTemplate(\n options.appId,\n data.storyboardPatch as CustomTemplate,\n data.options.settings\n );\n } else if (data.options.updateStoryboardType === \"snippet\") {\n __secret_internals.updateStoryboardBySnippet(\n options.appId,\n data.storyboardPatch as {\n snippetId: string;\n bricks: BrickConf[];\n }\n );\n } else if (data.options.updateStoryboardType === \"form\") {\n (__secret_internals as any).updateFormPreviewSettings(\n options.appId,\n options.formId,\n data.storyboardPatch\n );\n }\n\n let newContracts;\n if (data.options?.updateStoryboardType !== \"form\") {\n newContracts = await (\n __secret_internals as any\n ).getAddedContracts?.(data.storyboardPatch, {\n appId: options.appId,\n updateStoryboardType: data.options.updateStoryboardType,\n formId: options.formId,\n collectUsedContracts,\n });\n }\n\n if (!isEmpty(newContracts)) {\n sendMessage<PreviewMessagePreviewContractUpdate>({\n type: \"contract-update\",\n data: {\n add: newContracts,\n },\n });\n } else {\n getHistory().reload();\n }\n\n break;\n }\n __secret_internals.updateStoryboard(\n options.appId,\n data.storyboardPatch\n );\n if (options.templateId) {\n lastTemplatePreviewSettings = data.settings;\n updateTemplatePreviewSettings();\n } else if (options.formId || options.formData) {\n updateFormPreviewSettings();\n } else if (data.options?.snippetData) {\n options.snippetData = data.options.snippetData;\n updateSnippetPreviewSettings();\n } else {\n getHistory().reload();\n }\n break;\n case \"reload\":\n location.reload();\n break;\n case \"back\":\n history.goBack();\n break;\n case \"forward\":\n history.goForward();\n break;\n case \"capture\":\n capture(data.maxWidth, data.maxHeight).then(\n (screenshot) => {\n sendMessage<PreviewMessagePreviewerCaptureOk>({\n type: \"capture-ok\",\n screenshot,\n });\n },\n () => {\n sendMessage<PreviewMessagePreviewerCaptureFailed>({\n type: \"capture-failed\",\n });\n }\n );\n break;\n case \"inspect-data-value\":\n handlePreviewData(data.name, data.option);\n break;\n case \"update-preview-url\": {\n // Remove origin first.\n const url = data.previewUrl.startsWith(window.origin)\n ? data.previewUrl.substring(window.origin.length)\n : data.previewUrl;\n // Then remove base path.\n const basePath = getBasePath();\n const to = url.startsWith(basePath)\n ? url.substring(basePath.length - 1)\n : url;\n getHistory().push(to);\n break;\n }\n case \"update-preview-route\": {\n options.routePath = data.routePath;\n options.routeExact = data.routeExact;\n syncRouteMatch();\n break;\n }\n case \"debug-data-value\":\n debugDataValue(data.debugData, data.contractData, data.options);\n break;\n /* case \"excute-proxy-method\": {\n const [ref, method, args = []] = data.proxyMethodArgs;\n try {\n const result = document.body.querySelector(ref)[method](...args);\n window.parent.postMessage({\n sender: \"previewer\",\n type: \"excute-proxy-method-success\",\n data: { method: method, res: result },\n });\n } catch (err) {\n window.parent.postMessage({\n sender: \"previewer\",\n type: \"excute-proxy-method-error\",\n data: { method: method, res: err.message },\n });\n }\n break;\n } */\n }\n }\n );\n\n window.addEventListener(\"scroll\", () => {\n sendMessage<PreviewMessagePreviewerScroll>({\n type: \"scroll\",\n scroll: {\n x: window.scrollX,\n y: window.scrollY,\n },\n });\n });\n\n let previewPageMatch = true;\n let currentLocation: NextLocation;\n const sendLocationChange = (loc: NextLocation): void => {\n sendMessage<PreviewMessagePreviewerUrlChange>({\n type: \"url-change\",\n url: location.origin + history.createHref(loc),\n });\n currentLocation = loc;\n syncRouteMatch();\n };\n\n function syncRouteMatch() {\n if (options.routePath) {\n const match = !!matchPath(currentLocation.pathname, {\n path: options.routePath,\n exact: options.routeExact,\n });\n sendMessage<PreviewMessagePreviewerRouteMatchChange>({\n type: \"route-match-change\",\n match,\n });\n\n // Re-update template preview settings once match route again (typically after login).\n if (options.templateId && !previewPageMatch && match) {\n const mainMountPoint = document.querySelector(\"#main-mount-point\")!;\n const placeholderLoadObserver = new MutationObserver(() => {\n // We observe when the placeholder is appeared.\n if (\n mainMountPoint.childNodes.length === 1 &&\n (mainMountPoint.firstChild as HTMLElement).tagName === \"SPAN\" &&\n mainMountPoint.firstChild!.childNodes.length === 0\n ) {\n updateTemplatePreviewSettings();\n placeholderLoadObserver.disconnect();\n }\n });\n placeholderLoadObserver.observe(mainMountPoint, { childList: true });\n }\n if (options.formId && !previewPageMatch && match) {\n const mainMountPoint = document.querySelector(\"#main-mount-point\");\n const placeholderLoadObserver = new MutationObserver(() => {\n // We observe when the placeholder is appeared.\n if (\n mainMountPoint.childNodes.length === 1 &&\n (mainMountPoint.firstChild as HTMLElement).tagName === \"SPAN\" &&\n mainMountPoint.firstChild.childNodes.length === 0\n ) {\n updateFormPreviewSettings();\n placeholderLoadObserver.disconnect();\n }\n });\n placeholderLoadObserver.observe(mainMountPoint, { childList: true });\n }\n if (options.snippetData && !previewPageMatch && match) {\n const mainMountPoint = document.querySelector(\"#main-mount-point\")!;\n const placeholderLoadObserver = new MutationObserver(() => {\n // We observe when the placeholder is appeared.\n if (\n mainMountPoint.childNodes.length === 1 &&\n (mainMountPoint.firstChild as HTMLElement).tagName === \"SPAN\" &&\n mainMountPoint.firstChild!.childNodes.length === 0\n ) {\n updateSnippetPreviewSettings();\n placeholderLoadObserver.disconnect();\n }\n });\n placeholderLoadObserver.observe(mainMountPoint, { childList: true });\n }\n previewPageMatch = match;\n }\n }\n\n sendLocationChange(history.location);\n\n history.listen(sendLocationChange);\n\n if (options.templateId) {\n updateTemplatePreviewSettings();\n }\n\n if (options.formId || options.formData) {\n updateFormPreviewSettings();\n }\n\n if (options.snippetData) {\n updateSnippetPreviewSettings();\n }\n\n function setupContentScroll() {\n const host = document.querySelector(\"eo-page-view\");\n const element = host?.shadowRoot?.querySelector(\".content\") ?? null;\n if (element !== contentScrollElement) {\n contentScrollElement?.removeEventListener(\"scroll\", onContentScroll);\n element?.addEventListener(\"scroll\", onContentScroll);\n contentScrollElement = element;\n contentScrollHost = host;\n }\n }\n\n function onContentScroll(this: Element) {\n sendMessage<PreviewMessagePreviewerContentScroll>({\n type: \"content-scroll\",\n scroll: {\n x: this.scrollLeft,\n y: this.scrollTop,\n },\n });\n }\n\n const setupRuntimeValueInspect = () => {\n const routeId = options.routeId;\n\n const data = __secret_internals.getLegalRuntimeValue({ routeId });\n sendMessage<PreviewMessagePreviewInspectRuntimeValue>({\n type: \"inspect-runtime-data-value\",\n data: {\n ...omit(data, \"query\"),\n query: data.query ? Object.fromEntries(data.query.entries()) : {},\n path: data.match?.params,\n },\n });\n };\n\n __secret_internals.addRealTimeDataInspectHook?.(\n ({ changeType, tplStateStoreId, detail }) => {\n sendMessage<PreviewMessagePreviewerRealTimeDataInspectChange>({\n type: \"real-time-data-inspect-change\",\n changeType,\n tplStateStoreId,\n detail:\n changeType === \"update\"\n ? {\n name: detail.name,\n annotation: getRealTimeDataAnnotation(detail.value),\n }\n : {\n data: Object.fromEntries(\n Object.entries(detail.data).map(([k, v]) => [\n k,\n getRealTimeDataAnnotation(v),\n ])\n ),\n },\n });\n }\n );\n\n let memoizedRootTplStateStoreId: string | undefined;\n\n function setupRealTimeDataInspect(force?: boolean) {\n const tplStateStoreId = options.templateId\n ? getRootTplStateStoreId()\n : undefined;\n if (memoizedRootTplStateStoreId !== tplStateStoreId || force) {\n memoizedRootTplStateStoreId = tplStateStoreId;\n __secret_internals.setRealTimeDataInspectRoot?.({\n tplStateStoreId,\n });\n }\n }\n\n window.addEventListener(\"route.render\", () => {\n setupRealTimeDataInspect(true);\n setupRuntimeValueInspect();\n });\n\n setupContentScroll();\n setupRealTimeDataInspect(true);\n setupRuntimeValueInspect();\n\n const mutationCallback = (): void => {\n setupContentScroll();\n setupRealTimeDataInspect();\n if (hoverIid) {\n sendHighlightBrickOutlines(\"hover\", hoverIid, hoverAlias);\n }\n if (activeIid) {\n sendHighlightBrickOutlines(\"active\", activeIid, activeAlias);\n }\n };\n const mutationObserver = new MutationObserver(\n throttle(mutationCallback, 100, { leading: false })\n );\n mutationObserver.observe(document.body, { subtree: true, childList: true });\n}\n\nfunction getBrickOutlines(iid: string, alias?: string): BrickOutline[] {\n if (!iid) {\n return [];\n }\n const isRoot = iid.includes(\"#\");\n const elements = getElementsIncludingInShadowDOM(iid, isRoot);\n const outlines = getOutlines(elements, alias);\n return isRoot\n ? outlines.map((item) => ({\n ...item,\n height: window.innerHeight - item.top,\n }))\n : outlines;\n}\n\nexport function getElementsIncludingInShadowDOM(\n iid: string,\n isRoot?: boolean\n): HTMLElement[] {\n const elements: HTMLElement[] = [];\n\n function walk(root: Document | ShadowRoot) {\n const candidates = root.querySelectorAll<HTMLElement>(\n isRoot ? iid : `[data-iid=\"${iid}\"]`\n );\n elements.push(...candidates);\n\n // If elements are found in the document, we should stop searching in shadow DOM.\n if (root === document && candidates.length > 0) {\n return;\n }\n\n // These useBrick in v3 bricks will be inside shadow DOM.\n for (const item of root.querySelectorAll(\"*\")) {\n if (item.shadowRoot) {\n walk(item.shadowRoot);\n }\n }\n }\n\n walk(document);\n\n return elements;\n}\n\nfunction getOutlines(elements: HTMLElement[], alias?: string): BrickOutline[] {\n return elements.map((element) => {\n const hasContentScroll = contentScrollHost?.contains(element);\n const { width, height, left, top } = element.getBoundingClientRect();\n return {\n width,\n height,\n left:\n left +\n window.scrollX +\n (hasContentScroll ? contentScrollElement.scrollLeft : 0),\n top:\n top +\n window.scrollY +\n (hasContentScroll ? contentScrollElement.scrollTop : 0),\n alias,\n hasContentScroll,\n };\n });\n}\n\nfunction getRootTplStateStoreId(): string | undefined {\n const mainMountPoint = document.querySelector(\"#main-mount-point\")!;\n\n return (mainMountPoint?.firstChild as HTMLElement)?.dataset[\n isV2 ? \"tplContextId\" : \"tplStateStoreId\"\n ];\n}\n","// istanbul ignore file: nothing logical except calling html2canvas.\nimport html2canvas from \"html2canvas\";\nimport { resizeScreenshot } from \"./resizeScreenshot.js\";\n\nfunction getCanvasBlob(canvas: HTMLCanvasElement): Promise<Blob> {\n return new Promise(function (resolve, reject) {\n canvas.toBlob(function (blob: Blob | null) {\n if (blob) {\n resolve(blob);\n } else {\n reject();\n }\n });\n });\n}\n\nexport async function capture(\n maxWidth: number,\n maxHeight: number\n): Promise<Blob> {\n const sourceCanvas = await html2canvas(document.body, {\n logging: false,\n scale: 1,\n width: window.innerWidth,\n height: window.innerHeight,\n foreignObjectRendering: true,\n });\n const targetCanvas = document.createElement(\"canvas\");\n resizeScreenshot(sourceCanvas, targetCanvas, maxWidth, maxHeight);\n const blob = await getCanvasBlob(targetCanvas);\n return blob;\n}\n","export function resizeScreenshot(\n canvas: HTMLCanvasElement,\n targetCanvas: HTMLCanvasElement,\n maxWidth: number,\n maxHeight: number\n): string {\n const targetRatio = maxWidth / maxHeight;\n const { width, height } = canvas;\n const ratio = width / height;\n const wider = ratio >= targetRatio;\n const finalWidth = wider ? maxWidth : maxHeight * ratio;\n const finalHeight = wider ? maxWidth / ratio : maxHeight;\n targetCanvas.width = finalWidth;\n targetCanvas.height = finalHeight;\n\n const ctx = targetCanvas.getContext(\"2d\")!;\n ctx.drawImage(canvas, 0, 0, width, height, 0, 0, finalWidth, finalHeight);\n return targetCanvas.toDataURL();\n}\n"],"names":["collectUsedContracts","storyboard","collection","nodeOrNodes","Set","traverse","node","type","_node$raw","useProvider","raw","add","collect","parseStoryboard","contracts","item","includes","push","customElements","define","createProviderClass","previewProxyOrigin","onClick","event","preventDefault","stopPropagation","eventTargets","iidList","getPossibleBrickTargets","length","window","parent","postMessage","sender","selectBrick","composedPath","onMouseEvent","hoverOnBrick","throttle","leading","onPointerDown","onPointerMove","onPointerLeave","onContextMenu","position","contextMenuOnBrick","x","clientX","y","clientY","targets","target","HTMLElement","dataset","iid","getRealTimeDataAnnotation","value","Array","isArray","connected","getHistory","_getHistory","matchPath","_matchPath","__secret_internals","_internals","flowApi","_flowAPi","isV2","_window$BRICK_NEXT_VE","dll","BRICK_NEXT_VERSIONS","startsWith","getHistoryV2","developHelper","developHelperV2","collectDebugContract","matchPathV2","getContextValue","name","_ref","tplStateStoreId","tplContextId","getAllContextValues","_ref2","v2Map","Object","fromEntries","map","_ref3","k","v","debugDataValue","data","_ref4","e","console","error","contentScrollElement","contentScrollHost","async","connect","previewFromOrigin","options","_secret_internals$ad","_secret_internals","sendMessage","message","hoverIid","hoverAlias","activeIid","activeAlias","sendHighlightBrickOutlines","alias","outlines","getBrickOutlines","highlightType","lastTemplatePreviewSettings","templateId","settings","updateTemplatePreviewSettings","appId","reload","updateSnippetPreviewSettings","JSON","parse","snippetData","updateFormPreviewSettings","formId","formData","history","addEventListener","_data$options","_data$options3","origin","_ref6","forwardedFor","nodes","flat","sendHighlightBricksOutlines","highlightNodes","pos","element","document","elementFromPoint","tagName","isDirection","brick","cursor","parentElement","getPossibleBrickIidList","handleHoverOnIframe","enabled","removeEventListener","updateStoryboardType","_data$options2","newContracts","_getAddedContracts","_ref7","updateStoryboardByRoute","storyboardPatch","updateStoryboardByTemplate","updateStoryboardBySnippet","getAddedContracts","call","isEmpty","updateStoryboard","location","goBack","goForward","maxWidth","maxHeight","sourceCanvas","html2canvas","body","logging","scale","width","innerWidth","height","innerHeight","foreignObjectRendering","targetCanvas","createElement","canvas","targetRatio","ratio","wider","finalWidth","finalHeight","getContext","drawImage","toDataURL","resizeScreenshot","Promise","resolve","reject","toBlob","blob","capture","then","screenshot","handlePreviewData","option","dataType","getRootTplStateStoreId","entries","_ref5","url","previewUrl","substring","basePath","getBasePath","to","routePath","routeExact","syncRouteMatch","contractData","previewOption","undefined","routeId","debugConf","HttpResponseError","responseJson","debugData","scroll","scrollX","scrollY","currentLocation","previewPageMatch","sendLocationChange","loc","createHref","match","pathname","path","exact","mainMountPoint","querySelector","placeholderLoadObserver","MutationObserver","childNodes","firstChild","disconnect","observe","childList","setupContentScroll","_host$shadowRoot","host","shadowRoot","_contentScrollElement","onContentScroll","this","scrollLeft","scrollTop","listen","setupRuntimeValueInspect","_data$match","getLegalRuntimeValue","omit","query","params","memoizedRootTplStateStoreId","setupRealTimeDataInspect","force","_secret_internals$se","_secret_internals2","setRealTimeDataInspectRoot","addRealTimeDataInspectHook","_ref8","changeType","detail","annotation","_ref9","mutationCallback","subtree","isRoot","elements","_contentScrollHost","hasContentScroll","contains","left","top","getBoundingClientRect","getOutlines","getElementsIncludingInShadowDOM","walk","root","candidates","querySelectorAll","_mainMountPoint$first"],"sourceRoot":""}
1
+ {"version":3,"file":"chunks/9027.e3490283.js","mappings":"yMAgCO,SAASA,EAAqBC,GACnC,MAAMC,EArBR,SAAiBC,GACf,MAAMD,EAAa,IAAIE,IAgBvB,OAdAC,EAAAA,EAAAA,GAASF,GAAcG,IACrB,OAAQA,EAAKC,MACX,IAAK,aACL,IAAK,eAAgB,KAAAC,EACnB,MAAMC,EACI,QADOD,EACfF,EAAKI,WAAG,IAAAF,OAAA,EADUA,EAEjBC,YACCA,GACFP,EAAWS,IAAIF,EAEnB,EACF,IAGKP,CACT,CAGqBU,EAAQC,EAAAA,EAAAA,IAAgBZ,IAErCa,EAAY,GAElB,IAAK,MAAMC,KAAQb,EACba,EAAKC,SAAS,MAChBF,EAAUG,KAAKF,GAInB,OAAOD,CACT,CAEAI,eAAeC,OACb,yCACAC,EAAAA,EAAAA,qBAAoBpB,G,yGCvCf,IAAIqB,EAsCX,SAASC,EAAQC,GACfA,EAAMC,iBACND,EAAME,kBAmFR,SAAqBC,GACnB,MAAMC,EAAUC,EAAwBF,GACpCC,EAAQE,OAAS,GACnBC,OAAOC,OAAOC,YACZ,CACEC,OAAQ,YACR1B,KAAM,eACNoB,WAEFN,EAGN,CA9FEa,CAAYX,EAAMY,eACpB,CAEA,SAASC,EAAab,GACpBA,EAAMC,iBACND,EAAME,iBACR,CAEA,MAAMY,GAAeC,EAAAA,EAAAA,WAClBZ,IACC,MAAMC,EAAUC,EAAwBF,GAEpCC,EAAQE,OAAS,GACnBC,OAAOC,OAAOC,YACZ,CACEC,OAAQ,YACR1B,KAAM,iBACNoB,WAEFN,EAEJ,GAEF,IACA,CAAEkB,SAAS,IAGb,SAASC,EAAcjB,GACrBA,EAAMC,iBACND,EAAME,kBACNY,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AAQ5I,EAAQ6I,wBAC7C,MAAO,CACL1G,QACAE,SACAsG,KACEA,EACA3P,OAAOoM,SACNqD,EAAmBrL,EAAqB2J,WAAa,GACxD6B,IACEA,EACA5P,OAAOqM,SACNoD,EAAmBrL,EAAqB4J,UAAY,GACvD7I,QACAsK,mBACD,GAEL,CA1DmBK,CADAC,EAAgCvO,EAAK8N,GACfnK,GACvC,OAAOmK,EACHlK,EAAS1B,KAAKzE,IAAI,IACbA,EACHoK,OAAQrJ,OAAOsJ,YAAcrK,EAAK2Q,QAEpCxK,CACN,CAEO,SAAS2K,EACdvO,EACA8N,GAEA,MAAMC,EAA0B,GAuBhC,OArBA,SAASS,EAAKC,GACZ,MAAMC,EAAaD,EAAKE,iBACtBb,EAAS9N,EAAM,cAAcA,OAK/B,GAHA+N,EAASpQ,QAAQ+Q,KAGbD,IAAShJ,UAAYiJ,EAAWnQ,OAAS,GAK7C,IAAK,MAAMd,KAAQgR,EAAKE,iBAAiB,KACnClR,EAAK0O,YACPqC,EAAK/Q,EAAK0O,WAGhB,CAEAqC,CAAK/I,UAEEsI,CACT,CAuBA,SAASxE,IAA6C,IAAAqF,EACpD,MAAMrD,EAAiB9F,SAAS+F,cAAc,qBAE9C,OAAQD,SAA0B,QAAZqD,EAAdrD,EAAgBK,kBAAU,IAAAgD,OAAA,EAA3BA,EAA6C7O,QAClDe,EAAO,eAAiB,kBAE5B,C","sources":["webpack:///./src/data-providers/collect-used-contracts.ts","webpack:///./src/data-providers/preview/inspector.ts","webpack:///./src/data-providers/preview/realTimeDataInspect.ts","webpack:///./src/data-providers/preview/connect.ts","webpack:///./src/data-providers/preview/capture.ts","webpack:///./src/data-providers/preview/resizeScreenshot.ts"],"sourcesContent":["import { createProviderClass } from \"@next-core/utils/general\";\nimport {\n type StoryboardNode,\n parseStoryboard,\n traverse,\n} from \"@next-core/storyboard\";\nimport {\n Storyboard,\n UseProviderResolveConf,\n UseProviderEventHandler,\n} from \"@next-core/types\";\n\nfunction collect(nodeOrNodes: StoryboardNode | StoryboardNode[]): Set<string> {\n const collection = new Set<string>();\n\n traverse(nodeOrNodes, (node) => {\n switch (node.type) {\n case \"Resolvable\":\n case \"EventHandler\": {\n const useProvider = (\n node.raw as UseProviderResolveConf | UseProviderEventHandler\n )?.useProvider;\n if (useProvider) {\n collection.add(useProvider);\n }\n }\n }\n });\n\n return collection;\n}\n\nexport function collectUsedContracts(storyboard: Storyboard): string[] {\n const collection = collect(parseStoryboard(storyboard as any));\n\n const contracts = [];\n\n for (const item of collection) {\n if (item.includes(\"@\")) {\n contracts.push(item);\n }\n }\n\n return contracts;\n}\n\ncustomElements.define(\n \"visual-builder.collect-used-contracts\",\n createProviderClass(collectUsedContracts)\n);\n","// istanbul ignore file: working in progress\n// https://github.com/facebook/react/blob/cae635054e17a6f107a39d328649137b83f25972/packages/react-devtools-shared/src/backend/views/Highlighter/index.js\nimport { throttle } from \"lodash\";\nimport type {\n PreviewMessagePreviewerHoverOnBrick,\n PreviewMessagePreviewerSelectBrick,\n PreviewMessagePreviewerContextMenuOnBrick,\n} from \"./interfaces.js\";\n\nexport let previewProxyOrigin: string;\n\nexport function setPreviewFromOrigin(origin: string): void {\n previewProxyOrigin = origin;\n}\n\nexport function startInspecting(): void {\n registerListeners();\n}\n\nexport function stopInspecting(): void {\n unregisterListeners();\n}\n\nfunction registerListeners(): void {\n window.addEventListener(\"click\", onClick, true);\n window.addEventListener(\"mousedown\", onMouseEvent, true);\n window.addEventListener(\"mouseover\", onMouseEvent, true);\n window.addEventListener(\"mouseup\", onMouseEvent, true);\n window.addEventListener(\"pointerdown\", onPointerDown, true);\n window.addEventListener(\"pointermove\", onPointerMove, true);\n window.addEventListener(\"pointerup\", onMouseEvent, true);\n window.addEventListener(\"pointerleave\", onPointerLeave, true);\n window.addEventListener(\"contextmenu\", onContextMenu, true);\n}\n\nfunction unregisterListeners(): void {\n window.removeEventListener(\"click\", onClick, true);\n window.removeEventListener(\"mousedown\", onMouseEvent, true);\n window.removeEventListener(\"mouseover\", onMouseEvent, true);\n window.removeEventListener(\"mouseup\", onMouseEvent, true);\n window.removeEventListener(\"pointerdown\", onPointerDown, true);\n window.removeEventListener(\"pointermove\", onPointerMove, true);\n window.removeEventListener(\"pointerup\", onMouseEvent, true);\n window.removeEventListener(\"pointerleave\", onPointerLeave, true);\n window.removeEventListener(\"contextmenu\", onContextMenu, true);\n}\n\nfunction onClick(event: MouseEvent): void {\n event.preventDefault();\n event.stopPropagation();\n selectBrick(event.composedPath());\n}\n\nfunction onMouseEvent(event: MouseEvent): void {\n event.preventDefault();\n event.stopPropagation();\n}\n\nconst hoverOnBrick = throttle(\n (eventTargets: EventTarget[]) => {\n const iidList = getPossibleBrickTargets(eventTargets);\n\n if (iidList.length > 0) {\n window.parent.postMessage(\n {\n sender: \"previewer\",\n type: \"hover-on-brick\",\n iidList,\n } as PreviewMessagePreviewerHoverOnBrick,\n previewProxyOrigin\n );\n }\n },\n 100,\n { leading: false }\n);\n\nfunction onPointerDown(event: MouseEvent): void {\n event.preventDefault();\n event.stopPropagation();\n hoverOnBrick(event.composedPath());\n}\n\nfunction onPointerMove(event: MouseEvent): void {\n event.preventDefault();\n event.stopPropagation();\n hoverOnBrick(event.composedPath());\n}\n\nfunction onPointerLeave(event: MouseEvent): void {\n event.preventDefault();\n event.stopPropagation();\n window.parent.postMessage(\n {\n sender: \"previewer\",\n type: \"hover-on-brick\",\n iidList: [],\n } as PreviewMessagePreviewerHoverOnBrick,\n previewProxyOrigin\n );\n}\n\nfunction onContextMenu(event: MouseEvent): void {\n event.preventDefault();\n event.stopPropagation();\n contextMenuOnBrick(event.composedPath(), {\n x: event.clientX,\n y: event.clientY,\n });\n}\n\nfunction contextMenuOnBrick(\n eventTargets: EventTarget[],\n position: {\n x: number;\n y: number;\n }\n): void {\n const iidList = getPossibleBrickTargets(eventTargets);\n if (iidList.length > 0) {\n window.parent.postMessage(\n {\n sender: \"previewer\",\n type: \"context-menu-on-brick\",\n iidList,\n position,\n } as PreviewMessagePreviewerContextMenuOnBrick,\n previewProxyOrigin\n );\n }\n}\n\nfunction selectBrick(eventTargets: EventTarget[]): void {\n const iidList = getPossibleBrickTargets(eventTargets);\n if (iidList.length > 0) {\n window.parent.postMessage(\n {\n sender: \"previewer\",\n type: \"select-brick\",\n iidList,\n } as PreviewMessagePreviewerSelectBrick,\n previewProxyOrigin\n );\n }\n}\n\nexport function getPossibleBrickIidList(brick: HTMLElement): string[] {\n const iidList: string[] = [];\n // Traverse from bottom to up, to find bricks current hover on.\n let cursor: HTMLElement | null = brick;\n while (cursor) {\n if (typeof cursor.dataset.iid === \"string\") {\n iidList.push(cursor.dataset.iid);\n }\n cursor = cursor.parentElement;\n }\n return iidList;\n}\n\nexport function getPossibleBrickTargets(eventTargets: EventTarget[]) {\n const targets: string[] = [];\n for (const target of eventTargets) {\n if (\n target instanceof HTMLElement &&\n typeof target.dataset.iid === \"string\"\n ) {\n targets.push(target.dataset.iid);\n }\n }\n return targets;\n}\n","export function getRealTimeDataAnnotation(value: unknown) {\n const type = typeof value;\n switch (type) {\n case \"string\":\n case \"boolean\":\n case \"number\":\n return {\n type,\n value,\n };\n case \"undefined\":\n return { type };\n }\n if (value === null) {\n return { type: \"null\" };\n }\n if (Array.isArray(value)) {\n return { type: \"array\", length: value.length };\n }\n return { type: \"object\" };\n}\n","import {\n getHistory as _getHistory,\n getBasePath,\n matchPath as _matchPath,\n __secret_internals as _internals,\n type NextLocation,\n} from \"@next-core/runtime\";\nimport { HttpResponseError } from \"@next-core/http\";\nimport { flowApi as _flowAPi } from \"@next-core/easyops-runtime\";\nimport type {\n BrickConf,\n Contract,\n CustomTemplate,\n RouteConf,\n} from \"@next-core/types\";\nimport { isEmpty, throttle, omit } from \"lodash\";\nimport type {\n BrickOutline,\n HighLightNode,\n Position,\n PreviewDataOption,\n PreviewMessageFromPreviewer,\n PreviewMessagePreviewContractUpdate,\n PreviewMessagePreviewDataValueError,\n PreviewMessagePreviewDataValueSuccess,\n PreviewMessagePreviewDebugValueSuccess,\n PreviewMessagePreviewDebugValueError,\n PreviewMessagePreviewerCaptureFailed,\n PreviewMessagePreviewerCaptureOk,\n PreviewMessagePreviewerContentScroll,\n PreviewMessagePreviewerHighlightBrick,\n PreviewMessagePreviewerHighlightContext,\n PreviewMessagePreviewerHoverOnMain,\n PreviewMessagePreviewerRealTimeDataInspectChange,\n PreviewMessagePreviewerRouteMatchChange,\n PreviewMessagePreviewerScroll,\n PreviewMessagePreviewerUrlChange,\n PreviewMessageToPreviewer,\n PreviewSettings,\n PreviewStartOptions,\n PreviewDebugData,\n PreviewMessagePreviewInspectRuntimeValue,\n} from \"./interfaces.js\";\nimport { capture } from \"./capture.js\";\nimport {\n previewProxyOrigin,\n getPossibleBrickIidList,\n setPreviewFromOrigin,\n startInspecting,\n stopInspecting,\n} from \"./inspector.js\";\nimport { collectUsedContracts } from \"../collect-used-contracts.js\";\nimport { getRealTimeDataAnnotation } from \"./realTimeDataInspect.js\";\n\nlet connected = false;\n\ninterface DLL {\n (moduleId: \"tYg3\"): {\n getHistory: typeof _getHistory;\n developHelper: typeof _internals;\n collectDebugContract: typeof flowApi.collectDebugContract;\n };\n (moduleId: \"A+yw\"): {\n matchPath: typeof _matchPath;\n };\n}\n\nlet getHistory = _getHistory;\nlet matchPath = _matchPath;\nlet __secret_internals = _internals;\nlet flowApi = _flowAPi;\nlet isV2 = false;\n\n// istanbul ignore next\n// Make v3 bricks compatible with Brick Next v2.\ntry {\n const dll = (window as unknown as { dll?: DLL }).dll;\n if (\n dll &&\n window.BRICK_NEXT_VERSIONS?.[\"brick-container\"]?.startsWith(\"2.\")\n ) {\n const {\n getHistory: getHistoryV2,\n developHelper: developHelperV2,\n collectDebugContract,\n } = dll(\"tYg3\");\n const { matchPath: matchPathV2 } = dll(\"A+yw\");\n getHistory = getHistoryV2;\n matchPath = matchPathV2;\n // The `__secret_internals` of v3 has pretty the same API as\n // `developHelper` of v2, especially those for preview usage.\n __secret_internals = {\n ...developHelperV2,\n getContextValue(name, { tplStateStoreId }) {\n return developHelperV2.getContextValue(name, {\n tplContextId: tplStateStoreId,\n } as any);\n },\n getAllContextValues({ tplStateStoreId }) {\n // V3 returns an object of key-value.\n // While v2 returns a map of ContextItem.\n const v2Map = developHelperV2.getAllContextValues({\n tplContextId: tplStateStoreId,\n } as any) as unknown as Map<string, { value: unknown }>;\n return Object.fromEntries(\n [...v2Map].map(([k, v]) => [k, (v as any).value])\n );\n },\n debugDataValue(data, { tplStateStoreId }) {\n return developHelperV2.debugDataValue(data, {\n tplContextId: tplStateStoreId,\n } as any);\n },\n };\n\n flowApi = {\n collectDebugContract,\n } as any;\n isV2 = true;\n }\n} catch (e) {\n // eslint-disable-next-line no-console\n console.error(\"Try to use v2 runtime APIs failed:\", e);\n}\n\nlet contentScrollElement: Element | null = null;\nlet contentScrollHost: Element | null = null;\n\nexport default async function connect(\n previewFromOrigin: string,\n options: PreviewStartOptions\n) {\n if (connected) {\n return;\n }\n connected = true;\n\n const sendMessage = <T extends PreviewMessageFromPreviewer>(\n message: Omit<T, \"sender\">\n ): void => {\n window.parent.postMessage(\n {\n sender: \"previewer\",\n ...message,\n },\n previewFromOrigin\n );\n };\n\n sendMessage({ type: \"preview-started\" });\n setPreviewFromOrigin(previewFromOrigin);\n\n let hoverIid: string;\n let hoverAlias: string;\n let activeIid: string;\n let activeAlias: string;\n\n const handleHoverOnIframe = (pos: Position): void => {\n const element = document.elementFromPoint(pos.x, pos.y);\n if (element?.tagName === \"BODY\") {\n window.parent.postMessage(\n {\n sender: \"previewer\",\n type: \"hover-on-main\",\n isDirection: true,\n position: {\n x: pos.x,\n y: pos.y,\n },\n } as PreviewMessagePreviewerHoverOnMain,\n previewProxyOrigin\n );\n } else {\n const iidList = getPossibleBrickIidList(element as HTMLElement);\n window.parent.postMessage(\n {\n sender: \"previewer\",\n type: \"hover-on-brick\",\n iidList,\n isDirection: true,\n position: {\n x: pos.x,\n y: pos.y,\n },\n },\n previewProxyOrigin\n );\n }\n };\n\n const sendHighlightBrickOutlines = (\n type: \"hover\" | \"active\",\n iid: string,\n alias: string\n ): void => {\n const outlines = getBrickOutlines(iid);\n sendMessage<PreviewMessagePreviewerHighlightBrick>({\n type: \"highlight-brick\",\n highlightType: type,\n outlines,\n iid: iid,\n alias: alias,\n });\n };\n\n const sendHighlightBricksOutlines = (nodes: HighLightNode[]): void => {\n const outlines = nodes\n .map((node) => getBrickOutlines(node.iid, node.alias))\n .flat();\n sendMessage<PreviewMessagePreviewerHighlightContext>({\n type: \"highlight-context\",\n outlines,\n });\n };\n\n let lastTemplatePreviewSettings: PreviewSettings | undefined;\n if (options.templateId) {\n lastTemplatePreviewSettings = options.settings;\n }\n\n const updateTemplatePreviewSettings = (): void => {\n __secret_internals.updateTemplatePreviewSettings(\n options.appId,\n options.templateId!,\n lastTemplatePreviewSettings\n );\n getHistory().reload();\n };\n\n const updateSnippetPreviewSettings = (): void => {\n __secret_internals.updateSnippetPreviewSettings(\n options.appId,\n JSON.parse(options.snippetData)\n );\n getHistory().reload();\n };\n\n const updateFormPreviewSettings = (): void => {\n (__secret_internals as any).updateFormPreviewSettings(\n options.appId,\n options.formId,\n options.formData\n );\n getHistory().reload();\n };\n\n const handlePreviewData = (name: string, option: PreviewDataOption): void => {\n try {\n const { dataType } = option;\n let tplStateStoreId;\n\n if (dataType === \"state\") {\n tplStateStoreId = getRootTplStateStoreId();\n\n if (!tplStateStoreId) {\n sendMessage<PreviewMessagePreviewDataValueError>({\n type: \"inspect-data-value-error\",\n data: {\n error: {\n message:\n \"tplStateStoreId not found, unable to preview STATE value\",\n },\n },\n });\n\n return;\n }\n }\n\n let value, type: PreviewMessagePreviewDataValueSuccess[\"type\"];\n if (name) {\n type = \"inspect-single-data-value-success\";\n value = __secret_internals.getContextValue(name, {\n tplStateStoreId,\n });\n } else {\n type = \"inspect-all-data-values-success\";\n const data = __secret_internals.getAllContextValues({\n tplStateStoreId,\n });\n value = Object.entries(data).map(([name, value]) => ({ name, value }));\n }\n\n sendMessage<PreviewMessagePreviewDataValueSuccess>({\n type,\n data: {\n name,\n value,\n },\n });\n\n // istanbul ignore next\n } catch (error) {\n sendMessage<PreviewMessagePreviewDataValueError>({\n type: \"inspect-data-value-error\",\n data: {\n message: (error as Error).message,\n },\n });\n }\n };\n\n const debugDataValue = async (\n data: PreviewDebugData,\n contractData: Contract,\n previewOption: PreviewDataOption\n ) => {\n try {\n if (contractData) {\n flowApi.collectDebugContract([contractData]);\n }\n const value = await __secret_internals.debugDataValue(data, {\n tplStateStoreId:\n previewOption.dataType === \"state\"\n ? getRootTplStateStoreId()\n : undefined,\n routeId: options.routeId,\n });\n\n sendMessage<PreviewMessagePreviewDebugValueSuccess>({\n type: \"debug-data-value-success\",\n data: {\n debugConf: data,\n value,\n },\n });\n } catch (error) {\n sendMessage<PreviewMessagePreviewDebugValueError>({\n type: \"debug-data-value-error\",\n data:\n error instanceof HttpResponseError\n ? error.responseJson\n : { message: (error as Error).message },\n });\n }\n };\n\n const history = getHistory();\n\n window.addEventListener(\n \"message\",\n async ({ data, origin }: MessageEvent<PreviewMessageToPreviewer>) => {\n if (\n origin !== previewFromOrigin ||\n !data ||\n data.sender !== \"preview-container\"\n ) {\n return;\n }\n if (data.forwardedFor === \"builder\") {\n switch (data.type) {\n case \"hover-on-brick\":\n hoverIid = data.iid;\n hoverAlias = data.alias;\n sendHighlightBrickOutlines(\"hover\", data.iid, data.alias);\n break;\n case \"hover-on-main\":\n sendHighlightBrickOutlines(\"hover\", \"#main-mount-point\", \"root\");\n break;\n case \"hover-on-context\":\n sendHighlightBricksOutlines(data.highlightNodes);\n break;\n case \"select-brick\":\n activeIid = data.iid;\n activeAlias = data.alias;\n sendHighlightBrickOutlines(\"active\", data.iid, data.alias);\n break;\n case \"hover-on-iframe\":\n handleHoverOnIframe(data.position);\n break;\n }\n } else\n switch (data.type) {\n case \"toggle-inspecting\":\n data.enabled ? startInspecting() : stopInspecting();\n break;\n case \"refresh\":\n if (data.options?.updateStoryboardType) {\n if (data.options.updateStoryboardType === \"route\") {\n __secret_internals.updateStoryboardByRoute(\n options.appId,\n data.storyboardPatch as RouteConf\n );\n } else if (data.options.updateStoryboardType === \"template\") {\n __secret_internals.updateStoryboardByTemplate(\n options.appId,\n data.storyboardPatch as CustomTemplate,\n data.options.settings\n );\n } else if (data.options.updateStoryboardType === \"snippet\") {\n __secret_internals.updateStoryboardBySnippet(\n options.appId,\n data.storyboardPatch as {\n snippetId: string;\n bricks: BrickConf[];\n }\n );\n } else if (data.options.updateStoryboardType === \"form\") {\n (__secret_internals as any).updateFormPreviewSettings(\n options.appId,\n options.formId,\n data.storyboardPatch\n );\n }\n\n let newContracts;\n if (data.options?.updateStoryboardType !== \"form\") {\n newContracts = await (\n __secret_internals as any\n ).getAddedContracts?.(data.storyboardPatch, {\n appId: options.appId,\n updateStoryboardType: data.options.updateStoryboardType,\n formId: options.formId,\n collectUsedContracts,\n });\n }\n\n if (!isEmpty(newContracts)) {\n sendMessage<PreviewMessagePreviewContractUpdate>({\n type: \"contract-update\",\n data: {\n add: newContracts,\n },\n });\n } else {\n getHistory().reload();\n }\n\n break;\n }\n __secret_internals.updateStoryboard(\n options.appId,\n data.storyboardPatch\n );\n if (options.templateId) {\n lastTemplatePreviewSettings = data.settings;\n updateTemplatePreviewSettings();\n } else if (options.formId || options.formData) {\n updateFormPreviewSettings();\n } else if (data.options?.snippetData) {\n options.snippetData = data.options.snippetData;\n updateSnippetPreviewSettings();\n } else {\n getHistory().reload();\n }\n break;\n case \"reload\":\n location.reload();\n break;\n case \"back\":\n history.goBack();\n break;\n case \"forward\":\n history.goForward();\n break;\n case \"capture\":\n capture(data.maxWidth, data.maxHeight).then(\n (screenshot) => {\n sendMessage<PreviewMessagePreviewerCaptureOk>({\n type: \"capture-ok\",\n screenshot,\n });\n },\n () => {\n sendMessage<PreviewMessagePreviewerCaptureFailed>({\n type: \"capture-failed\",\n });\n }\n );\n break;\n case \"inspect-data-value\":\n handlePreviewData(data.name, data.option);\n break;\n case \"update-preview-url\": {\n // Remove origin first.\n const url = data.previewUrl.startsWith(window.origin)\n ? data.previewUrl.substring(window.origin.length)\n : data.previewUrl;\n // Then remove base path.\n const basePath = getBasePath();\n const to = url.startsWith(basePath)\n ? url.substring(basePath.length - 1)\n : url;\n getHistory().push(to);\n break;\n }\n case \"update-preview-route\": {\n options.routePath = data.routePath;\n options.routeExact = data.routeExact;\n syncRouteMatch();\n break;\n }\n case \"debug-data-value\":\n debugDataValue(data.debugData, data.contractData, data.options);\n break;\n /* case \"excute-proxy-method\": {\n const [ref, method, args = []] = data.proxyMethodArgs;\n try {\n const result = document.body.querySelector(ref)[method](...args);\n window.parent.postMessage({\n sender: \"previewer\",\n type: \"excute-proxy-method-success\",\n data: { method: method, res: result },\n });\n } catch (err) {\n window.parent.postMessage({\n sender: \"previewer\",\n type: \"excute-proxy-method-error\",\n data: { method: method, res: err.message },\n });\n }\n break;\n } */\n }\n }\n );\n\n window.addEventListener(\"scroll\", () => {\n sendMessage<PreviewMessagePreviewerScroll>({\n type: \"scroll\",\n scroll: {\n x: window.scrollX,\n y: window.scrollY,\n },\n });\n });\n\n let previewPageMatch = true;\n let currentLocation: NextLocation;\n const sendLocationChange = (loc: NextLocation): void => {\n sendMessage<PreviewMessagePreviewerUrlChange>({\n type: \"url-change\",\n url: location.origin + history.createHref(loc),\n });\n currentLocation = loc;\n syncRouteMatch();\n };\n\n function syncRouteMatch() {\n if (options.routePath) {\n const match = !!matchPath(currentLocation.pathname, {\n path: options.routePath,\n exact: options.routeExact,\n });\n sendMessage<PreviewMessagePreviewerRouteMatchChange>({\n type: \"route-match-change\",\n match,\n });\n\n // Re-update template preview settings once match route again (typically after login).\n if (options.templateId && !previewPageMatch && match) {\n const mainMountPoint = document.querySelector(\"#main-mount-point\")!;\n const placeholderLoadObserver = new MutationObserver(() => {\n // We observe when the placeholder is appeared.\n if (\n mainMountPoint.childNodes.length === 1 &&\n (mainMountPoint.firstChild as HTMLElement).tagName === \"SPAN\" &&\n mainMountPoint.firstChild!.childNodes.length === 0\n ) {\n updateTemplatePreviewSettings();\n placeholderLoadObserver.disconnect();\n }\n });\n placeholderLoadObserver.observe(mainMountPoint, { childList: true });\n }\n if (options.formId && !previewPageMatch && match) {\n const mainMountPoint = document.querySelector(\"#main-mount-point\");\n const placeholderLoadObserver = new MutationObserver(() => {\n // We observe when the placeholder is appeared.\n if (\n mainMountPoint.childNodes.length === 1 &&\n (mainMountPoint.firstChild as HTMLElement).tagName === \"SPAN\" &&\n mainMountPoint.firstChild.childNodes.length === 0\n ) {\n updateFormPreviewSettings();\n placeholderLoadObserver.disconnect();\n }\n });\n placeholderLoadObserver.observe(mainMountPoint, { childList: true });\n }\n if (options.snippetData && !previewPageMatch && match) {\n const mainMountPoint = document.querySelector(\"#main-mount-point\")!;\n const placeholderLoadObserver = new MutationObserver(() => {\n // We observe when the placeholder is appeared.\n if (\n mainMountPoint.childNodes.length === 1 &&\n (mainMountPoint.firstChild as HTMLElement).tagName === \"SPAN\" &&\n mainMountPoint.firstChild!.childNodes.length === 0\n ) {\n updateSnippetPreviewSettings();\n placeholderLoadObserver.disconnect();\n }\n });\n placeholderLoadObserver.observe(mainMountPoint, { childList: true });\n }\n previewPageMatch = match;\n }\n }\n\n sendLocationChange(history.location);\n\n history.listen(sendLocationChange);\n\n if (options.templateId) {\n updateTemplatePreviewSettings();\n }\n\n if (options.formId || options.formData) {\n updateFormPreviewSettings();\n }\n\n if (options.snippetData) {\n updateSnippetPreviewSettings();\n }\n\n function setupContentScroll() {\n const host = document.querySelector(\"eo-page-view\");\n const element = host?.shadowRoot?.querySelector(\".content\") ?? null;\n if (element !== contentScrollElement) {\n contentScrollElement?.removeEventListener(\"scroll\", onContentScroll);\n element?.addEventListener(\"scroll\", onContentScroll);\n contentScrollElement = element;\n contentScrollHost = host;\n }\n }\n\n function onContentScroll(this: Element) {\n sendMessage<PreviewMessagePreviewerContentScroll>({\n type: \"content-scroll\",\n scroll: {\n x: this.scrollLeft,\n y: this.scrollTop,\n },\n });\n }\n\n const setupRuntimeValueInspect = () => {\n const routeId = options.routeId;\n\n const data = __secret_internals.getLegalRuntimeValue({ routeId });\n sendMessage<PreviewMessagePreviewInspectRuntimeValue>({\n type: \"inspect-runtime-data-value\",\n data: {\n ...omit(data, \"query\"),\n query: data.query ? Object.fromEntries(data.query.entries()) : {},\n path: data.match?.params,\n },\n });\n };\n\n __secret_internals.addRealTimeDataInspectHook?.(\n ({ changeType, tplStateStoreId, detail }) => {\n sendMessage<PreviewMessagePreviewerRealTimeDataInspectChange>({\n type: \"real-time-data-inspect-change\",\n changeType,\n tplStateStoreId,\n detail:\n changeType === \"update\"\n ? {\n name: detail.name,\n annotation: getRealTimeDataAnnotation(detail.value),\n }\n : {\n data: Object.fromEntries(\n Object.entries(detail.data).map(([k, v]) => [\n k,\n getRealTimeDataAnnotation(v),\n ])\n ),\n },\n });\n }\n );\n\n let memoizedRootTplStateStoreId: string | undefined;\n\n function setupRealTimeDataInspect(force?: boolean) {\n const tplStateStoreId = options.templateId\n ? getRootTplStateStoreId()\n : undefined;\n if (memoizedRootTplStateStoreId !== tplStateStoreId || force) {\n memoizedRootTplStateStoreId = tplStateStoreId;\n __secret_internals.setRealTimeDataInspectRoot?.({\n tplStateStoreId,\n });\n }\n }\n\n window.addEventListener(\"route.render\", () => {\n setupRealTimeDataInspect(true);\n setupRuntimeValueInspect();\n });\n\n setupContentScroll();\n setupRealTimeDataInspect(true);\n setupRuntimeValueInspect();\n\n const mutationCallback = (): void => {\n setupContentScroll();\n setupRealTimeDataInspect();\n if (hoverIid) {\n sendHighlightBrickOutlines(\"hover\", hoverIid, hoverAlias);\n }\n if (activeIid) {\n sendHighlightBrickOutlines(\"active\", activeIid, activeAlias);\n }\n };\n const mutationObserver = new MutationObserver(\n throttle(mutationCallback, 100, { leading: false })\n );\n mutationObserver.observe(document.body, { subtree: true, childList: true });\n}\n\nfunction getBrickOutlines(iid: string, alias?: string): BrickOutline[] {\n if (!iid) {\n return [];\n }\n const isRoot = iid.includes(\"#\");\n const elements = getElementsIncludingInShadowDOM(iid, isRoot);\n const outlines = getOutlines(elements, alias);\n return isRoot\n ? outlines.map((item) => ({\n ...item,\n height: window.innerHeight - item.top,\n }))\n : outlines;\n}\n\nexport function getElementsIncludingInShadowDOM(\n iid: string,\n isRoot?: boolean\n): HTMLElement[] {\n const elements: HTMLElement[] = [];\n\n function walk(root: Document | ShadowRoot) {\n const candidates = root.querySelectorAll<HTMLElement>(\n isRoot ? iid : `[data-iid=\"${iid}\"]`\n );\n elements.push(...candidates);\n\n // If elements are found in the document, we should stop searching in shadow DOM.\n if (root === document && candidates.length > 0) {\n return;\n }\n\n // These useBrick in v3 bricks will be inside shadow DOM.\n for (const item of root.querySelectorAll(\"*\")) {\n if (item.shadowRoot) {\n walk(item.shadowRoot);\n }\n }\n }\n\n walk(document);\n\n return elements;\n}\n\nfunction getOutlines(elements: HTMLElement[], alias?: string): BrickOutline[] {\n return elements.map((element) => {\n const hasContentScroll = contentScrollHost?.contains(element);\n const { width, height, left, top } = element.getBoundingClientRect();\n return {\n width,\n height,\n left:\n left +\n window.scrollX +\n (hasContentScroll ? contentScrollElement.scrollLeft : 0),\n top:\n top +\n window.scrollY +\n (hasContentScroll ? contentScrollElement.scrollTop : 0),\n alias,\n hasContentScroll,\n };\n });\n}\n\nfunction getRootTplStateStoreId(): string | undefined {\n const mainMountPoint = document.querySelector(\"#main-mount-point\")!;\n\n return (mainMountPoint?.firstChild as HTMLElement)?.dataset[\n isV2 ? \"tplContextId\" : \"tplStateStoreId\"\n ];\n}\n","// istanbul ignore file: nothing logical except calling html2canvas.\nimport html2canvas from \"html2canvas\";\nimport { resizeScreenshot } from \"./resizeScreenshot.js\";\n\nfunction getCanvasBlob(canvas: HTMLCanvasElement): Promise<Blob> {\n return new Promise(function (resolve, reject) {\n canvas.toBlob(function (blob: Blob | null) {\n if (blob) {\n resolve(blob);\n } else {\n reject();\n }\n });\n });\n}\n\nexport async function capture(\n maxWidth: number,\n maxHeight: number\n): Promise<Blob> {\n const sourceCanvas = await html2canvas(document.body, {\n logging: false,\n scale: 1,\n width: window.innerWidth,\n height: window.innerHeight,\n foreignObjectRendering: true,\n });\n const targetCanvas = document.createElement(\"canvas\");\n resizeScreenshot(sourceCanvas, targetCanvas, maxWidth, maxHeight);\n const blob = await getCanvasBlob(targetCanvas);\n return blob;\n}\n","export function resizeScreenshot(\n canvas: HTMLCanvasElement,\n targetCanvas: HTMLCanvasElement,\n maxWidth: number,\n maxHeight: number\n): string {\n const targetRatio = maxWidth / maxHeight;\n const { width, height } = canvas;\n const ratio = width / height;\n const wider = ratio >= targetRatio;\n const finalWidth = wider ? maxWidth : maxHeight * ratio;\n const finalHeight = wider ? maxWidth / ratio : maxHeight;\n targetCanvas.width = finalWidth;\n targetCanvas.height = finalHeight;\n\n const ctx = targetCanvas.getContext(\"2d\")!;\n ctx.drawImage(canvas, 0, 0, width, height, 0, 0, finalWidth, finalHeight);\n return targetCanvas.toDataURL();\n}\n"],"names":["collectUsedContracts","storyboard","collection","nodeOrNodes","Set","traverse","node","type","_node$raw","useProvider","raw","add","collect","parseStoryboard","contracts","item","includes","push","customElements","define","createProviderClass","previewProxyOrigin","onClick","event","preventDefault","stopPropagation","eventTargets","iidList","getPossibleBrickTargets","length","window","parent","postMessage","sender","selectBrick","composedPath","onMouseEvent","hoverOnBrick","throttle","leading","onPointerDown","onPointerMove","onPointerLeave","onContextMenu","position","contextMenuOnBrick","x","clientX","y","clientY","targets","target","HTMLElement","dataset","iid","getRealTimeDataAnnotation","value","Array","isArray","connected","getHistory","_getHistory","matchPath","_matchPath","__secret_internals","_internals","flowApi","_flowAPi","isV2","_window$BRICK_NEXT_VE","dll","BRICK_NEXT_VERSIONS","startsWith","getHistoryV2","developHelper","developHelperV2","collectDebugContract","matchPathV2","getContextValue","name","_ref","tplStateStoreId","tplContextId","getAllContextValues","_ref2","v2Map","Object","fromEntries","map","_ref3","k","v","debugDataValue","data","_ref4","e","console","error","contentScrollElement","contentScrollHost","async","connect","previewFromOrigin","options","_secret_internals$ad","_secret_internals","sendMessage","message","hoverIid","hoverAlias","activeIid","activeAlias","sendHighlightBrickOutlines","alias","outlines","getBrickOutlines","highlightType","lastTemplatePreviewSettings","templateId","settings","updateTemplatePreviewSettings","appId","reload","updateSnippetPreviewSettings","JSON","parse","snippetData","updateFormPreviewSettings","formId","formData","history","addEventListener","_data$options","_data$options3","origin","_ref6","forwardedFor","nodes","flat","sendHighlightBricksOutlines","highlightNodes","pos","element","document","elementFromPoint","tagName","isDirection","brick","cursor","parentElement","getPossibleBrickIidList","handleHoverOnIframe","enabled","removeEventListener","updateStoryboardType","_data$options2","newContracts","_getAddedContracts","_ref7","updateStoryboardByRoute","storyboardPatch","updateStoryboardByTemplate","updateStoryboardBySnippet","getAddedContracts","call","isEmpty","updateStoryboard","location","goBack","goForward","maxWidth","maxHeight","sourceCanvas","html2canvas","body","logging","scale","width","innerWidth","height","innerHeight","foreignObjectRendering","targetCanvas","createElement","canvas","targetRatio","ratio","wider","finalWidth","finalHeight","getContext","drawImage","toDataURL","resizeScreenshot","Promise","resolve","reject","toBlob","blob","capture","then","screenshot","handlePreviewData","option","dataType","getRootTplStateStoreId","entries","_ref5","url","previewUrl","substring","basePath","getBasePath","to","routePath","routeExact","syncRouteMatch","contractData","previewOption","undefined","routeId","debugConf","HttpResponseError","responseJson","debugData","scroll","scrollX","scrollY","currentLocation","previewPageMatch","sendLocationChange","loc","createHref","match","pathname","path","exact","mainMountPoint","querySelector","placeholderLoadObserver","MutationObserver","childNodes","firstChild","disconnect","observe","childList","setupContentScroll","_host$shadowRoot","host","shadowRoot","_contentScrollElement","onContentScroll","this","scrollLeft","scrollTop","listen","setupRuntimeValueInspect","_data$match","getLegalRuntimeValue","omit","query","params","memoizedRootTplStateStoreId","setupRealTimeDataInspect","force","_secret_internals$se","_secret_internals2","setRealTimeDataInspectRoot","addRealTimeDataInspectHook","_ref8","changeType","detail","annotation","_ref9","mutationCallback","subtree","isRoot","elements","_contentScrollHost","hasContentScroll","contains","left","top","getBoundingClientRect","getOutlines","getElementsIncludingInShadowDOM","walk","root","candidates","querySelectorAll","_mainMountPoint$first"],"sourceRoot":""}
@@ -0,0 +1,2 @@
1
+ "use strict";(globalThis.webpackChunk_next_bricks_visual_builder=globalThis.webpackChunk_next_bricks_visual_builder||[]).push([[9080],{2803:(e,t,o)=>{o.d(t,{M:()=>x});var n=o(9575),a=o(8769),r=o.n(a),l=o(9708),i=o(1389),s=o(7091),p=o(3373),c=o.n(p),m=o(1030),u=o(5908),d=o(1431),v=o(1732),b=o.n(v);const f=(0,i.wrapBrick)("eo-icon"),h=(0,i.wrapBrick)("eo-tooltip");function x(e){const t=(0,s.mN)(),o=(0,s.Mt)(),i=(0,s.Ov)(),[p,v]=(0,a.useState)("string"==typeof o.value&&(0,d.isEvaluable)(o.value)?"advanced":"normal"),x=(0,a.useMemo)((()=>"advanced"===p),[p]),g=(0,a.useMemo)((()=>o.component),[o]),y=(0,a.useCallback)((()=>{const e=x?"normal":"advanced",n="advanced"===e;v(e),o.setComponent(n?"CodeEditor":g[0],{...n?{...i??{},lineNumbers:"off",glyphMargin:!1}:g[1]});const a=t.getValuesIn(o.props.name);if(n&&(0,m.isObject)(a))t.setInitialValues({[o.props.name]:b().safeDump(a)});else if(!n&&a&&"string"==typeof a){let e;try{e=b().load(a)}catch{e=null}t.setInitialValues({[o.props.name]:e},"overwrite")}}),[t,o,x,g,i]);return(0,s.Uf)((()=>{(0,u.J4)(o.props.name,(e=>{let{value:t}=e;"string"==typeof t&&(0,d.isEvaluable)(t)&&(v("advanced"),o.setComponent("CodeEditor",{...i??{},lineNumbers:"off",glyphMargin:!1}))}))})),r().createElement("div",{className:"advanced-form-item"},r().createElement(l.eI,(0,n.A)({},e,{layout:x?null:e.layout||"vertical"}),e.children),r().createElement("div",{className:"advanced-mode-check-wrapper"},r().createElement(h,{content:"normal"===p?"使用表达式":"关闭表达式"},r().createElement(f,{className:c()({isActive:x}),lib:"fa",icon:"code",onClick:y}))))}},3768:(e,t,o)=>{o.d(t,{H:()=>r});var n=o(8769),a=o.n(n);function r(e){return a().createElement("div",{className:"custom-category-title"},e.text)}},6110:(e,t,o)=>{o.d(t,{i:()=>I});var n=o(9708),a=o(9646),r=o(7070),l=o(8769),i=o.n(l),s=o(2591),p=o.n(s),c=o(1740),m=o.n(c),u=o(8128),d=o.n(u),v=o(855),b=o.n(v),f=o(3051),h=o.n(f),x=o(3656),g=o.n(x),y=o(3607),E={};E.styleTagTransform=g(),E.setAttributes=b(),E.insert=d().bind(null,"head"),E.domAPI=m(),E.insertStyleElement=h(),p()(y.A,E);const C=y.A&&y.A.locals?y.A.locals:void 0;var A=o(3373),k=o.n(A),W=function(e){return e[e.top=0]="top",e[e.right=1]="right",e[e.bottom=2]="bottom",e[e.left=3]="left",e}(W||{});function I(e){let{onChange:t,value:o,mode:s}=e;const[p,c]=(0,l.useState)(),[m,u]=(0,l.useState)(!1),[d,v]=(0,l.useState)(),b=(0,l.useMemo)((()=>"in"===s),[s]),f=e=>{v(e)},h=()=>{v(null)},x=(0,l.useCallback)(((e,n)=>{const a=n.match(/\d+/),r=Number(null!==a?a[0]:0),l=m?`${r}px`:`${(o??"0px 0px 0px 0px").match(/(\d+px)/g).map(((t,o)=>W[e]===o?`${r}px`:t)).join(" ")}`;t(l)}),[m,t,o]),g=e=>{u(e)},y=(0,l.useCallback)((e=>{const t=(e??"0px 0px 0px 0px").match(/(\d+)/g);1===t.length?(u(!0),c({top:t[0],right:t[0],bottom:t[0],left:t[0]})):c({top:t[0],right:t[1],bottom:t[2]??t[0],left:t[3]??t[1]})}),[]);return(0,l.useEffect)((()=>{y(o)}),[o,y]),i().createElement("div",{className:C.boxSizeComponent},i().createElement("div",{className:C.leftWrapper},i().createElement("div",{className:C.outBox},i().createElement("div",{className:C.inBox,style:{position:b?"relative":"initial"}},i().createElement("div",{className:k()(C.top,C.line,C.vertical,{[C.active]:"top"===d||m})}),i().createElement("div",{className:k()(C.right,C.line,C.horizontal,{[C.active]:"right"===d||m})}),i().createElement("div",{className:k()(C.left,C.line,C.horizontal,{[C.active]:"left"===d||m})}),i().createElement("div",{className:k()(C.bottom,C.line,C.vertical,{[C.active]:"bottom"===d||m})}),i().createElement("div",{className:"connect-btn"},m?i().createElement(a.A,{style:{color:"var(--color-brand)"},onClick:()=>g(!1)}):i().createElement(r.A,{onClick:()=>g(!0)}))))),i().createElement("div",{className:C.rightWrapper},i().createElement("div",{className:C.inputWrapper},i().createElement(n.pd,{prefix:"上",placeholder:"0",value:null==p?void 0:p.top,onFocus:()=>f("top"),onBlur:h,onChange:e=>x("top",e.target.value)}),i().createElement(n.pd,{prefix:"左",placeholder:"0",value:null==p?void 0:p.left,onFocus:()=>f("left"),onChange:e=>x("left",e.target.value),onBlur:h})),i().createElement("div",{className:C.inputWrapper},i().createElement(n.pd,{prefix:"下",placeholder:"0",value:null==p?void 0:p.bottom,onFocus:()=>f("bottom"),onBlur:h,onChange:e=>x("bottom",e.target.value)}),i().createElement(n.pd,{prefix:"右",placeholder:"0",value:null==p?void 0:p.right,onFocus:()=>f("right"),onBlur:h,onChange:e=>x("right",e.target.value)}))))}},3824:(e,t,o)=>{o.d(t,{S:()=>m});var n=o(9575),a=o(8769),r=o.n(a),l=o(1389),i=o(1732),s=o.n(i),p=o(1030);const c=(0,l.wrapBrick)("vs.code-editor",{onChange:"code.change",tokenClick:"token.click"});function m(e){const[t,o]=(0,a.useState)(),[l,i]=(0,a.useState)(),m=(0,a.useCallback)((t=>{var o;i(t.detail?t.detail:void 0);const n=t.detail?s().safeLoad(t.detail):void 0;null==e||null===(o=e.onChange)||void 0===o||o.call(e,n)}),[e]);return(0,a.useEffect)((()=>{if(e.value&&!t){let t=e.value;t&&"string"!=typeof t&&(t=(0,p.isEmpty)(t)?"":s().safeDump(Array.isArray(t)?t:{...t,style:(0,p.isEmpty)(t.style)?void 0:t.style},{skipInvalid:!0})),o(t)}}),[e.value,t]),r().createElement(c,(0,n.A)({minLines:e.minLines??1,automaticLayout:"fit-content",language:"brick_next_yaml",theme:"vs-dark"},e,{value:l??t,onChange:m}))}},5067:(e,t,o)=>{o.d(t,{h:()=>u});var n=o(9575),a=o(8769),r=o.n(a),l=o(5346),i=o(7856);const s=Object.entries({amber:"#f7bf02",yellow:"#fadb14",orange:"#e38306",pink:"#ff1a79",red:"#f24c25",blue:"#1a7aff",indigo:"#3844e8","deep-purple":"#6641f9","gray-blue":"#778dc3",purple:"#893ad8",cyan:"#21d4f3",teal:"#1dc897",green:"#08BF33"}).map((e=>{let[t,o]=e;return{label:t,colors:(0,i.cM)(o)}})),p=e=>[{label:"系统默认",colors:e.map((e=>e.colors)).flat()}],c=(e,t)=>{let o=t;return e.forEach((e=>{const t=e.label,n=e.colors.findIndex((e=>"string"==typeof e?e===o:e.toHsbString()===o));n>=0&&(o=`var(--palette-${t}-${n+1})`)})),o},m=(e,t)=>{const[,o,n]=t.match(/^var\(--palette-(\w+)-(\d+)\)$/)??[];let a=t;return o&&n&&e.forEach((e=>{const t=e.colors[Number(n)-1];e.label===o&&t&&(a="string"==typeof t?t:t.toHsbString())})),a};function u(e){const[t,o]=(0,a.useState)(),i=(0,a.useMemo)((()=>p(s)),[]);return(0,a.useEffect)((()=>{if(e.value){const t=m(s,e.value);o(t)}else o(e.value??"")}),[e.value]),r().createElement(l.A,(0,n.A)({getPopupContainer:()=>document.body,showText:!0,presets:i},e,{value:t,onChange:(t,o)=>{var n,a;n=o,null===(a=e.onChange)||void 0===a||a.call(e,c(s,n))}}))}},5944:(e,t,o)=>{o.d(t,{F:()=>M});var n=o(8769),a=o.n(n),r=o(2591),l=o.n(r),i=o(1740),s=o.n(i),p=o(8128),c=o.n(p),m=o(855),u=o.n(m),d=o(3051),v=o.n(d),b=o(3656),f=o.n(b),h=o(803),x={};x.styleTagTransform=f(),x.setAttributes=u(),x.insert=c().bind(null,"head"),x.domAPI=s(),x.insertStyleElement=v(),l()(h.A,x);const g=h.A&&h.A.locals?h.A.locals:void 0;var y=o(1469),E=o(7091),C=o(9650),A=o(8144),k=o(3995),W=o(2080),I=o(5908),T=o(1030);const S="$custom_wrapper",w="$option_id";function M(e){let{schema:t,displayLabel:o,value:r,onChange:l}=e;const[i,s]=(0,n.useState)(),[p,c]=(0,n.useState)(!1),[m,u]=(0,n.useState)([]),d=(0,n.useMemo)((()=>(0,k.cV)({name:S,type:"void",children:t},{isDefault:!1})),[t]),v=(0,n.useMemo)((()=>(0,I.DG)()),[]),b=(0,n.useCallback)((()=>{let e=m;e=i?m.map((e=>e[w]===i[w]?v.values:e)):m.concat(v.values),u(e),l(e.map((e=>(0,T.omit)(e,[w])))),c(!1)}),[v,l,m,i]),f=()=>{c(!1)},h=(0,n.useCallback)((()=>{const e=m.filter((e=>e[w]!==i[w]));u(e),l(e.map((e=>(0,T.omit)(e,[w])))),c(!1)}),[m,i,l]);return(0,n.useEffect)((()=>{r&&u(r.map((e=>({...e,[w]:Math.random()}))))}),[r]),a().createElement("div",{className:g.actionOptionsWrapper},a().createElement(C.A,{title:(i?"编辑":"新增")+"数据",open:p,onOk:b,onCancel:f,footer:()=>a().createElement("div",{className:g.modalFooter},a().createElement("div",null,i&&a().createElement(A.Ay,{danger:!0,type:"primary",onClick:h},"删除")),a().createElement("div",null,a().createElement(A.Ay,{type:"text",onClick:f},"取消"),a().createElement(A.Ay,{type:"primary",onClick:b},"确认")))},a().createElement(E.Op,{form:v},a().createElement(W.SchemaField,{schema:null==d?void 0:d[S]}))),a().createElement("div",{className:g.optionList},m.length?m.map(((e,t)=>a().createElement("div",{className:g.optionItem,key:t,onClick:()=>{return s(t=e),v.setValues(t,"overwrite"),void c(!0);var t}},e[o]))):a().createElement("div",{className:g.emptyItem},"无数据")),a().createElement(y.A,{className:g.addIcon,onClick:()=>{s(null),v.reset(),c(!0)}}))}},8409:(e,t,o)=>{o.d(t,{v:()=>W});var n=o(7091),a=o(8769),r=o.n(a),l=o(2591),i=o.n(l),s=o(1740),p=o.n(s),c=o(8128),m=o.n(c),u=o(855),d=o.n(u),v=o(3051),b=o.n(v),f=o(3656),h=o.n(f),x=o(244),g={};g.styleTagTransform=h(),g.setAttributes=d(),g.insert=m().bind(null,"head"),g.domAPI=p(),g.insertStyleElement=b(),i()(x.A,g);const y=x.A&&x.A.locals?x.A.locals:void 0;var E=o(3373),C=o.n(E);const A=(0,a.createContext)({}),k=()=>{const e=(0,n.Mt)(),t=(0,n.X0)(),o=[];return t.mapProperties(((t,n)=>{var a;const r=e.query(e.address.concat(n)).take();if("none"!==(null==r?void 0:r.display)&&"hidden"!==(null==r?void 0:r.display)&&(null===(a=t["x-component"])||void 0===a?void 0:a.indexOf("CustomTab.TabPanel"))>-1){var l,i;const e=(null==r||null===(l=r.componentProps)||void 0===l?void 0:l.key)||(null==t||null===(i=t["x-component-props"])||void 0===i?void 0:i.key)||n;o.push({name:n,props:{...null==t?void 0:t["x-component-props"],...null==r?void 0:r.componentProps,key:e},schema:t})}})),o};function W(e){var t;const o=k(),[n,l]=(0,a.useState)(null===(t=o[0])||void 0===t?void 0:t.name);return r().createElement(A.Provider,{value:{activeTab:n}},r().createElement("div",{className:y.customTabWrapper},r().createElement("div",{className:y.customTabList},o.map((e=>{var t,o;return r().createElement("div",{className:C()(y.customTabItem,{[y.active]:n===(null===(t=e.props)||void 0===t?void 0:t.key)}),key:null===(o=e.props)||void 0===o?void 0:o.key,onClick:()=>l(e.props.key)},r().createElement("div",{className:y.customTabItemLabel},e.props.title))}))),e.children))}W.TabPanel=function(e){const{activeTab:t}=(0,a.useContext)(A);return(0,a.useMemo)((()=>e.tab===t),[t,e.tab])?r().createElement("div",{className:y.customTabPanel},e.children):null}},2513:(e,t,o)=>{o.d(t,{r:()=>l});var n=o(8769),a=o.n(n);const r=(0,o(1389).wrapBrick)("eo-icon-select",{onChange:"change"});function l(e){return a().createElement(r,e)}},966:(e,t,o)=>{o.d(t,{U:()=>i});var n=o(9575),a=o(8769),r=o.n(a),l=o(9708);function i(e){const[t,o]=(0,a.useState)(),i=(0,a.useCallback)((t=>{e.onChange(t?`${t}${e.suffix}`:void 0)}),[e]);return(0,a.useEffect)((()=>{const t=(e.value??"").replace(e.suffix,"");o(t)}),[e.suffix,e.value]),r().createElement(l.pd,(0,n.A)({},e,{value:t,onChange:e=>i(e.target.value)}))}},1477:(e,t,o)=>{o.d(t,{r:()=>c});var n=o(9575),a=o(8769),r=o.n(a),l=o(9708),i=o(7091),s=o(5908),p=o(2080);function c(e){const[t,o]=(0,a.useState)(!0),c=(0,i.mN)(),m=(0,i.Mt)(),{url:u,href:d}=e.transform??{url:"url",href:"href"},v=(0,a.useMemo)((()=>(0,s.fA)(p.ADVANCED_CHANGE_KEY,((e,t)=>o=>{o(e,t)}))),[]),b=(0,a.useCallback)((()=>{const n=!t;o(n),c.setValues({[n?u:d]:e.value}),c.deleteValuesIn(n?d:u)}),[t,c,u,e.value,d]),f=(0,a.useCallback)((o=>{e.onChange(o),c.setValues({[t?u:d]:o})}),[e,c,t,u,d]),h=(0,a.useMemo)((()=>t?"内链":"外链"),[t]),x=(0,a.useCallback)((e=>{const{values:t}=e.getState(),n=m.props.name;e.setValuesIn(n,t[u]??t[d]),o(!t[d])}),[m.props.name,d,u]);return(0,a.useEffect)((()=>{c.addEffects("onAdvancedChange",(()=>{(0,s.oJ)(x),v(((e,t)=>{const o=m.props.name;e&&t.deleteValuesIn(o)}))}))}),[c,m,v,x]),(0,a.useEffect)((()=>{x(c)}),[]),r().createElement(l.pd,(0,n.A)({},e,{suffix:r().createElement("div",{style:{cursor:"pointer"},slot:"suffix",onClick:b},h),onChange:e=>f(e.target.value)}))}},4287:(e,t,o)=>{o.d(t,{p:()=>c});var n=o(9575),a=o(8769),r=o.n(a),l=o(5524),i=o(1979),s=o(6394),p=o(4514);function c(e){return r().createElement(l.Ay.Group,(0,n.A)({},e,{size:"small"}),r().createElement(l.Ay.Button,{value:"left"},r().createElement(i.A,null)),!e.hideCenter&&r().createElement(l.Ay.Button,{value:"center"},r().createElement(s.A,null)),r().createElement(l.Ay.Button,{value:"right"},r().createElement(p.A,null)))}},5768:(e,t,o)=>{o.d(t,{_:()=>A});var n=o(8769),a=o.n(n),r=o(9708),l=o(4808),i=o(1469),s=o(2591),p=o.n(s),c=o(1740),m=o.n(c),u=o(8128),d=o.n(u),v=o(855),b=o.n(v),f=o(3051),h=o.n(f),x=o(3656),g=o.n(x),y=o(767),E={};E.styleTagTransform=g(),E.setAttributes=b(),E.insert=d().bind(null,"head"),E.domAPI=m(),E.insertStyleElement=h(),p()(y.A,E);const C=y.A&&y.A.locals?y.A.locals:void 0;function A(e){return a().createElement("div",{className:C.useChildrenSelectWrapper},a().createElement(r.l6,e),a().createElement(l.A,{title:"点击添加子节点"},a().createElement(i.A,{className:C.plusIcon,onClick:()=>{var t;null==e||null===(t=e.triggerAction)||void 0===t||t.call(e,"add-slot")}})))}},3995:(e,t,o)=>{o.d(t,{qZ:()=>l,N4:()=>r,cV:()=>s});var n=o(1030);const a={type:"void",name:"style",children:[{name:"width",title:"宽度",type:"string",decorator:{name:"FormItemWithoutAdvanced",props:{layout:"vertail"}},component:{name:"InputWithUnit",props:{suffix:"px"}}},{name:"height",title:"高度",type:"string",decorator:{name:"FormItemWithoutAdvanced",props:{layout:"vertail"}},component:{name:"InputWithUnit",props:{suffix:"px"}}},{type:"string",name:"textAlign",title:"对齐",decorator:{name:"FormItemWithoutAdvanced",props:{layout:"vertail"}},component:"TextAlignRadio"},{type:"string",name:"background",title:"背景",decorator:{name:"FormItemWithoutAdvanced",props:{layout:"vertail"}},component:"ColorPicker"},{type:"string",name:"margin",title:"外边距(px)",decorator:{name:"FormItemWithoutAdvanced"},component:"BoxSize"},{type:"string",name:"padding",title:"内边距(px)",decorator:{name:"FormItemWithoutAdvanced"},component:{name:"BoxSize",props:{mode:"in"}}}]},r="#normal_form",l="#advanced_form";function i(e,t){return e?"string"==typeof e?{[`x-${t}`]:e}:{[`x-${t}`]:e.name,[`x-${t}-props`]:{..."CodeEditor"===e.name?{extraLibs:"{{extraLibs}}",links:"{{links}}",tokenClick:"{{tokenClick}}",lineNumbers:"off",glyphMargin:!1}:{},...e.props??{}}}:{}}function s(e,t){const{isDefault:o=!0}="object"==typeof t?t:{},s=e=>{let t,o={};e.children&&(t=e.children.map(s));const{name:a,type:r,component:l,decorator:p}=e,c="string"===r?{name:"FormItem"}:"boolean"===r?{name:"FormItem",props:{layout:"horizontal"}}:{},m="string"===r?{name:"Input"}:"boolean"===r?{name:"Switch",props:{size:"small"}}:{},u={type:r??"void",...(0,n.omit)(e,["children","component","decorator"]),...i({...c,..."string"==typeof p?{name:p}:p},"decorator"),...i({...m,..."string"==typeof l?{name:l}:l},"component")};if("string"==typeof a?o[a]=u:o=u,t){u.properties={};for(const e of t)"string"==typeof e.name?u.properties[e.name]=e:u.properties={...u.properties,...e}}return o};return o?{type:"object",properties:{[r]:{type:"void","x-component":"CustomTab","x-component-props":{activeTab:"property"},properties:{property:{type:"void","x-component":"CustomTab.TabPanel","x-component-props":{title:"属性",tab:"property"},properties:s({...e,children:[{name:"id",title:"id",type:"string",decorator:{name:"FormItem",props:{layout:"horizontal"}}},{name:"hidden",title:"隐藏",type:"boolean"},...e.children]})},style:{type:"object",name:"style","x-component":"CustomTab.TabPanel","x-component-props":{title:"样式",tab:"style"},properties:s(a)}}},[l]:{name:l,type:"string","x-decorator":"FormItemWithoutAdvanced","x-component":"CodeEditor","x-component-props":{extraLibs:"{{extraLibs}}",links:"{{links}}",tokenClick:"{{tokenClick}}",minLines:5,glyphMargin:!1}}}}:s(e)}},6265:(e,t,o)=>{o.d(t,{A:()=>i});var n=o(6758),a=o.n(n),r=o(935),l=o.n(r)()(a());l.push([e.id,'.advanced-form-item{position:relative}.advanced-form-item .advanced-mode-check-wrapper{position:absolute;top:6px;right:6px;line-height:0;z-index:1}.advanced-form-item .advanced-mode-check-wrapper eo-icon[icon="code"]{cursor:pointer;padding:2px 4px;background:var(--palette-gray-7);border-radius:6px}.advanced-form-item .advanced-mode-check-wrapper eo-icon.isActive[icon="code"]{background:var(--color-brand);color:#fff}',""]);const i=l},7621:(e,t,o)=>{o.d(t,{A:()=>i});var n=o(6758),a=o.n(n),r=o(935),l=o.n(r)()(a());l.push([e.id,".custom-category-title{font-size:14px;font-weight:600;line-height:14px;margin-bottom:12px;border-left:2px solid;padding-left:6px;border-color:#8d8d8d;margin-top:18px}.custom-category-title:first-child{margin-top:0}",""]);const i=l},3276:(e,t,o)=>{o.d(t,{A:()=>c});var n=o(6758),a=o.n(n),r=o(935),l=o.n(r),i=o(6265),s=o(7621),p=l()(a());p.i(i.A),p.i(s.A),p.push([e.id,".property-form-wrapper .antdV5-formily-item-feedback-layout-loose{margin-bottom:10px}.property-form-wrapper .antdV5-formily-item .antdV5-formily-item-control{align-self:center}",""]);const c=p},3607:(e,t,o)=>{o.d(t,{A:()=>i});var n=o(6758),a=o.n(n),r=o(935),l=o.n(r)()(a());l.push([e.id,".boxSizeComponent--a96YEG0R{display:flex;gap:8px}.boxSizeComponent--a96YEG0R .leftWrapper--YJoTo4he{width:80px}.boxSizeComponent--a96YEG0R .leftWrapper--YJoTo4he .outBox--bSstM0ZF{border:1px solid var(--palette-gray-6);height:80px;padding:10px;border-radius:6px;position:relative}.boxSizeComponent--a96YEG0R .leftWrapper--YJoTo4he .outBox--bSstM0ZF .inBox--VAdQyQ8u{border:1px dashed var(--palette-gray-5);height:100%;border-radius:6px;display:flex;align-items:center;justify-content:center}.boxSizeComponent--a96YEG0R .leftWrapper--YJoTo4he .outBox--bSstM0ZF .inBox--VAdQyQ8u .connect-btn--iG4M5iHm{cursor:pointer}.boxSizeComponent--a96YEG0R .leftWrapper--YJoTo4he .outBox--bSstM0ZF .line--MEU6xbQI{position:absolute;background-color:var(--palette-gray-6)}.boxSizeComponent--a96YEG0R .leftWrapper--YJoTo4he .outBox--bSstM0ZF .line--MEU6xbQI.active--kwDvPu6c{background-color:var(--color-brand)}.boxSizeComponent--a96YEG0R .leftWrapper--YJoTo4he .outBox--bSstM0ZF .vertical--PTCuTBBU{left:50%;width:2px;height:10px}.boxSizeComponent--a96YEG0R .leftWrapper--YJoTo4he .outBox--bSstM0ZF .horizontal--C56jlFEU{top:50%;width:10px;height:2px}.boxSizeComponent--a96YEG0R .leftWrapper--YJoTo4he .outBox--bSstM0ZF .top--IAYy5_q3{top:0}.boxSizeComponent--a96YEG0R .leftWrapper--YJoTo4he .outBox--bSstM0ZF .right--lywbhIOD{right:0}.boxSizeComponent--a96YEG0R .leftWrapper--YJoTo4he .outBox--bSstM0ZF .bottom--bcHIN61S{bottom:0}.boxSizeComponent--a96YEG0R .leftWrapper--YJoTo4he .outBox--bSstM0ZF .left--ZqcFMgN_{left:0}.boxSizeComponent--a96YEG0R .rightWrapper--VEyni1eJ{flex:1;display:flex;flex-direction:column;gap:12px}.boxSizeComponent--a96YEG0R .rightWrapper--VEyni1eJ .inputWrapper--dlSjkwzs{display:flex;gap:12px}.boxSizeComponent--a96YEG0R .rightWrapper--VEyni1eJ .inputWrapper--dlSjkwzs .antdV5-input{text-align:right}",""]),l.locals={boxSizeComponent:"boxSizeComponent--a96YEG0R",leftWrapper:"leftWrapper--YJoTo4he",outBox:"outBox--bSstM0ZF",inBox:"inBox--VAdQyQ8u","connect-btn":"connect-btn--iG4M5iHm",line:"line--MEU6xbQI",active:"active--kwDvPu6c",vertical:"vertical--PTCuTBBU",horizontal:"horizontal--C56jlFEU",top:"top--IAYy5_q3",right:"right--lywbhIOD",bottom:"bottom--bcHIN61S",left:"left--ZqcFMgN_",rightWrapper:"rightWrapper--VEyni1eJ",inputWrapper:"inputWrapper--dlSjkwzs"};const i=l},244:(e,t,o)=>{o.d(t,{A:()=>i});var n=o(6758),a=o.n(n),r=o(935),l=o.n(r)()(a());l.push([e.id,".customTabWrapper--rhCkGBJ2 .customTabList--yAojeBWG{position:relative;display:flex;align-items:stretch;justify-items:flex-start;margin-bottom:8px}.customTabWrapper--rhCkGBJ2 .customTabList--yAojeBWG .customTabItem--Zjxji9O5{position:relative;text-align:center;cursor:pointer;transition:all 0.2s cubic-bezier(0.645,0.045,0.355,1);border-radius:4px;transform:translateZ(0)}.customTabWrapper--rhCkGBJ2 .customTabList--yAojeBWG .customTabItem--Zjxji9O5.active--ULNnDJEv{background-color:var(--palette-gray-6);box-shadow:0 1px 2px 0 rgba(0,0,0,0.03),0 1px 6px -1px rgba(0,0,0,0.02),0 2px 4px 0 rgba(0,0,0,0.02);color:#fff}.customTabWrapper--rhCkGBJ2 .customTabList--yAojeBWG .customTabItem--Zjxji9O5 .customTabItemLabel--scejdE0w{padding:2px 12px}",""]),l.locals={customTabWrapper:"customTabWrapper--rhCkGBJ2",customTabList:"customTabList--yAojeBWG",customTabItem:"customTabItem--Zjxji9O5",active:"active--ULNnDJEv",customTabItemLabel:"customTabItemLabel--scejdE0w"};const i=l},803:(e,t,o)=>{o.d(t,{A:()=>i});var n=o(6758),a=o.n(n),r=o(935),l=o.n(r)()(a());l.push([e.id,".actionOptionsWrapper--HuwosiuP .optionList--lJm6W8Kr .emptyItem--gMv4r0f7,\n .actionOptionsWrapper--HuwosiuP .optionList--lJm6W8Kr .optionItem--xEPQt9Mw{border:1px solid var(--palette-gray-6);display:flex;justify-content:center;align-items:center;font-size:14px;border-top:none}.actionOptionsWrapper--HuwosiuP .optionList--lJm6W8Kr .emptyItem--gMv4r0f7:first-child, .actionOptionsWrapper--HuwosiuP .optionList--lJm6W8Kr .optionItem--xEPQt9Mw:first-child{border-top:1px solid var(--palette-gray-6)}.actionOptionsWrapper--HuwosiuP .optionList--lJm6W8Kr .emptyItem--gMv4r0f7:last-child, .actionOptionsWrapper--HuwosiuP .optionList--lJm6W8Kr .optionItem--xEPQt9Mw:last-child{border-bottom:none}.actionOptionsWrapper--HuwosiuP .optionList--lJm6W8Kr .optionItem--xEPQt9Mw{cursor:pointer}.actionOptionsWrapper--HuwosiuP .optionList--lJm6W8Kr .optionItem--xEPQt9Mw:hover{background-color:var(--palette-gray-5)}.actionOptionsWrapper--HuwosiuP .addIcon--ptNA7JRE{width:100%;border:1px solid var(--palette-gray-6);display:flex;justify-content:center;align-items:center;padding:4px;font-size:22px}.modalFooter--eRxlWgTL{display:flex;justify-content:space-between}",""]),l.locals={actionOptionsWrapper:"actionOptionsWrapper--HuwosiuP",optionList:"optionList--lJm6W8Kr",emptyItem:"emptyItem--gMv4r0f7",optionItem:"optionItem--xEPQt9Mw",addIcon:"addIcon--ptNA7JRE",modalFooter:"modalFooter--eRxlWgTL"};const i=l},767:(e,t,o)=>{o.d(t,{A:()=>i});var n=o(6758),a=o.n(n),r=o(935),l=o.n(r)()(a());l.push([e.id,".useChildrenSelectWrapper--IczULak5{display:flex;gap:12px}.useChildrenSelectWrapper--IczULak5 .plusIcon--CyQgp1bl{cursor:pointer;font-size:22px;color:var(--color-brand)}",""]),l.locals={useChildrenSelectWrapper:"useChildrenSelectWrapper--IczULak5",plusIcon:"plusIcon--CyQgp1bl"};const i=l},74:(e,t,o)=>{var n=o(2591),a=o.n(n),r=o(1740),l=o.n(r),i=o(8128),s=o.n(i),p=o(855),c=o.n(p),m=o(3051),u=o.n(m),d=o(3656),v=o.n(d),b=o(3276),f={};f.styleTagTransform=v(),f.setAttributes=c(),f.insert=s().bind(null,"head"),f.domAPI=l(),f.insertStyleElement=u(),a()(b.A,f),b.A&&b.A.locals&&b.A.locals}}]);
2
+ //# sourceMappingURL=9080.c73b20aa.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chunks/9080.c73b20aa.js","mappings":"0SAmBA,MAAMA,GAAcC,EAAAA,EAAAA,WAAyC,WACvDC,GAAiBD,EAAAA,EAAAA,WAAmC,cASnD,SAASE,EAAiBC,GAC/B,MAAMC,GAAOC,EAAAA,EAAAA,MACPC,GAAQC,EAAAA,EAAAA,MACRC,GAAQC,EAAAA,EAAAA,OACPC,EAAMC,IAAWC,EAAAA,EAAAA,UACU,iBAAxBN,EAAcO,QACpBC,EAAAA,EAAAA,aAAaR,EAAcO,OACzB,WACA,UAEAE,GAAaC,EAAAA,EAAAA,UAAQ,IAAe,aAATN,GAAqB,CAACA,IACjDO,GAAuB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A4B,KAE1DA,EAAwB1E,KAAK,CAAC2E,EAAOC,GAAI,2xDAA4xD,KAEr0DF,EAAwBtP,OAAS,CAChC,iBAAoB,6BACpB,YAAe,wBACf,OAAU,mBACV,MAAS,kBACT,cAAe,wBACf,KAAQ,iBACR,OAAU,mBACV,SAAY,qBACZ,WAAc,uBACd,IAAO,gBACP,MAAS,kBACT,OAAU,mBACV,KAAQ,iBACR,aAAgB,yBAChB,aAAgB,0BAEjB,S,iECrBIsP,E,MAA0B,GAA4B,KAE1DA,EAAwB1E,KAAK,CAAC2E,EAAOC,GAAI,0uBAA2uB,KAEpxBF,EAAwBtP,OAAS,CAChC,iBAAoB,6BACpB,cAAiB,0BACjB,cAAiB,0BACjB,OAAU,mBACV,mBAAsB,gCAEvB,S,iECXIsP,E,MAA0B,GAA4B,KAE1DA,EAAwB1E,KAAK,CAAC2E,EAAOC,GAAI,soCACghC,KAEzjCF,EAAwBtP,OAAS,CAChC,qBAAwB,iCACxB,WAAc,uBACd,UAAa,sBACb,WAAc,uBACd,QAAW,oBACX,YAAe,yBAEhB,S,iECbIsP,E,MAA0B,GAA4B,KAE1DA,EAAwB1E,KAAK,CAAC2E,EAAOC,GAAI,4KAA6K,KAEtNF,EAAwBtP,OAAS,CAChC,yBAA4B,qCAC5B,SAAY,sBAEb,S,8ICAIN,EAAU,CAAC,EAEfA,EAAQC,kBAAoB,IAC5BD,EAAQE,cAAgB,IACxBF,EAAQG,OAAS,SAAc,KAAM,QACrCH,EAAQI,OAAS,IACjBJ,EAAQK,mBAAqB,IAEhB,IAAI,IAASL,GAKJ,KAAW,IAAQM,QAAS,IAAQA,M","sources":["webpack:///./src/property-editor/components/AdvancedFormItem/index.tsx","webpack:///./src/property-editor/components/CategoryTitle/index.tsx","webpack:///./src/property-editor/components/common/BoxSizeComponent.module.css?766a","webpack:///./src/property-editor/components/common/BoxSizeComponent.tsx","webpack:///./src/property-editor/components/common/CodeEditorComponent.tsx","webpack:///./src/property-editor/utils/colorTransform.ts","webpack:///./src/property-editor/components/common/ColorPickerComponent.tsx","webpack:///./src/property-editor/components/common/CutomOptionsComponent.module.css?273b","webpack:///./src/property-editor/components/common/CustomOptionsComponent.tsx","webpack:///./src/property-editor/components/common/CustomTab.module.css?aeb2","webpack:///./src/property-editor/components/common/CustomTab.tsx","webpack:///./src/property-editor/components/common/IconSelectComponent.tsx","webpack:///./src/property-editor/components/common/InputWithUnitComponent.tsx","webpack:///./src/property-editor/components/common/InputWithUrlComponent.tsx","webpack:///./src/property-editor/components/common/TextAlignRadioComponent.tsx","webpack:///./src/property-editor/components/common/UseChildrenSelectComponent.module.css?b0be","webpack:///./src/property-editor/components/common/UseChildrenSelectComponent.tsx","webpack:///./src/property-editor/schema/styles.schema.ts","webpack:///./src/property-editor/utils/formilySchemaFormatter.ts","webpack:///./src/property-editor/components/AdvancedFormItem/AdvancedFormItem.shadow.css","webpack:///./src/property-editor/components/CategoryTitle/CategoryTitle.shadow.css","webpack:///./src/property-editor/style.css","webpack:///./src/property-editor/components/common/BoxSizeComponent.module.css","webpack:///./src/property-editor/components/common/CustomTab.module.css","webpack:///./src/property-editor/components/common/CutomOptionsComponent.module.css","webpack:///./src/property-editor/components/common/UseChildrenSelectComponent.module.css","webpack:///./src/property-editor/style.css?280e"],"sourcesContent":["import React, { useCallback, useMemo, useState } from \"react\";\nimport { FormItem, IFormItemProps } from \"@formily/antd-v5\";\nimport { wrapBrick } from \"@next-core/react-element\";\nimport { GeneralIcon, GeneralIconProps } from \"@next-bricks/icons/general-icon\";\nimport {\n useExpressionScope,\n useField,\n useForm,\n useFormEffects,\n} from \"@formily/react\";\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-ignore\nimport { EoTooltip, ToolTipProps } from \"@next-bricks/basic/src/tooltip\";\nimport classNames from \"classnames\";\nimport { isObject } from \"lodash\";\nimport { onFieldInitialValueChange } from \"@formily/core\";\nimport { isEvaluable } from \"@next-core/cook\";\nimport yaml from \"js-yaml\";\n\nconst WrappedIcon = wrapBrick<GeneralIcon, GeneralIconProps>(\"eo-icon\");\nconst WrappedToolTip = wrapBrick<EoTooltip, ToolTipProps>(\"eo-tooltip\");\n\ntype Mode = \"normal\" | \"advanced\";\n\ninterface AdvancedFormItemProps extends IFormItemProps {\n children: React.ReactElement;\n formEffect?: () => void;\n}\n\nexport function AdvancedFormItem(props: AdvancedFormItemProps) {\n const form = useForm();\n const field = useField();\n const scope = useExpressionScope();\n const [mode, setMode] = useState<Mode>(\n typeof (field as any).value === \"string\" &&\n isEvaluable((field as any).value)\n ? \"advanced\"\n : \"normal\"\n );\n const isAdvanced = useMemo(() => mode === \"advanced\", [mode]);\n const fieldOriginComponent = useMemo<any>(() => field.component, [field]);\n\n const handleModeCheck = useCallback(() => {\n const updateMode = isAdvanced ? \"normal\" : \"advanced\";\n const isAdvancedMode = updateMode === \"advanced\";\n setMode(updateMode);\n field.setComponent(\n isAdvancedMode ? \"CodeEditor\" : fieldOriginComponent[0],\n {\n ...(isAdvancedMode\n ? { ...(scope ?? {}), lineNumbers: \"off\", glyphMargin: false }\n : fieldOriginComponent[1]),\n }\n );\n\n const value = form.getValuesIn(field.props.name);\n if (isAdvancedMode && isObject(value)) {\n form.setInitialValues({\n [field.props.name as string]: yaml.safeDump(value),\n });\n } else if (!isAdvancedMode && value && typeof value === \"string\") {\n let newValue: any;\n try {\n newValue = yaml.load(value);\n } catch {\n newValue = null;\n }\n form.setInitialValues(\n {\n [field.props.name as string]: newValue,\n },\n \"overwrite\"\n );\n }\n }, [form, field, isAdvanced, fieldOriginComponent, scope]);\n\n useFormEffects(() => {\n onFieldInitialValueChange(field.props.name, ({ value }) => {\n if (typeof value === \"string\" && isEvaluable(value)) {\n setMode(\"advanced\");\n\n field.setComponent(\"CodeEditor\", {\n ...(scope ?? {}),\n lineNumbers: \"off\",\n glyphMargin: false,\n });\n }\n });\n });\n\n return (\n <div className=\"advanced-form-item\">\n <FormItem\n {...{\n ...props,\n layout: isAdvanced ? null : props.layout || \"vertical\",\n }}\n >\n {props.children}\n </FormItem>\n <div className=\"advanced-mode-check-wrapper\">\n <WrappedToolTip\n content={mode === \"normal\" ? \"使用表达式\" : \"关闭表达式\"}\n >\n <WrappedIcon\n className={classNames({\n isActive: isAdvanced,\n })}\n lib=\"fa\"\n icon=\"code\"\n onClick={handleModeCheck}\n />\n </WrappedToolTip>\n </div>\n </div>\n );\n}\n","import React from \"react\";\n\ninterface categoryTitleProps {\n text: string;\n}\nexport function CategoryTitle(props: categoryTitleProps): React.ReactElement {\n return <div className=\"custom-category-title\">{props.text}</div>;\n}\n","\n import API from \"!../../../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../../../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[3].use[1]!../../../../../../node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[3].use[2]!./BoxSizeComponent.module.css\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\noptions.insert = insertFn.bind(null, \"head\");\noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../../../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[3].use[1]!../../../../../../node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[3].use[2]!./BoxSizeComponent.module.css\";\n export default content && content.locals ? content.locals : undefined;\n","import { Input } from \"@formily/antd-v5\";\nimport { DisconnectOutlined, LinkOutlined } from \"@ant-design/icons\";\nimport React, { useCallback, useEffect, useMemo, useState } from \"react\";\nimport styles from \"./BoxSizeComponent.module.css\";\nimport classNames from \"classnames\";\n\ntype Direction = \"top\" | \"bottom\" | \"left\" | \"right\";\n\nenum DirectionEnum {\n top = 0,\n right = 1,\n bottom = 2,\n left = 3,\n}\n\ntype BoxValue = {\n [key in Direction]: number | string;\n};\n\ninterface BoxSizeComponentProps {\n onChange: (value: string) => void;\n value: string;\n mode: \"in\" | \"out\";\n}\n\nexport function BoxSizeComponent({\n onChange,\n value,\n mode,\n}: BoxSizeComponentProps) {\n const [tranformValue, setTransformValue] = useState<BoxValue>();\n const [connect, setConnect] = useState<boolean>(false);\n const [direction, setDirection] = useState<Direction>();\n const isInMode = useMemo(() => mode === \"in\", [mode]);\n\n const handleFocus = (direction: Direction) => {\n setDirection(direction);\n };\n\n const handleBlur = () => {\n setDirection(null);\n };\n\n const handleChange = useCallback(\n (direction: Direction, inputValue: string) => {\n const newValue = inputValue.match(/\\d+/);\n\n const realValue = Number(newValue !== null ? newValue[0] : 0);\n\n const changeValue = connect\n ? `${realValue}px`\n : `${(value ?? \"0px 0px 0px 0px\")\n .match(/(\\d+px)/g)\n .map((item, index) => {\n if (DirectionEnum[direction] === index) {\n return `${realValue}px`;\n }\n return item;\n })\n .join(\" \")}`;\n onChange(changeValue);\n },\n [connect, onChange, value]\n );\n\n const handleConnectClick = (isConnect: boolean) => {\n setConnect(isConnect);\n };\n\n const transfrom = useCallback((value: string) => {\n const realValue = (value ?? \"0px 0px 0px 0px\").match(/(\\d+)/g);\n\n if (realValue.length === 1) {\n setConnect(true);\n\n setTransformValue({\n top: realValue[0],\n right: realValue[0],\n bottom: realValue[0],\n left: realValue[0],\n });\n } else {\n setTransformValue({\n top: realValue[0],\n right: realValue[1],\n bottom: realValue[2] ?? realValue[0],\n left: realValue[3] ?? realValue[1],\n });\n }\n }, []);\n\n useEffect(() => {\n transfrom(value);\n }, [value, transfrom]);\n\n return (\n <div className={styles.boxSizeComponent}>\n <div className={styles.leftWrapper}>\n <div className={styles.outBox}>\n <div\n className={styles.inBox}\n style={{\n position: isInMode ? \"relative\" : \"initial\",\n }}\n >\n <div\n className={classNames(styles.top, styles.line, styles.vertical, {\n [styles.active]: direction === \"top\" || connect,\n })}\n />\n <div\n className={classNames(\n styles.right,\n styles.line,\n styles.horizontal,\n { [styles.active]: direction === \"right\" || connect }\n )}\n />\n <div\n className={classNames(\n styles.left,\n styles.line,\n styles.horizontal,\n { [styles.active]: direction === \"left\" || connect }\n )}\n />\n <div\n className={classNames(\n styles.bottom,\n styles.line,\n styles.vertical,\n { [styles.active]: direction === \"bottom\" || connect }\n )}\n />\n\n <div className=\"connect-btn\">\n {connect ? (\n <LinkOutlined\n style={{ color: \"var(--color-brand)\" }}\n onClick={() => handleConnectClick(false)}\n />\n ) : (\n <DisconnectOutlined onClick={() => handleConnectClick(true)} />\n )}\n </div>\n </div>\n </div>\n </div>\n <div className={styles.rightWrapper}>\n <div className={styles.inputWrapper}>\n <Input\n prefix={\"上\"}\n placeholder=\"0\"\n value={tranformValue?.top}\n onFocus={() => handleFocus(\"top\")}\n onBlur={handleBlur}\n onChange={(event) => handleChange(\"top\", event.target.value)}\n />\n <Input\n prefix={\"左\"}\n placeholder=\"0\"\n value={tranformValue?.left}\n onFocus={() => handleFocus(\"left\")}\n onChange={(event) => handleChange(\"left\", event.target.value)}\n onBlur={handleBlur}\n />\n </div>\n <div className={styles.inputWrapper}>\n <Input\n prefix={\"下\"}\n placeholder=\"0\"\n value={tranformValue?.bottom}\n onFocus={() => handleFocus(\"bottom\")}\n onBlur={handleBlur}\n onChange={(event) => handleChange(\"bottom\", event.target.value)}\n />\n <Input\n prefix={\"右\"}\n placeholder=\"0\"\n value={tranformValue?.right}\n onFocus={() => handleFocus(\"right\")}\n onBlur={handleBlur}\n onChange={(event) => handleChange(\"right\", event.target.value)}\n />\n </div>\n </div>\n </div>\n );\n}\n","import React, { useCallback, useEffect, useState } from \"react\";\nimport { wrapBrick } from \"@next-core/react-element\";\nimport { CodeEditor, CodeEditorProps } from \"@next-bricks/vs/code-editor\";\nimport yaml from \"js-yaml\";\nimport { isEmpty } from \"lodash\";\n\ninterface CodeEditorComponentProps extends CodeEditorProps {\n onChange?: (value?: any) => void;\n tokenClick?: (value?: any) => void;\n scope: any;\n}\n\ninterface CodeEditorEvents {\n \"code.change\"?: (value?: any) => void;\n \"token.click\"?: (value?: any) => void;\n}\n\ninterface CodeEditorEventsMapping {\n onChange: \"code.change\";\n tokenClick: \"token.click\";\n}\n\nconst WrappedCodeEditor = wrapBrick<\n CodeEditor,\n CodeEditorProps,\n CodeEditorEvents,\n CodeEditorEventsMapping\n>(\"vs.code-editor\", {\n onChange: \"code.change\",\n tokenClick: \"token.click\",\n});\n\nexport function CodeEditorComponent(\n props: CodeEditorComponentProps\n): React.ReactElement {\n const [initValue, setInitValue] = useState<string>();\n const [value, setValue] = useState<string>();\n\n const handleChange = useCallback(\n (event: any) => {\n setValue(event.detail ? event.detail : undefined);\n const value = event.detail ? yaml.safeLoad(event.detail) : undefined;\n props?.onChange?.(value);\n },\n [props]\n );\n\n useEffect(() => {\n if (props.value && !initValue) {\n let value = props.value as any;\n if (value && typeof value !== \"string\") {\n if (isEmpty(value)) {\n value = \"\";\n } else {\n value = yaml.safeDump(\n Array.isArray(value)\n ? value\n : {\n ...value,\n style: isEmpty(value.style) ? undefined : value.style,\n },\n {\n skipInvalid: true,\n }\n );\n }\n }\n\n setInitValue(value);\n }\n }, [props.value, initValue]);\n\n return (\n <WrappedCodeEditor\n minLines={props.minLines ?? 1}\n automaticLayout=\"fit-content\"\n language={\"brick_next_yaml\"}\n theme={\"vs-dark\"}\n {...props}\n value={value ?? initValue}\n onChange={handleChange}\n />\n );\n}\n","import { generate } from \"@ant-design/colors\";\nimport type { ColorPickerProps } from \"antd\";\n\nexport type Presets = Required<ColorPickerProps>[\"presets\"];\n\nexport type ColorItem = {\n metaColor: {\n format?: string;\n originalInput: string;\n };\n};\n\nconst genPresets = (presets: Record<string, string>): Presets =>\n Object.entries(presets).map(([label, colors]) => ({\n label,\n colors: generate(colors),\n }));\n\nexport const presets = genPresets({\n amber: \"#f7bf02\",\n yellow: \"#fadb14\",\n orange: \"#e38306\",\n pink: \"#ff1a79\",\n red: \"#f24c25\",\n blue: \"#1a7aff\",\n indigo: \"#3844e8\",\n \"deep-purple\": \"#6641f9\",\n \"gray-blue\": \"#778dc3\",\n purple: \"#893ad8\",\n cyan: \"#21d4f3\",\n teal: \"#1dc897\",\n green: \"#08BF33\",\n});\n\nexport const compressPresets = (presets: Presets): Presets => {\n return [\n {\n label: \"系统默认\",\n colors: presets.map((item) => item.colors).flat(),\n },\n ];\n};\n\nexport const trasnformColorToCssVariables = (\n presets: Presets,\n color: string\n) => {\n let matchColor = color;\n presets.forEach((preset) => {\n const key = preset.label;\n\n const index = preset.colors.findIndex((item) =>\n typeof item === \"string\"\n ? item === matchColor\n : item.toHsbString() === matchColor\n );\n\n if (index >= 0) {\n matchColor = `var(--palette-${key}-${index + 1})`;\n }\n });\n\n return matchColor;\n};\n\nexport const transformCssVariablesToColor = (\n presets: Presets,\n color: string\n) => {\n const [, key, index] = color.match(/^var\\(--palette-(\\w+)-(\\d+)\\)$/) ?? [];\n\n let matchColor = color;\n if (key && index) {\n presets.forEach((preset) => {\n const color = preset.colors[Number(index) - 1];\n if (preset.label === key && color) {\n matchColor = typeof color === \"string\" ? color : color.toHsbString();\n }\n });\n }\n\n return matchColor;\n};\n","import React, { useEffect, useMemo, useState } from \"react\";\nimport { ColorPicker } from \"antd\";\nimport { ColorPickerProps } from \"antd/lib/color-picker\";\nimport {\n compressPresets,\n presets,\n transformCssVariablesToColor,\n trasnformColorToCssVariables,\n} from \"../../utils/colorTransform\";\ninterface ColorPickerComponentProps extends Omit<ColorPickerProps, \"onChange\"> {\n onChange?: (value: string) => void;\n}\n\nexport function ColorPickerComponent(\n props: ColorPickerComponentProps\n): React.ReactElement {\n const [value, setValue] = useState<string>();\n const transformPresets = useMemo(() => compressPresets(presets), []);\n\n const handleChange = (color: string) => {\n props.onChange?.(trasnformColorToCssVariables(presets, color));\n };\n\n useEffect(() => {\n if (props.value) {\n const value = transformCssVariablesToColor(\n presets,\n props.value as string\n );\n setValue(value);\n } else {\n setValue((props.value as string) ?? \"\");\n }\n }, [props.value]);\n\n return (\n <ColorPicker\n getPopupContainer={() => document.body}\n showText={true}\n presets={transformPresets}\n {...props}\n value={value}\n onChange={(_, hex) => {\n handleChange(hex);\n }}\n />\n );\n}\n","\n import API from \"!../../../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../../../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[3].use[1]!../../../../../../node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[3].use[2]!./CutomOptionsComponent.module.css\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\noptions.insert = insertFn.bind(null, \"head\");\noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../../../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[3].use[1]!../../../../../../node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[3].use[2]!./CutomOptionsComponent.module.css\";\n export default content && content.locals ? content.locals : undefined;\n","import React, { useCallback, useEffect, useMemo, useState } from \"react\";\nimport styles from \"./CutomOptionsComponent.module.css\";\nimport { PlusCircleOutlined } from \"@ant-design/icons\";\nimport { FormProvider } from \"@formily/react\";\nimport { Modal, Button } from \"antd\";\nimport {\n DataNode,\n formilySchemaFormatter,\n} from \"../../utils/formilySchemaFormatter\";\nimport { SchemaField } from \"../..\";\nimport { createForm } from \"@formily/core\";\nimport { omit } from \"lodash\";\n\ninterface ActionOptionsComponentProps {\n onChange: (value: any[]) => void;\n displayLabel: string;\n schema: DataNode[];\n value: any;\n}\n\nconst CUSTOM_WRAPPER = \"$custom_wrapper\";\nconst OPTION_ID = \"$option_id\";\n\nexport function CustomOptionsComponent({\n schema,\n displayLabel,\n value,\n onChange,\n}: ActionOptionsComponentProps) {\n const [editItem, setEditItem] = useState<any>();\n const [isModalOpen, setIsModalOpen] = useState<boolean>(false);\n const [options, setOptions] = useState<any[]>([]);\n const formatSchema: any = useMemo(\n () =>\n formilySchemaFormatter(\n {\n name: CUSTOM_WRAPPER,\n type: \"void\",\n children: schema,\n },\n {\n isDefault: false,\n }\n ),\n [schema]\n );\n\n const form = useMemo(() => createForm(), []);\n\n const handleAddAction = () => {\n setEditItem(null);\n form.reset();\n setIsModalOpen(true);\n };\n\n const handleEditItem = (data: any) => {\n setEditItem(data);\n form.setValues(data, \"overwrite\");\n setIsModalOpen(true);\n };\n\n const handleOk = useCallback(() => {\n let newOptions = options;\n if (editItem) {\n newOptions = options.map((item) => {\n if (item[OPTION_ID] === editItem[OPTION_ID]) {\n return form.values;\n }\n return item;\n });\n } else {\n newOptions = options.concat(form.values);\n }\n setOptions(newOptions);\n\n onChange(newOptions.map((item) => omit(item, [OPTION_ID])));\n setIsModalOpen(false);\n }, [form, onChange, options, editItem]);\n\n const handleCancel = () => {\n setIsModalOpen(false);\n };\n\n const handleDelete = useCallback(() => {\n const newOptions = options.filter(\n (item) => item[OPTION_ID] !== editItem[OPTION_ID]\n );\n setOptions(newOptions);\n\n onChange(newOptions.map((item) => omit(item, [OPTION_ID])));\n\n setIsModalOpen(false);\n }, [options, editItem, onChange]);\n\n useEffect(() => {\n if (value) {\n setOptions(\n value.map((item: any) => ({\n ...item,\n [OPTION_ID]: Math.random(),\n }))\n );\n }\n }, [value]);\n\n return (\n <div className={styles.actionOptionsWrapper}>\n <Modal\n title={`${editItem ? \"编辑\" : \"新增\"}数据`}\n open={isModalOpen}\n onOk={handleOk}\n onCancel={handleCancel}\n footer={() => (\n <div className={styles.modalFooter}>\n <div>\n {editItem && (\n <Button danger type=\"primary\" onClick={handleDelete}>\n 删除\n </Button>\n )}\n </div>\n <div>\n <Button type=\"text\" onClick={handleCancel}>\n 取消\n </Button>\n <Button type=\"primary\" onClick={handleOk}>\n 确认\n </Button>\n </div>\n </div>\n )}\n >\n <FormProvider form={form}>\n <SchemaField schema={formatSchema?.[CUSTOM_WRAPPER]} />\n </FormProvider>\n </Modal>\n <div className={styles.optionList}>\n {options.length ? (\n options.map((item, index) => {\n return (\n <div\n className={styles.optionItem}\n key={index}\n onClick={() => handleEditItem(item)}\n >\n {item[displayLabel]}\n </div>\n );\n })\n ) : (\n <div className={styles.emptyItem}>无数据</div>\n )}\n </div>\n <PlusCircleOutlined\n className={styles.addIcon}\n onClick={handleAddAction}\n />\n </div>\n );\n}\n","\n import API from \"!../../../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../../../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[3].use[1]!../../../../../../node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[3].use[2]!./CustomTab.module.css\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\noptions.insert = insertFn.bind(null, \"head\");\noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../../../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[3].use[1]!../../../../../../node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[3].use[2]!./CustomTab.module.css\";\n export default content && content.locals ? content.locals : undefined;\n","import { Schema, SchemaKey, useField, useFieldSchema } from \"@formily/react\";\nimport React, { createContext, useContext, useMemo, useState } from \"react\";\nimport styles from \"./CustomTab.module.css\";\nimport classNames from \"classnames\";\n\ninterface CustomTabContextProps {\n activeTab?: string;\n}\n\nconst CustomTabContext = createContext<CustomTabContextProps>({});\nconst useCustonTabContext = () => useContext(CustomTabContext);\n\nconst useTabs = () => {\n const tabsField = useField();\n const schema = useFieldSchema();\n const tabs: { name: SchemaKey; props: any; schema: Schema }[] = [];\n schema.mapProperties((schema, name) => {\n const field = tabsField.query(tabsField.address.concat(name)).take();\n if (field?.display === \"none\" || field?.display === \"hidden\") return;\n if (schema[\"x-component\"]?.indexOf(\"CustomTab.TabPanel\") > -1) {\n const key =\n field?.componentProps?.key ||\n schema?.[\"x-component-props\"]?.key ||\n name;\n tabs.push({\n name,\n props: {\n ...schema?.[\"x-component-props\"],\n ...field?.componentProps,\n key,\n },\n schema,\n });\n }\n });\n return tabs;\n};\n\nexport function CustomTab(props: any) {\n const tabs = useTabs();\n const [activeTab, setActiveTab] = useState<string>(tabs[0]?.name as string);\n\n return (\n <CustomTabContext.Provider\n value={{\n activeTab: activeTab,\n }}\n >\n <div className={styles.customTabWrapper}>\n <div className={styles.customTabList}>\n {tabs.map((item) => {\n return (\n <div\n className={classNames(styles.customTabItem, {\n [styles.active]: activeTab === item.props?.key,\n })}\n key={item.props?.key}\n onClick={() => setActiveTab(item.props.key)}\n >\n <div className={styles.customTabItemLabel}>\n {item.props.title}\n </div>\n </div>\n );\n })}\n </div>\n {props.children}\n </div>\n </CustomTabContext.Provider>\n );\n}\n\nCustomTab.TabPanel = function TabPanel(props: any) {\n const { activeTab } = useCustonTabContext();\n\n const isActive = useMemo(\n () => props.tab === activeTab,\n [activeTab, props.tab]\n );\n\n if (!isActive) return null;\n\n return <div className={styles.customTabPanel}>{props.children}</div>;\n};\n","import React from \"react\";\nimport { IconSelect, IconSelectProps } from \"@next-bricks/form/icon-select\";\nimport { wrapBrick } from \"@next-core/react-element\";\ninterface IconSelectComponentProps extends IconSelectProps {\n onChange?: (value?: any) => void;\n}\ninterface IconSelectEvents {\n change?: (value?: any) => void;\n}\nexport interface IconSelectEventsMapping {\n onChange: \"change\";\n}\nconst WrappedIconSelect = wrapBrick<\n IconSelect,\n IconSelectProps,\n IconSelectEvents,\n IconSelectEventsMapping\n>(\"eo-icon-select\", {\n onChange: \"change\",\n});\nexport function IconSelectComponent(props: IconSelectComponentProps) {\n return <WrappedIconSelect {...props} />;\n}\n","import React, { useCallback, useEffect, useState } from \"react\";\nimport { Input } from \"@formily/antd-v5\";\nimport { InputProps } from \"antd\";\n\ntype InputWithUnitComponentProps = InputProps & {\n onChange: (value: string) => void;\n};\n\nexport function InputWithUnitComponent(props: InputWithUnitComponentProps) {\n const [transformValue, setTransfromValue] = useState<string>();\n const handleChange = useCallback(\n (value: string) => {\n props.onChange(value ? `${value}${props.suffix as string}` : undefined);\n },\n [props]\n );\n\n useEffect(() => {\n const realValue = ((props.value as string) ?? \"\").replace(\n props.suffix as string,\n \"\"\n );\n setTransfromValue(realValue);\n }, [props.suffix, props.value]);\n\n return (\n <Input\n {...props}\n value={transformValue}\n onChange={(e) => handleChange(e.target.value)}\n />\n );\n}\n","import React, { useCallback, useEffect, useMemo, useState } from \"react\";\nimport { Input } from \"@formily/antd-v5\";\nimport { useField, useForm } from \"@formily/react\";\nimport {\n createEffectHook,\n Form,\n onFormInitialValuesChange,\n} from \"@formily/core\";\nimport { ADVANCED_CHANGE_KEY } from \"../../index.js\";\n\ninterface InputWithUrlComponentProps {\n onChange: (value: string) => void;\n value: string;\n name: string;\n advancedMode?: boolean;\n transform: {\n url: string;\n href: string;\n };\n}\n\nexport function InputWithUrlComponent(props: InputWithUrlComponentProps) {\n const [mode, setMode] = useState<boolean>(true);\n const form = useForm();\n const field = useField();\n const { url, href } = props.transform ?? { url: \"url\", href: \"href\" };\n\n const onAdvancedChangeEffect = useMemo(\n () =>\n createEffectHook(\n ADVANCED_CHANGE_KEY,\n (advancedMode, form) => (listener) => {\n listener(advancedMode, form);\n }\n ),\n []\n );\n\n const handleModeClick = useCallback(() => {\n const realMode = !mode;\n setMode(realMode);\n\n form.setValues({ [realMode ? url : href]: props.value });\n form.deleteValuesIn(realMode ? href : url);\n }, [mode, form, url, props.value, href]);\n\n const handleChange = useCallback(\n (value: string) => {\n props.onChange(value);\n\n form.setValues({ [mode ? url : href]: value });\n },\n [props, form, mode, url, href]\n );\n\n const suffixText = useMemo(() => `${mode ? \"内链\" : \"外链\"}`, [mode]);\n\n const computedLink = useCallback(\n (form: Form) => {\n const { values } = form.getState();\n const fieldName = field.props.name;\n\n form.setValuesIn(fieldName, values[url] ?? values[href]);\n\n setMode(!values[href]);\n },\n [field.props.name, href, url]\n );\n\n useEffect(() => {\n form.addEffects(\"onAdvancedChange\", () => {\n onFormInitialValuesChange(computedLink),\n onAdvancedChangeEffect((advancedMode: boolean, form: Form) => {\n const fieldName = field.props.name;\n if (advancedMode) {\n form.deleteValuesIn(fieldName);\n }\n });\n });\n }, [form, field, onAdvancedChangeEffect, computedLink]);\n\n useEffect(() => {\n computedLink(form);\n }, []);\n\n return (\n <Input\n {...props}\n suffix={\n <div\n style={{ cursor: \"pointer\" }}\n slot=\"suffix\"\n onClick={handleModeClick}\n >\n {suffixText}\n </div>\n }\n onChange={(event) => handleChange(event.target.value)}\n />\n );\n}\n","import React from \"react\";\nimport { Radio } from \"antd\";\nimport {\n AlignLeftOutlined,\n AlignCenterOutlined,\n AlignRightOutlined,\n} from \"@ant-design/icons\";\n\nexport function TextAlignRadioComponent(props: any): React.ReactElement {\n return (\n <Radio.Group {...props} size=\"small\">\n <Radio.Button value=\"left\">\n <AlignLeftOutlined />\n </Radio.Button>\n {!props.hideCenter && (\n <Radio.Button value=\"center\">\n <AlignCenterOutlined />\n </Radio.Button>\n )}\n <Radio.Button value=\"right\">\n <AlignRightOutlined />\n </Radio.Button>\n </Radio.Group>\n );\n}\n","\n import API from \"!../../../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../../../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[3].use[1]!../../../../../../node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[3].use[2]!./UseChildrenSelectComponent.module.css\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\noptions.insert = insertFn.bind(null, \"head\");\noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../../../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[3].use[1]!../../../../../../node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[3].use[2]!./UseChildrenSelectComponent.module.css\";\n export default content && content.locals ? content.locals : undefined;\n","import React from \"react\";\nimport { Select } from \"@formily/antd-v5\";\nimport { Tooltip, SelectProps } from \"antd\";\nimport { PlusCircleOutlined } from \"@ant-design/icons\";\nimport styles from \"./UseChildrenSelectComponent.module.css\";\n\ntype UseChildrenSelectComponentProps = SelectProps & {\n triggerAction: (action: string) => void;\n};\n\nexport function UseChildrenSelectComponent(\n props: UseChildrenSelectComponentProps\n) {\n const handlePlusIconClick = () => {\n props?.triggerAction?.(\"add-slot\");\n };\n\n return (\n <div className={styles.useChildrenSelectWrapper}>\n <Select {...props} />\n <Tooltip title=\"点击添加子节点\">\n <PlusCircleOutlined\n className={styles.plusIcon}\n onClick={handlePlusIconClick}\n />\n </Tooltip>\n </div>\n );\n}\n","import { DataNode } from \"../utils/formilySchemaFormatter\";\n\nexport const stylesSchema: DataNode = {\n type: \"void\",\n name: \"style\",\n children: [\n {\n name: \"width\",\n title: \"宽度\",\n type: \"string\",\n decorator: {\n name: \"FormItemWithoutAdvanced\",\n props: {\n layout: \"vertail\",\n },\n },\n component: {\n name: \"InputWithUnit\",\n props: {\n suffix: \"px\",\n },\n },\n },\n {\n name: \"height\",\n title: \"高度\",\n type: \"string\",\n decorator: {\n name: \"FormItemWithoutAdvanced\",\n props: {\n layout: \"vertail\",\n },\n },\n component: {\n name: \"InputWithUnit\",\n props: {\n suffix: \"px\",\n },\n },\n },\n {\n type: \"string\",\n name: \"textAlign\",\n title: \"对齐\",\n decorator: {\n name: \"FormItemWithoutAdvanced\",\n props: {\n layout: \"vertail\",\n },\n },\n component: \"TextAlignRadio\",\n },\n {\n type: \"string\",\n name: \"background\",\n title: \"背景\",\n decorator: {\n name: \"FormItemWithoutAdvanced\",\n props: {\n layout: \"vertail\",\n },\n },\n component: \"ColorPicker\",\n },\n {\n type: \"string\",\n name: \"margin\",\n title: \"外边距(px)\",\n decorator: {\n name: \"FormItemWithoutAdvanced\",\n },\n component: \"BoxSize\",\n },\n {\n type: \"string\",\n name: \"padding\",\n title: \"内边距(px)\",\n decorator: {\n name: \"FormItemWithoutAdvanced\",\n },\n component: {\n name: \"BoxSize\",\n props: {\n mode: \"in\",\n },\n },\n },\n ],\n};\n","import type { ISchema } from \"@formily/react\";\nimport { omit } from \"lodash\";\nimport { stylesSchema } from \"../schema/styles.schema\";\n\nexport const NORMAL_FORM_KEY = \"#normal_form\";\nexport const ADVANCED_FORM_KEY = \"#advanced_form\";\n\ntype ComponentType =\n | string\n | {\n name: string;\n props?: Record<string, any>;\n };\n\nexport interface DataNode {\n type: \"void\" | \"string\" | \"object\" | \"boolean\" | \"array\";\n name: string;\n title?: string;\n props?: Record<string, any>;\n decorator?: ComponentType;\n component?: ComponentType;\n children?: DataNode[];\n [k: string]: any;\n}\n\nfunction transformComponent(\n data: ComponentType,\n key: \"decorator\" | \"component\"\n): Record<string, any> {\n if (!data) return {};\n if (typeof data === \"string\") {\n return {\n [`x-${key}`]: data,\n };\n }\n return {\n [`x-${key}`]: data.name,\n [`x-${key}-props`]: {\n ...(data.name === \"CodeEditor\"\n ? {\n extraLibs: \"{{extraLibs}}\",\n links: \"{{links}}\",\n tokenClick: \"{{tokenClick}}\",\n lineNumbers: \"off\",\n glyphMargin: false,\n }\n : {}),\n ...(data.props ?? {}),\n },\n };\n}\n\ntype formilySchemaFormatterOptions = {\n isDefault: boolean;\n};\n\nexport function formilySchemaFormatter(\n data: DataNode,\n options?: formilySchemaFormatterOptions | boolean\n): ISchema {\n const { isDefault = true } = typeof options === \"object\" ? options : {};\n\n const walk = (data: DataNode): Record<string, any> => {\n let children: Record<string, any>[] | undefined;\n let result: Record<string, any> = {};\n if (data.children) {\n children = data.children.map(walk);\n }\n const { name, type, component, decorator } = data;\n\n const defaultDecorator: Record<string, any> =\n type === \"string\"\n ? {\n name: \"FormItem\",\n }\n : type === \"boolean\"\n ? {\n name: \"FormItem\",\n props: {\n layout: \"horizontal\",\n },\n }\n : {};\n\n const defaultComponent: Record<string, any> =\n type === \"string\"\n ? {\n name: \"Input\",\n }\n : type === \"boolean\"\n ? {\n name: \"Switch\",\n props: {\n size: \"small\",\n },\n }\n : {};\n\n const childNode: Record<string, any> = {\n type: type ?? \"void\",\n ...omit(data, [\"children\", \"component\", \"decorator\"]),\n ...transformComponent(\n {\n ...defaultDecorator,\n ...(typeof decorator === \"string\" ? { name: decorator } : decorator),\n },\n \"decorator\"\n ),\n ...transformComponent(\n {\n ...defaultComponent,\n ...(typeof component === \"string\" ? { name: component } : component),\n },\n \"component\"\n ),\n };\n\n if (typeof name === \"string\") {\n result[name] = childNode;\n } else {\n result = childNode;\n }\n\n if (children) {\n childNode.properties = {};\n for (const item of children) {\n if (typeof item.name === \"string\") {\n childNode.properties[item.name] = item;\n } else {\n childNode.properties = {\n ...childNode.properties,\n ...item,\n };\n }\n }\n }\n return result;\n };\n\n const defaultFields = [\n {\n name: \"id\",\n title: \"id\",\n type: \"string\",\n decorator: {\n name: \"FormItem\",\n props: {\n layout: \"horizontal\",\n },\n },\n },\n {\n name: \"hidden\",\n title: \"隐藏\",\n type: \"boolean\",\n },\n ] as DataNode[];\n\n if (!isDefault) {\n return walk(data);\n }\n\n return {\n type: \"object\",\n properties: {\n [NORMAL_FORM_KEY]: {\n type: \"void\",\n \"x-component\": \"CustomTab\",\n \"x-component-props\": {\n activeTab: \"property\",\n },\n properties: {\n property: {\n type: \"void\",\n \"x-component\": \"CustomTab.TabPanel\",\n \"x-component-props\": {\n title: \"属性\",\n tab: \"property\",\n },\n properties: walk({\n ...data,\n children: [...defaultFields, ...data.children],\n }),\n },\n style: {\n type: \"object\",\n name: \"style\",\n \"x-component\": \"CustomTab.TabPanel\",\n \"x-component-props\": {\n title: \"样式\",\n tab: \"style\",\n },\n properties: walk(stylesSchema),\n },\n },\n },\n [ADVANCED_FORM_KEY]: {\n name: ADVANCED_FORM_KEY,\n type: \"string\",\n \"x-decorator\": \"FormItemWithoutAdvanced\",\n \"x-component\": \"CodeEditor\",\n \"x-component-props\": {\n extraLibs: \"{{extraLibs}}\",\n links: \"{{links}}\",\n tokenClick: \"{{tokenClick}}\",\n minLines: 5,\n glyphMargin: false,\n },\n },\n },\n };\n}\n","// Imports\nimport ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ from \"../../../../../../node_modules/css-loader/dist/runtime/noSourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.advanced-form-item{position:relative}.advanced-form-item .advanced-mode-check-wrapper{position:absolute;top:6px;right:6px;line-height:0;z-index:1}.advanced-form-item .advanced-mode-check-wrapper eo-icon[icon=\"code\"]{cursor:pointer;padding:2px 4px;background:var(--palette-gray-7);border-radius:6px}.advanced-form-item .advanced-mode-check-wrapper eo-icon.isActive[icon=\"code\"]{background:var(--color-brand);color:#fff}`, \"\"]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ from \"../../../../../../node_modules/css-loader/dist/runtime/noSourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.custom-category-title{font-size:14px;font-weight:600;line-height:14px;margin-bottom:12px;border-left:2px solid;padding-left:6px;border-color:#8d8d8d;margin-top:18px}.custom-category-title:first-child{margin-top:0}`, \"\"]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/noSourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/api.js\";\nimport ___CSS_LOADER_AT_RULE_IMPORT_0___ from \"-!../../../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[0].use[1]!../../../../node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[0].use[2]!./components/AdvancedFormItem/AdvancedFormItem.shadow.css\";\nimport ___CSS_LOADER_AT_RULE_IMPORT_1___ from \"-!../../../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[0].use[1]!../../../../node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[0].use[2]!./components/CategoryTitle/CategoryTitle.shadow.css\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n___CSS_LOADER_EXPORT___.i(___CSS_LOADER_AT_RULE_IMPORT_0___);\n___CSS_LOADER_EXPORT___.i(___CSS_LOADER_AT_RULE_IMPORT_1___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.property-form-wrapper .antdV5-formily-item-feedback-layout-loose{margin-bottom:10px}.property-form-wrapper .antdV5-formily-item .antdV5-formily-item-control{align-self:center}`, \"\"]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ from \"../../../../../../node_modules/css-loader/dist/runtime/noSourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.boxSizeComponent--a96YEG0R{display:flex;gap:8px}.boxSizeComponent--a96YEG0R .leftWrapper--YJoTo4he{width:80px}.boxSizeComponent--a96YEG0R .leftWrapper--YJoTo4he .outBox--bSstM0ZF{border:1px solid var(--palette-gray-6);height:80px;padding:10px;border-radius:6px;position:relative}.boxSizeComponent--a96YEG0R .leftWrapper--YJoTo4he .outBox--bSstM0ZF .inBox--VAdQyQ8u{border:1px dashed var(--palette-gray-5);height:100%;border-radius:6px;display:flex;align-items:center;justify-content:center}.boxSizeComponent--a96YEG0R .leftWrapper--YJoTo4he .outBox--bSstM0ZF .inBox--VAdQyQ8u .connect-btn--iG4M5iHm{cursor:pointer}.boxSizeComponent--a96YEG0R .leftWrapper--YJoTo4he .outBox--bSstM0ZF .line--MEU6xbQI{position:absolute;background-color:var(--palette-gray-6)}.boxSizeComponent--a96YEG0R .leftWrapper--YJoTo4he .outBox--bSstM0ZF .line--MEU6xbQI.active--kwDvPu6c{background-color:var(--color-brand)}.boxSizeComponent--a96YEG0R .leftWrapper--YJoTo4he .outBox--bSstM0ZF .vertical--PTCuTBBU{left:50%;width:2px;height:10px}.boxSizeComponent--a96YEG0R .leftWrapper--YJoTo4he .outBox--bSstM0ZF .horizontal--C56jlFEU{top:50%;width:10px;height:2px}.boxSizeComponent--a96YEG0R .leftWrapper--YJoTo4he .outBox--bSstM0ZF .top--IAYy5_q3{top:0}.boxSizeComponent--a96YEG0R .leftWrapper--YJoTo4he .outBox--bSstM0ZF .right--lywbhIOD{right:0}.boxSizeComponent--a96YEG0R .leftWrapper--YJoTo4he .outBox--bSstM0ZF .bottom--bcHIN61S{bottom:0}.boxSizeComponent--a96YEG0R .leftWrapper--YJoTo4he .outBox--bSstM0ZF .left--ZqcFMgN_{left:0}.boxSizeComponent--a96YEG0R .rightWrapper--VEyni1eJ{flex:1;display:flex;flex-direction:column;gap:12px}.boxSizeComponent--a96YEG0R .rightWrapper--VEyni1eJ .inputWrapper--dlSjkwzs{display:flex;gap:12px}.boxSizeComponent--a96YEG0R .rightWrapper--VEyni1eJ .inputWrapper--dlSjkwzs .antdV5-input{text-align:right}`, \"\"]);\n// Exports\n___CSS_LOADER_EXPORT___.locals = {\n\t\"boxSizeComponent\": `boxSizeComponent--a96YEG0R`,\n\t\"leftWrapper\": `leftWrapper--YJoTo4he`,\n\t\"outBox\": `outBox--bSstM0ZF`,\n\t\"inBox\": `inBox--VAdQyQ8u`,\n\t\"connect-btn\": `connect-btn--iG4M5iHm`,\n\t\"line\": `line--MEU6xbQI`,\n\t\"active\": `active--kwDvPu6c`,\n\t\"vertical\": `vertical--PTCuTBBU`,\n\t\"horizontal\": `horizontal--C56jlFEU`,\n\t\"top\": `top--IAYy5_q3`,\n\t\"right\": `right--lywbhIOD`,\n\t\"bottom\": `bottom--bcHIN61S`,\n\t\"left\": `left--ZqcFMgN_`,\n\t\"rightWrapper\": `rightWrapper--VEyni1eJ`,\n\t\"inputWrapper\": `inputWrapper--dlSjkwzs`\n};\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ from \"../../../../../../node_modules/css-loader/dist/runtime/noSourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.customTabWrapper--rhCkGBJ2 .customTabList--yAojeBWG{position:relative;display:flex;align-items:stretch;justify-items:flex-start;margin-bottom:8px}.customTabWrapper--rhCkGBJ2 .customTabList--yAojeBWG .customTabItem--Zjxji9O5{position:relative;text-align:center;cursor:pointer;transition:all 0.2s cubic-bezier(0.645,0.045,0.355,1);border-radius:4px;transform:translateZ(0)}.customTabWrapper--rhCkGBJ2 .customTabList--yAojeBWG .customTabItem--Zjxji9O5.active--ULNnDJEv{background-color:var(--palette-gray-6);box-shadow:0 1px 2px 0 rgba(0,0,0,0.03),0 1px 6px -1px rgba(0,0,0,0.02),0 2px 4px 0 rgba(0,0,0,0.02);color:#fff}.customTabWrapper--rhCkGBJ2 .customTabList--yAojeBWG .customTabItem--Zjxji9O5 .customTabItemLabel--scejdE0w{padding:2px 12px}`, \"\"]);\n// Exports\n___CSS_LOADER_EXPORT___.locals = {\n\t\"customTabWrapper\": `customTabWrapper--rhCkGBJ2`,\n\t\"customTabList\": `customTabList--yAojeBWG`,\n\t\"customTabItem\": `customTabItem--Zjxji9O5`,\n\t\"active\": `active--ULNnDJEv`,\n\t\"customTabItemLabel\": `customTabItemLabel--scejdE0w`\n};\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ from \"../../../../../../node_modules/css-loader/dist/runtime/noSourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.actionOptionsWrapper--HuwosiuP .optionList--lJm6W8Kr .emptyItem--gMv4r0f7,\n .actionOptionsWrapper--HuwosiuP .optionList--lJm6W8Kr .optionItem--xEPQt9Mw{border:1px solid var(--palette-gray-6);display:flex;justify-content:center;align-items:center;font-size:14px;border-top:none}.actionOptionsWrapper--HuwosiuP .optionList--lJm6W8Kr .emptyItem--gMv4r0f7:first-child, .actionOptionsWrapper--HuwosiuP .optionList--lJm6W8Kr .optionItem--xEPQt9Mw:first-child{border-top:1px solid var(--palette-gray-6)}.actionOptionsWrapper--HuwosiuP .optionList--lJm6W8Kr .emptyItem--gMv4r0f7:last-child, .actionOptionsWrapper--HuwosiuP .optionList--lJm6W8Kr .optionItem--xEPQt9Mw:last-child{border-bottom:none}.actionOptionsWrapper--HuwosiuP .optionList--lJm6W8Kr .optionItem--xEPQt9Mw{cursor:pointer}.actionOptionsWrapper--HuwosiuP .optionList--lJm6W8Kr .optionItem--xEPQt9Mw:hover{background-color:var(--palette-gray-5)}.actionOptionsWrapper--HuwosiuP .addIcon--ptNA7JRE{width:100%;border:1px solid var(--palette-gray-6);display:flex;justify-content:center;align-items:center;padding:4px;font-size:22px}.modalFooter--eRxlWgTL{display:flex;justify-content:space-between}`, \"\"]);\n// Exports\n___CSS_LOADER_EXPORT___.locals = {\n\t\"actionOptionsWrapper\": `actionOptionsWrapper--HuwosiuP`,\n\t\"optionList\": `optionList--lJm6W8Kr`,\n\t\"emptyItem\": `emptyItem--gMv4r0f7`,\n\t\"optionItem\": `optionItem--xEPQt9Mw`,\n\t\"addIcon\": `addIcon--ptNA7JRE`,\n\t\"modalFooter\": `modalFooter--eRxlWgTL`\n};\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ from \"../../../../../../node_modules/css-loader/dist/runtime/noSourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.useChildrenSelectWrapper--IczULak5{display:flex;gap:12px}.useChildrenSelectWrapper--IczULak5 .plusIcon--CyQgp1bl{cursor:pointer;font-size:22px;color:var(--color-brand)}`, \"\"]);\n// Exports\n___CSS_LOADER_EXPORT___.locals = {\n\t\"useChildrenSelectWrapper\": `useChildrenSelectWrapper--IczULak5`,\n\t\"plusIcon\": `plusIcon--CyQgp1bl`\n};\nexport default ___CSS_LOADER_EXPORT___;\n","\n import API from \"!../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[0].use[1]!../../../../node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[0].use[2]!./style.css\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\noptions.insert = insertFn.bind(null, \"head\");\noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[0].use[1]!../../../../node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[0].use[2]!./style.css\";\n export default content && content.locals ? content.locals : undefined;\n"],"names":["WrappedIcon","wrapBrick","WrappedToolTip","AdvancedFormItem","props","form","useForm","field","useField","scope","useExpressionScope","mode","setMode","useState","value","isEvaluable","isAdvanced","useMemo","fieldOriginComponent","component","handleModeCheck","useCallback","updateMode","isAdvancedMode","setComponent","lineNumbers","glyphMargin","getValuesIn","name","isObject","setInitialValues","yaml","newValue","useFormEffects","onFieldInitialValueChange","_ref","React","className","FormItem","_extends","layout","children","content","classNames","isActive","lib","icon","onClick","CategoryTitle","text","options","styleTagTransform","setAttributes","insert","domAPI","insertStyleElement","locals","undefined","DirectionEnum","BoxSizeComponent","onChange","tranformValue","setTransformValue","connect","setConnect","direction","setDirection","isInMode","handleFocus","handleBlur","handleChange","inputValue","match","realValue","Number","changeValue","map","item","index","join","handleConnectClick","isConnect","transfrom","length","top","right","bottom","left","useEffect","styles","boxSizeComponent","leftWrapper","outBox","inBox","style","position","line","vertical","active","horizontal","LinkOutlined","color","DisconnectOutlined","rightWrapper","inputWrapper","Input","prefix","placeholder","onFocus","onBlur","event","target","WrappedCodeEditor","tokenClick","CodeEditorComponent","initValue","setInitValue","setValue","_props$onChange","detail","call","isEmpty","Array","isArray","skipInvalid","minLines","automaticLayout","language","theme","presets","Object","entries","amber","yellow","orange","pink","red","blue","indigo","purple","cyan","teal","green","label","colors","generate","compressPresets","flat","trasnformColorToCssVariables","matchColor","forEach","preset","key","findIndex","toHsbString","transformCssVariablesToColor","ColorPickerComponent","transformPresets","ColorPicker","getPopupContainer","document","body","showText","_","hex","CUSTOM_WRAPPER","OPTION_ID","CustomOptionsComponent","schema","displayLabel","editItem","setEditItem","isModalOpen","setIsModalOpen","setOptions","formatSchema","formilySchemaFormatter","type","isDefault","createForm","handleOk","newOptions","values","concat","omit","handleCancel","handleDelete","filter","Math","random","actionOptionsWrapper","Modal","title","open","onOk","onCancel","footer","modalFooter","Button","danger","FormProvider","SchemaField","optionList","optionItem","handleEditItem","data","setValues","emptyItem","PlusCircleOutlined","addIcon","handleAddAction","reset","CustomTabContext","createContext","useTabs","tabsField","useFieldSchema","tabs","mapProperties","_schema$xComponent","query","address","take","display","indexOf","_field$componentProps","_schema$xComponentP","componentProps","push","CustomTab","_tabs$","activeTab","setActiveTab","Provider","customTabWrapper","customTabList","_item$props","_item$props2","customTabItem","customTabItemLabel","TabPanel","useContext","tab","customTabPanel","WrappedIconSelect","IconSelectComponent","InputWithUnitComponent","transformValue","setTransfromValue","suffix","replace","e","InputWithUrlComponent","url","href","transform","onAdvancedChangeEffect","createEffectHook","ADVANCED_CHANGE_KEY","advancedMode","listener","handleModeClick","realMode","deleteValuesIn","suffixText","computedLink","getState","fieldName","setValuesIn","addEffects","onFormInitialValuesChange","cursor","slot","TextAlignRadioComponent","Radio","size","AlignLeftOutlined","hideCenter","AlignCenterOutlined","AlignRightOutlined","UseChildrenSelectComponent","useChildrenSelectWrapper","Select","Tooltip","plusIcon","handlePlusIconClick","_props$triggerAction","triggerAction","stylesSchema","decorator","NORMAL_FORM_KEY","ADVANCED_FORM_KEY","transformComponent","extraLibs","links","walk","result","defaultDecorator","defaultComponent","childNode","properties","property","___CSS_LOADER_EXPORT___","module","id","i"],"sourceRoot":""}