@xto/data 1.4.4 → 1.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),K=require("@xto/core"),Q={"arrow-up":"M12 19V5m0 0l-7 7m7-7l7 7","arrow-down":"M12 5v14m0 0l7-7m-7 7l-7-7","arrow-left":"M19 12H5m0 0l7 7m-7-7l7-7","arrow-right":"M5 12h14m0 0l-7-7m7 7l-7 7","arrow-up-bold":"M12 5l-7 7h4v7h6v-7h4l-7-7z","arrow-down-bold":"M12 19l7-7h-4V5H9v7H5l7 7z","arrow-left-bold":"M5 12l7-7v4h7v6h-7v4l-7-7z","arrow-right-bold":"M19 12l-7 7v-4H5v-6h7V5l7 7z","caret-down":"M6 9l6 6 6-6","caret-right":"M9 18l6-6-6-6",plus:"M12 5v14m-7-7h14",minus:"M5 12h14",close:"M6 18L18 6M6 6l12 12",check:"M5 13l4 4L19 7","check-bold":"M4 12l5 5L20 6",edit:"M11 4H4a2 2 0 00-2 2v14a2 2 0 002 2h14a2 2 0 002-2v-7M18.5 2.5a2.121 2.121 0 013 3L12 15l-4 1 1-4 9.5-9.5z",delete:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16",copy:"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z",download:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4",upload:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12",refresh:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15",search:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z",filter:"M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z",more:"M12 5v.01M12 12v.01M12 19v.01M12 6a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2z","more-h":"M5 12h.01M12 12h.01M19 12h.01M6 12a1 1 0 11-2 0 1 1 0 012 0zm7 0a1 1 0 11-2 0 1 1 0 012 0zm7 0a1 1 0 11-2 0 1 1 0 012 0z",setting:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z M15 12a3 3 0 11-6 0 3 3 0 016 0z",share:"M8.684 13.342C8.886 12.938 9 12.482 9 12c0-.482-.114-.938-.316-1.342m0 2.684a3 3 0 110-2.684m0 2.684l6.632 3.316m-6.632-6l6.632-3.316m0 0a3 3 0 105.367-2.684 3 3 0 00-5.367 2.684zm0 9.316a3 3 0 105.368 2.684 3 3 0 00-5.368-2.684z",loading:"M12 2v4m0 12v4M4.93 4.93l2.83 2.83m8.48 8.48l2.83 2.83M2 12h4m12 0h4M4.93 19.07l2.83-2.83m8.48-8.48l2.83-2.83",info:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z",success:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z",warning:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z",error:"M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z",question:"M8.228 9c.549-1.165 2.03-2 3.772-2 2.21 0 4 1.343 4 3 0 1.4-1.278 2.575-3.006 2.907-.542.104-.994.54-.994 1.093m0 3h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z",user:"M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z","user-add":"M18 9v3m0 0v3m0-3h3m-3 0h-3m-2-5a4 4 0 11-8 0 4 4 0 018 0zM3 20a6 6 0 0112 0v1H3v-1z","user-group":"M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z",logout:"M17 16l4-4m0 0l-4-4m4 4H7m6 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h4a3 3 0 013 3v1",login:"M11 16l-4-4m0 0l4-4m-4 4h14m-5 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h7a3 3 0 013 3v1",file:"M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z",folder:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z","folder-open":"M5 19a2 2 0 01-2-2V7a2 2 0 012-2h4l2 2h4a2 2 0 012 2v1M5 19h14a2 2 0 002-2v-5a2 2 0 00-2-2H9a2 2 0 00-2 2v5a2 2 0 01-2 2z",document:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z",image:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z",video:"M15 10l4.553-2.276A1 1 0 0121 8.618v6.764a1 1 0 01-1.447.894L15 14M5 18h8a2 2 0 002-2V8a2 2 0 00-2-2H5a2 2 0 00-2 2v8a2 2 0 002 2z",music:"M9 19V6l12-3v13M9 19c0 1.105-1.343 2-3 2s-3-.895-3-2 1.343-2 3-2 3 .895 3 2zm12-3c0 1.105-1.343 2-3 2s-3-.895-3-2 1.343-2 3-2 3 .895 3 2zM9 10l12-3",camera:"M3 9a2 2 0 012-2h.93a2 2 0 001.664-.89l.812-1.22A2 2 0 0110.07 4h3.86a2 2 0 011.664.89l.812 1.22A2 2 0 0018.07 7H19a2 2 0 012 2v9a2 2 0 01-2 2H5a2 2 0 01-2-2V9z M15 13a3 3 0 11-6 0 3 3 0 016 0z",mail:"M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z",phone:"M3 5a2 2 0 012-2h3.28a1 1 0 01.948.684l1.498 4.493a1 1 0 01-.502 1.21l-2.257 1.13a11.042 11.042 0 005.516 5.516l1.13-2.257a1 1 0 011.21-.502l4.493 1.498a1 1 0 01.684.949V19a2 2 0 01-2 2h-1C9.716 21 3 14.284 3 6V5z",chat:"M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z",bell:"M15 17h5l-1.405-1.405A2.032 2.032 0 0118 14.158V11a6.002 6.002 0 00-4-5.659V5a2 2 0 10-4 0v.341C7.67 6.165 6 8.388 6 11v3.159c0 .538-.214 1.055-.595 1.436L4 17h5m6 0v1a3 3 0 11-6 0v-1m6 0H9",message:"M8 10h.01M12 10h.01M16 10h.01M9 16H5a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v8a2 2 0 01-2 2h-5l-5 5v-5z",eye:"M15 12a3 3 0 11-6 0 3 3 0 016 0z M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z","eye-off":"M13.875 18.825A10.05 10.05 0 0112 19c-4.478 0-8.268-2.943-9.543-7a9.97 9.97 0 011.563-3.029m5.858.908a3 3 0 114.243 4.243M9.878 9.878l4.242 4.242M9.88 9.88l-3.29-3.29m7.532 7.532l3.29 3.29M3 3l3.59 3.59m0 0A9.953 9.953 0 0112 5c4.478 0 8.268 2.943 9.543 7a10.025 10.025 0 01-4.132 5.411m0 0L21 21",calendar:"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z",clock:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z",history:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z",timer:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z",location:"M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z M15 11a3 3 0 11-6 0 3 3 0 016 0z",map:"M9 20l-5.447-2.724A1 1 0 013 16.382V5.618a1 1 0 011.447-.894L9 7m0 13l6-3m-6 3V7m6 10l4.553 2.276A1 1 0 0021 18.382V7.618a1 1 0 00-.553-.894L15 4m0 13V4m0 0L9 7",globe:"M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9",star:"M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z",heart:"M4.318 6.318a4.5 4.5 0 000 6.364L12 20.364l7.682-7.682a4.5 4.5 0 00-6.364-6.364L12 7.636l-1.318-1.318a4.5 4.5 0 00-6.364 0z","thumb-up":"M14 10h4.764a2 2 0 011.789 2.894l-3.5 7A2 2 0 0115.263 21h-4.017c-.163 0-.326-.02-.485-.06L7 20m7-10V5a2 2 0 00-2-2h-.095c-.5 0-.905.405-.905.905 0 .714-.211 1.412-.608 2.006L7 11v9m7-10h-2M7 20H5a2 2 0 01-2-2v-6a2 2 0 012-2h2.5",link:"M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1","external-link":"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14",lock:"M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z",unlock:"M8 11V7a4 4 0 118 0m-4 8v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2z",key:"M15 7a2 2 0 012 2m4 0a6 6 0 01-7.743 5.743L11 17H9v2H7v2H4a1 1 0 01-1-1v-2.586a1 1 0 01.293-.707l5.964-5.964A6 6 0 1121 9z",home:"M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6",menu:"M4 6h16M4 12h16M4 18h16","menu-fold":"M4 6h16M4 12h10M4 18h16","menu-unfold":"M4 6h16M10 12h10M4 18h16","menu-collapse":"M4 6h16M4 12h10M4 18h16","menu-expand":"M4 6h16M10 12h10M4 18h16","sidebar-fold":"M11 19l-7-7 7-7m8 14l-7-7 7-7","sidebar-expand":"M13 5l7 7-7 7M5 5l7 7-7 7","sidebar-left":"M11 19l-7-7 7-7m8 14l-7-7 7-7",dashboard:"M4 5a1 1 0 011-1h4a1 1 0 011 1v5a1 1 0 01-1 1H5a1 1 0 01-1-1V5zM14 5a1 1 0 011-1h4a1 1 0 011 1v2a1 1 0 01-1 1h-4a1 1 0 01-1-1V5zM4 15a1 1 0 011-1h4a1 1 0 011 1v4a1 1 0 01-1 1H5a1 1 0 01-1-1v-4zM14 12a1 1 0 011-1h4a1 1 0 011 1v7a1 1 0 01-1 1h-4a1 1 0 01-1-1v-7z",chart:"M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z","chart-pie":"M11 3.055A9.001 9.001 0 1020.945 13H11V3.055z M20.488 9H15V3.512A9.025 9.025 0 0120.488 9z","chart-line":"M7 12l3-3 3 3 4-4M8 21l4-4 4 4M3 4h18M4 4v16",report:"M9 17v-2m3 2v-4m3 4v-6m2 10H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z",analytics:"M16 8v8m-4-5v5m-4-2v2m-2 4h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z",system:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z M12 15a3 3 0 100-6 3 3 0 000 6z",permission:"M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z",role:"M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z","user-manage":"M12 4.354a4 4 0 110 5.292M15 21H3v-1a6 6 0 0112 0v1zm0 0h6v-1a6 6 0 00-9-5.197M13 7a4 4 0 11-8 0 4 4 0 018 0z",log:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z",notification:"M15 17h5l-1.405-1.405A2.032 2.032 0 0118 14.158V11a6.002 6.002 0 00-4-5.659V5a2 2 0 10-4 0v.341C7.67 6.165 6 8.388 6 11v3.159c0 .538-.214 1.055-.595 1.436L4 17h5m6 0v1a3 3 0 11-6 0v-1m6 0H9",app:"M4 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2V6zM14 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2V6zM4 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2v-2zM14 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2v-2z",list:"M4 6h16M4 10h16M4 14h16M4 18h16",grid:"M4 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2V6zM14 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2V6zM4 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2v-2zM14 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2v-2z",fullscreen:"M4 8V4m0 0h4M4 4l5 5m11-1V4m0 0h-4m4 0l-5 5M4 16v4m0 0h4m-4 0l5-5m11 5l-5-5m5 5v-4m0 4h-4","fullscreen-exit":"M9 4V9H4m11-5v5h5M4 15h5v5m11-5h-5v5","zoom-in":"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0zM10 7v6m3-3H7","zoom-out":"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0zM13 10H7",print:"M17 17h2a2 2 0 002-2v-4a2 2 0 00-2-2H5a2 2 0 00-2 2v4a2 2 0 002 2h2m2 4h6a2 2 0 002-2v-4a2 2 0 00-2-2H9a2 2 0 00-2 2v4a2 2 0 002 2zm8-12V5a2 2 0 00-2-2H9a2 2 0 00-2 2v4h10z",bookmark:"M5 5a2 2 0 012-2h10a2 2 0 012 2v16l-7-3.5L5 21V5z",tag:"M7 7h.01M7 3h5c.512 0 1.024.195 1.414.586l7 7a2 2 0 010 2.828l-7 7a2 2 0 01-2.828 0l-7-7A1.994 1.994 0 013 12V7a4 4 0 014-4z",code:"M10 20l4-16m4 4l4 4-4 4M6 16l-4-4 4-4",terminal:"M8 9l3 3-3 3m5 0h3M5 20h14a2 2 0 002-2V6a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z",database:"M4 7v10c0 2.21 3.582 4 8 4s8-1.79 8-4V7M4 7c0 2.21 3.582 4 8 4s8-1.79 8-4M4 7c0-2.21 3.582-4 8-4s8 1.79 8 4m0 5c0 2.21-3.582 4-8 4s-8-1.79-8-4",server:"M5 12h14M5 12a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v4a2 2 0 01-2 2M5 12a2 2 0 00-2 2v4a2 2 0 002 2h14a2 2 0 002-2v-4a2 2 0 00-2-2m-2-4h.01M17 16h.01",cloud:"M3 15a4 4 0 004 4h9a5 5 0 10-.1-9.999 5.002 5.002 0 10-9.78 2.096A4.001 4.001 0 003 15z",gift:"M12 8v13m0-13V6a2 2 0 112 2h-2zm0 0V5.5A2.5 2.5 0 109.5 8H12zm-7 4h14M5 12a2 2 0 110-4h14a2 2 0 110 4M5 12v7a2 2 0 002 2h10a2 2 0 002-2v-7",moon:"M20.354 15.354A9 9 0 018.646 3.646 9.003 9.003 0 0012 21a9.003 9.003 0 008.354-5.646z",sun:"M12 3v1m0 16v1m9-9h-1M4 12H3m15.364 6.364l-.707-.707M6.343 6.343l-.707-.707m12.728 0l-.707.707M6.343 17.657l-.707.707M16 12a4 4 0 11-8 0 4 4 0 018 0z",theme:"M7 21a4 4 0 01-4-4V5a2 2 0 012-2h4a2 2 0 012 2v12a4 4 0 01-4 4zm0 0h12a2 2 0 002-2v-4a2 2 0 00-2-2h-2.343M11 7.343l1.657-1.657a2 2 0 012.828 0l2.829 2.829a2 2 0 010 2.828l-8.486 8.485M7 17h.01",skin:"M7 4h2v1c0 1.66 1.34 3 3 3s3-1.34 3-3V4h2l3 3v6h-4l1 3v5H7v-5l1-3H4V7l3-3z",heading:"M4 6h16M4 12h8m-8 6h16",bold:"M6 4h8a4 4 0 014 4 4 4 0 01-4 4H6z M6 12h9a4 4 0 014 4 4 4 0 01-4 4H6z",italic:"M10 4h4m-2 0v16m-4 0h8",strikethrough:"M16 4H8a4 4 0 00-4 4v4h16V8a4 4 0 00-4-4zM4 12h16m-4 4H8a4 4 0 00-4 4v0a4 4 0 004 4h8a4 4 0 004-4v0a4 4 0 00-4-4z","list-bullet":"M4 6h.01M4 12h.01M4 18h.01M8 6h12M8 12h12M8 18h12","list-number":"M4 6h2M4 12h2M4 18h2M8 6h12M8 12h12M8 18h12","link-text":"M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1","image-insert":"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z","code-inline":"M10 20l4-16m4 4l4 4-4 4M6 16l-4-4 4-4","divider-h":"M4 12h16",quote:"M8 10h.01M12 10h.01M16 10h.01M9 16H5a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v8a2 2 0 01-2 2h-5l-5 5v-5z","code-block":"M4 4h16v16H4z M8 8h8M8 12h8M8 16h4","sort-up":"M12 5v14m-7-7l7-7 7 7","sort-down":"M12 19V5m7 7l-7 7-7-7","chevron-down":"M6 9l6 6 6-6","chevron-right":"M9 18l6-6-6-6","chevron-up":"M18 15l-6-6-6 6","chevron-left":"M15 18l-6-6 6-6","move-up":"M5 15l7-7 7 7","move-down":"M19 9l-7 7-7-7","back-top":"M12 19V5m-7 7l7-7 7 7","dropdown-arrow":"M6 9l6 6 6-6","close-circle":"M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z","close-bold":"M6 18L18 6M6 6l12 12","check-circle":"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z","info-circle":"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z","warning-circle":"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z","back-arrow":"M19 12H5m0 0l7 7m-7-7l7-7","d-arrow-left":"M11 17l-5-5 5-5M18 17l-5-5 5-5","d-arrow-right":"M6 7l5 5-5 5M13 7l5 5-5 5",left:"M15 19l-7-7 7-7",right:"M9 5l7 7-7 7",down:"M19 9l-7 7-7-7",up:"M5 15l7-7 7 7"};function Z(o){return o in Q}const J=["aria-hidden","aria-label"],q=["stroke-width"],_=["d"],A=e.defineComponent({name:"XIcon",__name:"index",props:{name:{},size:{default:24},color:{},spin:{type:Boolean,default:!1},strokeWidth:{default:2}},setup(o,{expose:r}){const a=o,t=K.useNamespace("icon"),i=e.computed(()=>typeof a.size=="number"?`${a.size}px`:a.size),n=e.computed(()=>({width:i.value,height:i.value,color:a.color})),l=e.computed(()=>({strokeWidth:a.strokeWidth})),m=e.computed(()=>[t.b(),t.is("spin",a.spin)]),f=e.computed(()=>a.name&&Z(a.name)?Q[a.name]:"");return r({iconSize:i,iconStyle:n,iconPath:f}),(y,M)=>(e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(m.value),style:e.normalizeStyle(n.value),"aria-hidden":!o.name,"aria-label":o.name,role:"img"},[f.value?(e.openBlock(),e.createElementBlock("svg",{key:0,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":o.strokeWidth,"stroke-linecap":"round","stroke-linejoin":"round",style:e.normalizeStyle(l.value),"aria-hidden":"true"},[e.createElementVNode("path",{d:f.value},null,8,_)],12,q)):e.renderSlot(y.$slots,"default",{key:1},()=>[e.createTextVNode(e.toDisplayString(o.name),1)])],14,J))}}),ee=e.defineComponent({name:"XTag",__name:"index",props:{type:{default:""},size:{default:"default"},effect:{default:"light"},closable:{type:Boolean,default:!1},hit:{type:Boolean,default:!1},color:{}},emits:["close"],setup(o,{emit:r}){const a=o,t=r,i=K.useNamespace("tag"),n=e.computed(()=>[i.b(),i.m(a.type||"primary"),a.size!=="default"?i.m(a.size):"",i.m(a.effect),i.is("hit",a.hit)]),l=e.computed(()=>a.color?{backgroundColor:a.effect==="dark"?a.color:"",borderColor:a.color,color:a.effect==="dark"?"#fff":a.color}:{}),m=f=>{t("close",f)};return(f,y)=>(e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(n.value),style:e.normalizeStyle(l.value)},[e.renderSlot(f.$slots,"default"),o.closable?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass(e.unref(i).e("close")),onClick:m},[e.createVNode(e.unref(A),{name:"close",size:10})],2)):e.createCommentVNode("",!0)],6))}}),te=e.defineComponent({name:"XCard",__name:"index",props:{header:{},bodyStyle:{default:()=>({padding:"20px"})},shadow:{default:"always"}},setup(o){const r=o,a=K.useNamespace("card"),t=e.computed(()=>[a.b(),a.is(`shadow-${r.shadow}`)]);return(i,n)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(t.value)},[o.header||i.$slots.header?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(a).e("header"))},[e.renderSlot(i.$slots,"header",{},()=>[e.createTextVNode(e.toDisplayString(o.header),1)])],2)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(e.unref(a).e("body")),style:e.normalizeStyle(o.bodyStyle)},[e.renderSlot(i.$slots,"default")],6)],2))}}),ae=["viewBox"],le=["cx","cy","r","stroke-width"],ne=["cx","cy","r","stroke-width","stroke-dasharray","stroke"],oe=e.defineComponent({name:"XProgress",__name:"index",props:{percentage:{default:0},type:{default:"line"},status:{default:""},strokeWidth:{default:6},color:{type:[String,Array,Function],default:"#1D4ED8"},width:{default:126},showText:{type:Boolean,default:!0}},setup(o){const r=o,a=K.useNamespace("progress"),t=e.computed(()=>Math.min(100,Math.max(0,r.percentage))),i=e.computed(()=>({width:`${t.value}%`,backgroundColor:typeof r.color=="function"?r.color(t.value):r.color})),n=e.computed(()=>[a.b(),a.m(r.type),a.is("show-text",r.showText),a.is(`status-${r.status||""}`,r.status)]);return e.computed(()=>r.status==="success"?"100%":r.status==="warning"?"Warning":r.status==="exception"?"Exception":`${t.value}%`),(l,m)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(n.value)},[o.type==="line"?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(a).e("line"))},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(a).e("outer"))},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(a).e("inner"))},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(a).e("bar")),style:e.normalizeStyle(i.value)},null,6)],2)],2),o.showText?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(a).e("text"))},e.toDisplayString(t.value)+"% ",3)):e.createCommentVNode("",!0)],2)):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(e.unref(a).e("circle"))},[(e.openBlock(),e.createElementBlock("svg",{viewBox:`0 0 ${o.width} ${o.width}`,style:e.normalizeStyle({width:`${o.width}px`,height:`${o.width}px`})},[e.createElementVNode("circle",{cx:o.width/2,cy:o.width/2,r:(o.width-o.strokeWidth)/2,fill:"none","stroke-width":o.strokeWidth,stroke:"var(--xto-fill-color, #F1F5F9)"},null,8,le),e.createElementVNode("circle",{cx:o.width/2,cy:o.width/2,r:(o.width-o.strokeWidth)/2,fill:"none","stroke-width":o.strokeWidth,"stroke-dasharray":`${t.value/100*Math.PI*(o.width-o.strokeWidth)} ${Math.PI*(o.width-o.strokeWidth)}`,stroke:typeof o.color=="function"?o.color(t.value):o.color,"stroke-linecap":"round",style:{transform:"rotate(-90deg)","transform-origin":"center"}},null,8,ne)],12,ae)),o.showText?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(a).e("circle-text"))},e.toDisplayString(t.value)+"% ",3)):e.createCommentVNode("",!0)],2))],2))}}),re=["disabled"],se=["onClick"],ie=["disabled"],ce=["value"],de=["value"],G=e.defineComponent({name:"XPagination",__name:"index",props:{total:{default:0},pageSize:{default:10},currentPage:{default:1},pageSizes:{default:()=>[10,20,50,100]},layout:{default:"total, sizes, prev, pager, next, jumper"}},emits:["update:currentPage","update:pageSize","current-change","size-change"],setup(o,{emit:r}){const a=o,t=r,i=K.useNamespace("pagination"),n=e.ref(a.currentPage),l=e.ref(a.pageSize);e.watch(()=>a.currentPage,z=>{n.value=z}),e.watch(()=>a.pageSize,z=>{l.value=z});const m=e.computed(()=>n.value),f=e.computed(()=>l.value),y=e.computed(()=>Math.max(1,Math.ceil(a.total/f.value))),M=e.computed(()=>a.layout.split(",").map(z=>z.trim()).filter(Boolean)),N=z=>M.value.includes(z),B=e.computed(()=>{const z=[],p=y.value,g=m.value;if(p<=7)for(let k=1;k<=p;k++)z.push(k);else if(g<=4){for(let k=1;k<=5;k++)z.push(k);z.push(-1),z.push(p)}else if(g>=p-3){z.push(1),z.push(-1);for(let k=p-4;k<=p;k++)z.push(k)}else{z.push(1),z.push(-1);for(let k=g-1;k<=g+1;k++)z.push(k);z.push(-1),z.push(p)}return z}),V=z=>{z<1||z>y.value||z===m.value||(n.value=z,t("update:currentPage",z),t("current-change",z))},x=z=>{z!==f.value&&(l.value=z,t("update:pageSize",z),t("size-change",z),n.value=1,t("update:currentPage",1),t("current-change",1))},E=e.ref(""),I=()=>{const z=parseInt(E.value,10);isFinite(z)&&(V(Math.min(Math.max(1,z),y.value)),E.value="")};return(z,p)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(i).b())},[N("total")?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(i).e("total"))},"共 "+e.toDisplayString(o.total)+" 条",3)):e.createCommentVNode("",!0),N("prev")?(e.openBlock(),e.createElementBlock("button",{key:1,class:e.normalizeClass(e.unref(i).e("btn")),disabled:m.value<=1,onClick:p[0]||(p[0]=g=>V(m.value-1))},[...p[4]||(p[4]=[e.createElementVNode("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2",width:"12",height:"12"},[e.createElementVNode("path",{d:"M15 18l-6-6 6-6","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])],10,re)):e.createCommentVNode("",!0),N("pager")?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(B.value,g=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:g},[g===-1?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(i).e("ellipsis"))},"...",2)):(e.openBlock(),e.createElementBlock("button",{key:1,class:e.normalizeClass([e.unref(i).e("btn"),e.unref(i).is("active",g===m.value)]),onClick:k=>V(g)},e.toDisplayString(g),11,se))],64))),128)):e.createCommentVNode("",!0),N("next")?(e.openBlock(),e.createElementBlock("button",{key:3,class:e.normalizeClass(e.unref(i).e("btn")),disabled:m.value>=y.value,onClick:p[1]||(p[1]=g=>V(m.value+1))},[...p[5]||(p[5]=[e.createElementVNode("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2",width:"12",height:"12"},[e.createElementVNode("path",{d:"M9 18l6-6-6-6","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])],10,ie)):e.createCommentVNode("",!0),N("sizes")?(e.openBlock(),e.createElementBlock("select",{key:4,class:e.normalizeClass(e.unref(i).e("sizes")),value:f.value,onChange:p[2]||(p[2]=g=>x(Number(g.target.value)))},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.pageSizes,g=>(e.openBlock(),e.createElementBlock("option",{key:g,value:g},e.toDisplayString(g)+" 条/页",9,de))),128))],42,ce)):e.createCommentVNode("",!0),N("jumper")?(e.openBlock(),e.createElementBlock("span",{key:5,class:e.normalizeClass(e.unref(i).e("jumper"))},[p[6]||(p[6]=e.createTextVNode(" 前往 ",-1)),e.withDirectives(e.createElementVNode("input",{class:e.normalizeClass(e.unref(i).e("jumper-input")),type:"text",inputmode:"numeric","onUpdate:modelValue":p[3]||(p[3]=g=>E.value=g),onKeyup:e.withKeys(I,["enter"]),onBlur:I},null,34),[[e.vModelText,E.value]]),p[7]||(p[7]=e.createTextVNode(" 页 ",-1))],2)):e.createCommentVNode("",!0)],2))}}),ue={key:0},me=["checked","indeterminate"],he=["onClick"],fe={class:"sort-arrow up"},pe={class:"sort-arrow down"},ve=["onClick"],ge=["checked","onChange"],ke=["onClick"],ye=["onClick"],Ce={key:1},Me=["colspan"],ze=e.defineComponent({name:"XDynamicTable",__name:"index",props:{data:{default:()=>[]},columns:{default:()=>[]},height:{},maxHeight:{},rowKey:{},loading:{type:Boolean,default:!1},border:{type:Boolean,default:!1},stripe:{type:Boolean,default:!1},showHeader:{type:Boolean,default:!0},showIndex:{type:Boolean,default:!1},showOperation:{type:Boolean,default:!1},showAddButton:{type:Boolean,default:!1},operationWidth:{default:120},operationLabel:{default:"操作"},emptyText:{default:"暂无数据"},defaultSort:{}},emits:["sort-change","row-click","row-dblclick","selection-change","select-all","cell-click","add-row","delete-row","update:data"],setup(o,{expose:r,emit:a}){var S,s;const t=o,i=a,n=K.useNamespace("dynamic-table");e.useSlots();const l=e.computed({get:()=>t.data,set:c=>i("update:data",c)}),m=e.ref({prop:((S=t.defaultSort)==null?void 0:S.prop)||"",order:((s=t.defaultSort)==null?void 0:s.order)||null}),f=e.ref([]),y=e.ref(!1),M=e.ref(!1),N=e.computed(()=>{if(!m.value.prop||!m.value.order)return l.value;const{prop:c,order:u}=m.value;return[...l.value].sort((h,d)=>{const v=h[c],w=d[c];if(v===w)return 0;const b=v>w?1:-1;return u==="ascending"?b:-b})}),B=e.computed(()=>{const c={};return t.height&&(c.height=typeof t.height=="number"?`${t.height}px`:t.height),t.maxHeight&&(c.maxHeight=typeof t.maxHeight=="number"?`${t.maxHeight}px`:t.maxHeight),c}),V=e.computed(()=>{const c=typeof t.operationWidth=="number"?`${t.operationWidth}px`:t.operationWidth;return{width:c,minWidth:c}}),x=e.computed(()=>[n.b(),n.is("border",t.border),n.is("stripe",t.stripe),n.is("loading",t.loading)]),E=c=>{c.sortable&&(m.value.prop===c.prop?m.value.order==="ascending"?m.value.order="descending":m.value.order==="descending"&&(m.value.order=null,m.value.prop=""):(m.value.prop=c.prop,m.value.order="ascending"),i("sort-change",{...m.value}))},I=c=>c.sortable?m.value.prop!==c.prop?n.is("sortable"):[n.is("sortable"),n.is(`sort-${m.value.order}`)]:"",z=(c,u,h)=>{const d=c[u.prop];return u.formatter?u.formatter(c,u,d,h):d??""},p=(c,u,h)=>{i("row-click",c,u,h)},g=(c,u,h)=>{const d=h.target;i("cell-click",c,u,d,h)},k=()=>{y.value||M.value?(f.value=[],y.value=!1,M.value=!1):(f.value=[...l.value],y.value=!0,M.value=!1),i("select-all",f.value),i("selection-change",f.value)},L=c=>{const u=f.value.findIndex(h=>typeof t.rowKey=="function"?t.rowKey(h)===t.rowKey(c):t.rowKey?h[t.rowKey]===c[t.rowKey]:h===c);u>-1?f.value.splice(u,1):f.value.push(c),y.value=f.value.length===l.value.length,M.value=f.value.length>0&&f.value.length<l.value.length,i("selection-change",f.value)},H=c=>f.value.some(u=>typeof t.rowKey=="function"?t.rowKey(u)===t.rowKey(c):t.rowKey?u[t.rowKey]===c[t.rowKey]:u===c),D=c=>{const u={};return c.width&&(u.width=typeof c.width=="number"?`${c.width}px`:c.width),c.minWidth&&(u.minWidth=typeof c.minWidth=="number"?`${c.minWidth}px`:c.minWidth),c.align&&(u.textAlign=c.align),u},T=c=>{const u=c||{};t.columns.forEach(h=>{u[h.prop]===void 0&&(u[h.prop]="")}),l.value=[...l.value,u],i("add-row",u)},R=c=>{const u=l.value[c];l.value=l.value.filter((h,d)=>d!==c),i("delete-row",u,c)};return r({clearSelection:()=>{f.value=[],y.value=!1,M.value=!1},getSelection:()=>[...f.value],sortState:m,addRow:T,deleteRow:R,getData:()=>[...l.value]}),(c,u)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(x.value)},[o.showAddButton?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(n).e("toolbar"))},[e.renderSlot(c.$slots,"toolbar",{},()=>[e.createElementVNode("button",{class:e.normalizeClass(e.unref(n).e("add-btn")),onClick:u[0]||(u[0]=h=>T())},[...u[2]||(u[2]=[e.createElementVNode("span",{class:"add-icon"},"+",-1),e.createTextVNode(" 新增一行 ",-1)])],2)])],2)):e.createCommentVNode("",!0),o.loading?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(e.unref(n).e("loading"))},[...u[3]||(u[3]=[e.createElementVNode("span",{class:"loading-spinner"},null,-1),e.createElementVNode("span",{class:"loading-text"},"加载中...",-1)])],2)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(e.unref(n).e("wrapper")),style:e.normalizeStyle(B.value)},[e.createElementVNode("table",null,[o.showHeader?(e.openBlock(),e.createElementBlock("thead",ue,[e.createElementVNode("tr",null,[o.rowKey?(e.openBlock(),e.createElementBlock("th",{key:0,class:e.normalizeClass([e.unref(n).e("header-cell"),e.unref(n).e("selection-cell")])},[e.createElementVNode("input",{type:"checkbox",checked:y.value,indeterminate:M.value,onChange:k},null,40,me)],2)):e.createCommentVNode("",!0),o.showIndex?(e.openBlock(),e.createElementBlock("th",{key:1,class:e.normalizeClass(e.unref(n).e("header-cell")),style:{width:"60px"}}," 序号 ",2)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.columns,h=>(e.openBlock(),e.createElementBlock("th",{key:h.prop,class:e.normalizeClass([e.unref(n).e("header-cell"),I(h)]),style:e.normalizeStyle(D(h)),onClick:d=>E(h)},[e.createElementVNode("span",null,e.toDisplayString(h.label),1),h.sortable?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(n).e("sort-icon"))},[e.createElementVNode("span",fe,[e.createVNode(e.unref(A),{name:"sort-up",size:12})]),e.createElementVNode("span",pe,[e.createVNode(e.unref(A),{name:"sort-down",size:12})])],2)):e.createCommentVNode("",!0)],14,he))),128)),o.showOperation?(e.openBlock(),e.createElementBlock("th",{key:2,class:e.normalizeClass(e.unref(n).e("header-cell")),style:e.normalizeStyle(V.value)},e.toDisplayString(o.operationLabel),7)):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,(h,d)=>(e.openBlock(),e.createElementBlock("tr",{key:o.rowKey?typeof o.rowKey=="function"?o.rowKey(h):h[o.rowKey]:d,class:e.normalizeClass([e.unref(n).e("row"),e.unref(n).is("selected",H(h))]),onClick:v=>p(h,o.columns[0],v)},[o.rowKey?(e.openBlock(),e.createElementBlock("td",{key:0,class:e.normalizeClass(e.unref(n).e("cell"))},[e.createElementVNode("input",{type:"checkbox",checked:H(h),onClick:u[1]||(u[1]=e.withModifiers(()=>{},["stop"])),onChange:v=>L(h)},null,40,ge)],2)):e.createCommentVNode("",!0),o.showIndex?(e.openBlock(),e.createElementBlock("td",{key:1,class:e.normalizeClass(e.unref(n).e("cell"))},e.toDisplayString(d+1),3)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.columns,v=>(e.openBlock(),e.createElementBlock("td",{key:v.prop,class:e.normalizeClass(e.unref(n).e("cell")),style:e.normalizeStyle(D(v)),onClick:w=>g(h,v,w)},[e.renderSlot(c.$slots,`column-${v.prop}`,{row:h,column:v,$index:d},()=>[e.createTextVNode(e.toDisplayString(z(h,v,d)),1)])],14,ke))),128)),o.showOperation?(e.openBlock(),e.createElementBlock("td",{key:2,class:e.normalizeClass([e.unref(n).e("cell"),e.unref(n).e("operation-cell")])},[e.renderSlot(c.$slots,"operation",{row:h,$index:d,deleteRow:()=>R(d)},()=>[e.createElementVNode("button",{class:e.normalizeClass(e.unref(n).e("operation-btn")),onClick:e.withModifiers(v=>R(d),["stop"])}," 删除 ",10,ye)])],2)):e.createCommentVNode("",!0)],10,ve))),128))]),N.value.length===0&&!o.loading?(e.openBlock(),e.createElementBlock("tbody",Ce,[e.createElementVNode("tr",null,[e.createElementVNode("td",{colspan:o.columns.length+(o.rowKey?1:0)+(o.showIndex?1:0)+(o.showOperation?1:0),class:e.normalizeClass(e.unref(n).e("empty"))},[e.renderSlot(c.$slots,"empty",{},()=>[e.createTextVNode(e.toDisplayString(o.emptyText),1)])],10,Me)])])):e.createCommentVNode("",!0)])],6)],2))}}),we=["draggable"],Be={key:0,class:"x-tree-node__loading-icon"},xe={key:0,class:"x-tree-node__expand-arrow"},be={key:0,class:"x-tree-node__icon"},Ee={class:"x-tree-node__label"},Ne=e.defineComponent({name:"XTreeNode",__name:"tree-node",props:{node:{}},setup(o){const r=o,a=e.inject("tree"),{props:t,store:i,toggleExpand:n,toggleCheck:l,handleNodeClick:m,handleNodeContextmenu:f}=a,y=e.ref(),M=e.ref(null),N=e.computed(()=>r.node.expanded),B=e.computed(()=>r.node.checked),V=e.computed(()=>r.node.indeterminate),x=e.computed(()=>r.node.disabled),E=e.computed(()=>r.node.loading),I=e.computed(()=>r.node.isLeaf),z=e.computed(()=>t.showCheckbox||t.checkable),p=e.computed(()=>r.node.selected),g=e.computed(()=>({paddingLeft:`${r.node.level*(t.indent||16)}px`})),k=s=>{m(r.node,s)},L=s=>{f(r.node,s)},H=s=>{s.stopPropagation(),x.value||n(r.node)},D=s=>{s.stopPropagation(),x.value||l(r.node)},T=s=>{var c;if(!(!t.draggable||x.value)){if(t.allowDrag&&!t.allowDrag(r.node)){s.preventDefault();return}s.dataTransfer.effectAllowed="move",s.dataTransfer.setData("nodeKey",String(r.node.key)),(c=a.emit)==null||c.call(a,"node-drag-start",r.node,s)}},R=s=>{var c;s.preventDefault(),t.draggable&&(M.value="inner",(c=a.emit)==null||c.call(a,"node-drag-enter",r.node,s))},F=s=>{var c;M.value=null,(c=a.emit)==null||c.call(a,"node-drag-leave",r.node,s)},j=s=>{var d,v;if(s.preventDefault(),!t.draggable||x.value)return;const c=(d=y.value)==null?void 0:d.getBoundingClientRect();if(!c)return;const u=s.clientY-c.top,h=c.height;u<h*.25?M.value="prev":u>h*.75?M.value="next":M.value="inner",(v=a.emit)==null||v.call(a,"node-drag-over",r.node,s)},C=s=>{var u,h;if(s.preventDefault(),!t.draggable)return;const c=(u=s.dataTransfer)==null?void 0:u.getData("nodeKey");if(c){const d=i.nodesMap.get(c);if(d&&M.value){if(t.allowDrop&&!t.allowDrop(d,r.node,M.value)){M.value=null;return}(h=a.emit)==null||h.call(a,"node-drop",d,r.node,M.value,s)}}M.value=null},S=s=>{var c;M.value=null,(c=a.emit)==null||c.call(a,"node-drag-end",r.node,s)};return(s,c)=>{var h;const u=e.resolveComponent("TreeNode",!0);return e.withDirectives((e.openBlock(),e.createElementBlock("div",{ref_key:"nodeRef",ref:y,class:e.normalizeClass(["x-tree-node",{"is-expanded":N.value,"is-current":s.isCurrent,"is-selected":p.value,"is-disabled":x.value,"is-drop-inner":M.value==="inner","is-drop-prev":M.value==="prev","is-drop-next":M.value==="next"}]),draggable:e.unref(t).draggable&&!x.value,onDragstart:T,onDragenter:R,onDragleave:F,onDragover:j,onDrop:C,onDragend:S},[e.createElementVNode("div",{class:"x-tree-node__content",style:e.normalizeStyle(g.value),onClick:k,onContextmenu:L},[e.createElementVNode("span",{class:e.normalizeClass(["x-tree-node__expand-icon",{"is-expanded":N.value,"is-leaf":I.value,"is-loading":E.value}]),onClick:H},[E.value?(e.openBlock(),e.createElementBlock("span",Be)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[I.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("span",xe))],64))],2),o.node.icon||e.unref(t).icon?(e.openBlock(),e.createElementBlock("span",be,e.toDisplayString(o.node.icon||e.unref(t).icon),1)):e.createCommentVNode("",!0),z.value?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(["x-tree-node__checkbox",{"is-checked":B.value,"is-indeterminate":V.value,"is-disabled":x.value}]),onClick:e.withModifiers(D,["stop"])},[B.value?(e.openBlock(),e.createBlock(e.unref(A),{key:0,name:"check",size:12,class:"x-tree-node__checkbox-icon"})):V.value?(e.openBlock(),e.createBlock(e.unref(A),{key:1,name:"minus",size:12,class:"x-tree-node__checkbox-icon"})):e.createCommentVNode("",!0)],2)):e.createCommentVNode("",!0),e.createElementVNode("span",Ee,[e.renderSlot(s.$slots,"default",{node:o.node,data:o.node.data},()=>[e.createTextVNode(e.toDisplayString(o.node.label),1)])])],36),!I.value&&N.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["x-tree-node__children",{"x-tree-node__children--show-line":e.unref(t).showLine}])},[!e.unref(t).renderAfterExpand||N.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(o.node.children,d=>(e.openBlock(),e.createBlock(u,{key:d.key,node:d},{default:e.withCtx(v=>[e.renderSlot(s.$slots,"default",{node:v.node,data:v.data})]),_:3},8,["node"]))),128)):e.createCommentVNode("",!0)],2)):e.createCommentVNode("",!0)],42,we)),[[e.vShow,o.node.visible&&(((h=o.node.parent)==null?void 0:h.expanded)??!0)]])}}});class O{constructor(r,a,t=0,i=null){this.data=r,this.store=a,this.level=t,this.parent=i,this.children=[],this.expanded=!1,this.selected=!1,this.checked=!1,this.indeterminate=!1,this.loading=!1,this.visible=!0,this.loaded=!1;const n=a.props||{},l=n.value||"value",m=n.label||"label",f=n.disabled||"disabled",y=n.isLeaf||"isLeaf";this.key=r[l]??r.value??r.id??Math.random().toString(),this.label=r[m]??r.label??"",this.disabled=r[f]??r.disabled??!1,this.isLeaf=r[y]??r.isLeaf??!1;const M=n.children||"children",N=r[M]??r.children??[];N.length>0?this.children=N.map(B=>new O(B,a,t+1,this)):this.isLeaf=!0}setExpanded(r,a=!0){this.expanded=r,r?this.store.expandedKeys.add(this.key):this.store.expandedKeys.delete(this.key)}setSelected(r){this.selected=r,r?this.store.selectedKeys.add(this.key):this.store.selectedKeys.delete(this.key)}setChecked(r,a=!0,t=!0){this.checked=r,this.indeterminate=!1,r?(this.store.checkedKeys.add(this.key),this.store.indeterminateKeys.delete(this.key)):(this.store.checkedKeys.delete(this.key),this.store.indeterminateKeys.delete(this.key)),a&&(this.updateChildrenChecked(r),this.updateParentChecked())}updateChildrenChecked(r){const a=t=>{t.children.forEach(i=>{i.disabled||(i.checked=r,i.indeterminate=!1,r?(this.store.checkedKeys.add(i.key),this.store.indeterminateKeys.delete(i.key)):(this.store.checkedKeys.delete(i.key),this.store.indeterminateKeys.delete(i.key)),a(i))})};a(this)}updateParentChecked(){let r=this.parent;for(;r;){const a=r.children.filter(n=>!n.disabled);if(a.length===0){r=r.parent;continue}const t=a.every(n=>n.checked),i=a.some(n=>n.checked||n.indeterminate);t?(r.checked=!0,r.indeterminate=!1,this.store.checkedKeys.add(r.key),this.store.indeterminateKeys.delete(r.key)):i?(r.checked=!1,r.indeterminate=!0,this.store.checkedKeys.delete(r.key),this.store.indeterminateKeys.add(r.key)):(r.checked=!1,r.indeterminate=!1,this.store.checkedKeys.delete(r.key),this.store.indeterminateKeys.delete(r.key)),r=r.parent}}toggleExpand(){this.setExpanded(!this.expanded)}toggleCheck(){this.setChecked(!this.checked)}get shouldShow(){return!(!this.visible||this.parent&&!this.parent.expanded)}getParentKeys(){const r=[];let a=this.parent;for(;a;)r.push(a.key),a=a.parent;return r}getChildrenKeys(){const r=[],a=t=>{t.forEach(i=>{r.push(i.key),i.children.length&&a(i.children)})};return a(this.children),r}}const Ve=e.defineComponent({name:"XTree",__name:"index",props:{data:{default:()=>[]},treeData:{},emptyText:{default:"暂无数据"},nodeKey:{default:"value"},props:{default:()=>({})},fieldNames:{},renderAfterExpand:{type:Boolean,default:!0},load:{},renderContent:{},highlightCurrent:{type:Boolean,default:!1},checkOnClickNode:{type:Boolean,default:!1},autoExpandParent:{type:Boolean,default:!0},defaultExpandedKeys:{default:()=>[]},defaultCheckedKeys:{default:()=>[]},defaultSelectedKeys:{default:()=>[]},expandedKeys:{},checkedKeys:{},selectedKeys:{},checkStrictly:{type:Boolean,default:!1},lazy:{type:Boolean,default:!1},draggable:{type:Boolean,default:!1},allowDrag:{},allowDrop:{},accordion:{type:Boolean,default:!1},indent:{default:16},icon:{},expandOnClickNode:{type:Boolean,default:!0},checkDescendants:{type:Boolean,default:!1},currentKey:{},showLine:{type:Boolean,default:!1},showCheckbox:{type:Boolean,default:!1},selectable:{type:Boolean,default:!1},size:{default:"default"},defaultExpandAll:{type:Boolean,default:!1},checkable:{type:Boolean}},emits:["node-click","node-contextmenu","check-change","check","current-change","node-expand","node-collapse","node-drag-start","node-drag-enter","node-drag-leave","node-drag-over","node-drag-end","node-drop"],setup(o,{expose:r,emit:a}){const t=o,i=a,n=K.useNamespace("tree"),l=e.reactive({nodesMap:new Map,rootNodes:[],expandedKeys:new Set,checkedKeys:new Set,selectedKeys:new Set,indeterminateKeys:new Set,currentKey:null,filterValue:""}),m=e.ref(""),f=()=>t.fieldNames?{value:t.fieldNames.key||"value",label:t.fieldNames.title||t.fieldNames.key||"label",children:t.fieldNames.children||"children",disabled:t.fieldNames.disabled||"disabled",isLeaf:t.fieldNames.isLeaf||"isLeaf"}:t.props,y=()=>t.treeData||t.data||[];l.props=f();const M=s=>{if(l.nodesMap.clear(),l.rootNodes=[],l.checkedKeys.clear(),l.indeterminateKeys.clear(),!s||!s.length)return;const c=f(),u=(h,d,v)=>{const w=new O(h,l,d,v);l.nodesMap.set(w.key,w);const b=(c==null?void 0:c.children)||"children",$=h[b]??h.children??[];return $.length>0&&(w.children=$.map(P=>u(P,d+1,w)),w.isLeaf=!1),w};l.rootNodes=s.map(h=>u(h,0,null)),N()},N=()=>{var s,c,u;t.defaultExpandAll?B():(s=t.defaultExpandedKeys)!=null&&s.length&&t.defaultExpandedKeys.forEach(h=>{const d=l.nodesMap.get(h);d&&(d.expanded=!0,l.expandedKeys.add(h))}),(c=t.defaultCheckedKeys)!=null&&c.length&&t.defaultCheckedKeys.forEach(h=>{const d=l.nodesMap.get(h);d&&d.setChecked(!0,!t.checkStrictly)}),(u=t.checkedKeys)!=null&&u.length&&t.checkedKeys.forEach(h=>{const d=l.nodesMap.get(h);d&&d.setChecked(!0,!t.checkStrictly)})},B=()=>{l.nodesMap.forEach(s=>{s.children.length>0&&(s.expanded=!0,l.expandedKeys.add(s.key))})},V=()=>{l.nodesMap.forEach(s=>{s.expanded=!1}),l.expandedKeys.clear()},x=s=>{if(s.disabled)return;!s.expanded?(s.expanded=!0,l.expandedKeys.add(s.key),i("node-expand",s.data,s,null)):(s.expanded=!1,l.expandedKeys.delete(s.key),i("node-collapse",s.data,s,null))},E=(s,c)=>{if(s.disabled)return;const u=c??!s.checked;s.setChecked(u,!t.checkStrictly),i("check-change",s.data,s.checked,s.indeterminate);const h=[],d=[],v=[],w=[];l.nodesMap.forEach(b=>{b.checked&&(h.push(b.data),d.push(b.key)),b.indeterminate&&(v.push(b.data),w.push(b.key))}),i("check",s.data,{checkedNodes:h,checkedKeys:d,halfCheckedNodes:v,halfCheckedKeys:w})},I=(s,c)=>{s.disabled||(i("node-click",s.data,s,null),t.expandOnClickNode&&s.children.length>0&&x(s),t.highlightCurrent&&(l.currentKey=s.key,i("current-change",s.data,s)))},z=s=>{if(m.value=s,l.filterValue=s,!s){l.nodesMap.forEach(c=>{c.visible=!0});return}l.nodesMap.forEach(c=>{const u=c.label||"";c.visible=String(u).toLowerCase().includes(s.toLowerCase())}),l.nodesMap.forEach(c=>{if(c.visible&&c.parent){let u=c.parent;for(;u;)u.visible=!0,u.expanded=!0,l.expandedKeys.add(u.key),u=u.parent}})},p=s=>l.nodesMap.get(s),g=s=>{l.currentKey=s},k=()=>{if(l.currentKey)return l.nodesMap.get(l.currentKey)},L=(s=!1)=>{const c=[];return l.nodesMap.forEach(u=>{u.checked&&(!s||u.isLeaf)&&c.push(u.data)}),c},H=(s=!1)=>{const c=[];return l.nodesMap.forEach(u=>{u.checked&&(!s||u.isLeaf)&&c.push(u.key)}),c},D=s=>{l.nodesMap.forEach(c=>{c.checked=!1,c.indeterminate=!1}),l.checkedKeys.clear(),l.indeterminateKeys.clear(),s.forEach(c=>{const u=l.nodesMap.get(c);u&&u.setChecked(!0,!t.checkStrictly)})},T=()=>{const s=[];return l.nodesMap.forEach(c=>{c.indeterminate&&s.push(c.data)}),s},R=()=>{const s=[];return l.nodesMap.forEach(c=>{c.indeterminate&&s.push(c.key)}),s},F=(s,c,u=!0)=>{const h=l.nodesMap.get(s);h&&h.setChecked(c,u&&!t.checkStrictly)},j=()=>{const s=[];return l.nodesMap.forEach(c=>{c.selected&&s.push(c.data)}),s},C=s=>{l.nodesMap.forEach(c=>{c.selected=!1}),l.selectedKeys.clear(),s.forEach(c=>{const u=l.nodesMap.get(c);u&&(u.selected=!0,l.selectedKeys.add(c))})},S=e.computed(()=>t.showCheckbox||t.checkable);return e.provide("tree",{props:t,store:l,emit:i,toggleExpand:x,toggleCheck:E,handleNodeClick:I,filterValue:e.toRef(m),showCheckboxComputed:S}),r({filter:z,getNode:p,setCurrentKey:g,getCurrentKey:()=>l.currentKey,getCurrentNode:k,getCheckedNodes:L,getCheckedKeys:H,setCheckedKeys:D,getHalfCheckedNodes:T,getHalfCheckedKeys:R,setChecked:F,getSelectedNodes:j,setSelectedKeys:C,expandAll:B,collapseAll:V,updateKeyChildren:(s,c)=>{const u=l.nodesMap.get(s);u&&(u.children.forEach(h=>{l.nodesMap.delete(h.key)}),u.children=c.map(h=>{const d=new O(h,l,u.level+1,u);return l.nodesMap.set(d.key,d),d}),u.isLeaf=u.children.length===0)},remove:s=>{const c=l.nodesMap.get(s);if(c){const u=c.parent;if(u){const d=u.children.indexOf(c);d>-1&&u.children.splice(d,1),u.children.length===0&&(u.isLeaf=!0)}else{const d=l.rootNodes.indexOf(c);d>-1&&l.rootNodes.splice(d,1)}const h=d=>{l.nodesMap.delete(d.key),d.children.forEach(h)};h(c)}},append:(s,c)=>{if(c){const u=l.nodesMap.get(c);if(u){const h=new O(s,l,u.level+1,u);l.nodesMap.set(h.key,h),u.children.push(h),u.isLeaf=!1}}else{const u=new O(s,l,0,null);l.nodesMap.set(u.key,u),l.rootNodes.push(u)}},insertBefore:(s,c)=>{var h;const u=l.nodesMap.get(c);if(u){const d=new O(s,l,u.level,u.parent);l.nodesMap.set(d.key,d);const v=((h=u.parent)==null?void 0:h.children)||l.rootNodes,w=v.indexOf(u);v.splice(w,0,d)}},insertAfter:(s,c)=>{var h;const u=l.nodesMap.get(c);if(u){const d=new O(s,l,u.level,u.parent);l.nodesMap.set(d.key,d);const v=((h=u.parent)==null?void 0:h.children)||l.rootNodes,w=v.indexOf(u);v.splice(w+1,0,d)}}}),e.watch(()=>[t.treeData,t.data],()=>{M(y())},{immediate:!0,deep:!0}),e.watch(()=>t.checkedKeys,s=>{s&&D(s)},{immediate:!0,deep:!0}),e.watch(()=>t.defaultCheckedKeys,s=>{s&&s.length>0&&!t.checkedKeys&&D(s)},{immediate:!0,deep:!0}),(s,c)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([e.unref(n).b(),e.unref(n).m(o.size)])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.rootNodes,u=>(e.openBlock(),e.createBlock(Ne,{key:u.key,node:u},{default:e.withCtx(h=>[e.renderSlot(s.$slots,"default",{node:h.node,data:h.data},()=>[e.createTextVNode(e.toDisplayString(h.node.label),1)])]),_:2},1032,["node"]))),128)),l.rootNodes.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(n).e("empty"))},[e.renderSlot(s.$slots,"empty",{},()=>[e.createTextVNode(e.toDisplayString(o.emptyText),1)])],2))],2))}}),Se=["src"],Ie="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTg0IiBoZWlnaHQ9IjE1MiIgdmlld0JveD0iMCAwIDE4NCAxNTIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgPGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj4KICAgIDxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKDI0IDMxLjY3KSI+CiAgICAgIDxlbGxpcHNlIGZpbGwtb3BhY2l0eT0iLjgiIGZpbGw9IiNGNUY1RjciIGN4PSI2Ny43OTciIGN5PSIxMDYuODkiIHJ4PSI2Ny43OTciIHJ5PSIxMi42NjgiLz4KICAgICAgPHBhdGggZD0iTTEyMi4wMzQgNjkuNjc0TDk5LjM5NCA0OC4xNjJsMCAyMS41MTYgMjIuNjQgMjIuNjQ0IDAtMjIuNjQ0em0tMjIuNjQgMjIuNjQ0TDc2Ljk5OCA3MC43OThsMCAyMS41MTYgMjIuMzk2IDIyLjM5NiAwLTIyLjM5NnoiIGZpbGw9IiNFRkVGRkYiLz4KICAgICAgPHBhdGggZD0iTTk5LjM5NCA0OC4xNjJsLTIyLjM5NiAyMi42MzYgMjIuMzk2IDIxLjUyIDAtNDQuMTU2eiIgZmlsbD0iI0YyRjZGQyIvPgogICAgICA8cGF0aCBkPSJNMTIxLjk3OCA2OS42NzRMOTkuMzk0IDkyLjI1OGwzLjE2OCAzLjE2OCAyMi41ODQtMjIuNTg0LTMuMTY4LTMuMTY4eiIgZmlsbD0iI0M3Q0NEQyIvPgogICAgICA8cGF0aCBkPSJNOTkuMzk0IDkyLjI1OEw3Ni44MSA2OS42NzRsMy4xNjgtMy4xNjggMjIuNTg0IDIyLjU4NC0zLjE2OCAzLjE2OHoiIGZpbGw9IiNDN0NEREMiLz4KICAgIDwvZz4KICAgIDxwYXRoIGQ9Ik0xNDcuODU3IDMxLjY3bC0zLjI5Mi0zLjI5MmEyLjUgMi41IDAgMCAwLTMuNTM2IDBsLTEzLjQ2IDEzLjQ2YTMuNSAzLjUgMCAwIDAgMCA0Ljk1bDMuMjkzIDMuMjkyYTMuNSAzLjUgMCAwIDAgNC45NSAwbDEzLjQ2LTEzLjQ2YTIuNSAyLjUgMCAwIDAgMC0zLjUzNnoiIGZpbGw9IiNENkRCRUMiLz4KICAgIDxwYXRoIGQ9Ik0zNi4xNDMgMzEuNjdsMy4yOTItMy4yOTJhMi41IDIuNSAwIDAgMSAzLjUzNiAwbDEzLjQ2IDEzLjQ2YTMuNSAzLjUgMCAwIDEgMCA0Ljk1bC0zLjI5MyAzLjI5MmEzLjUgMy41IDAgMCAxLTQuOTUgMEwzNi4xNDMgMzUuMmEyLjUgMi41IDAgMCAxIDAtMy41MzZ6IiBmaWxsPSIjRDZEQkVDIi8+CiAgICA8Y2lyY2xlIGZpbGw9IiNFQUVFRjQiIGN4PSI5MiIgY3k9IjgiIHI9IjgiLz4KICA8L2c+Cjwvc3ZnPg==",$e=e.defineComponent({name:"XEmpty",__name:"index",props:{image:{default:""},imageSize:{default:0},description:{default:""},size:{default:"default"}},setup(o){const r=o,a=K.useNamespace("empty"),t=e.computed(()=>{const n={};return r.imageSize&&(n.height=`${r.imageSize}px`,n.width=`${r.imageSize}px`),n}),i=e.computed(()=>r.description||"暂无数据");return(n,l)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([e.unref(a).b(),e.unref(a).m(o.size)])},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(a).e("image")),style:e.normalizeStyle(t.value)},[e.renderSlot(n.$slots,"image",{},()=>[o.image?(e.openBlock(),e.createElementBlock("img",{key:0,src:o.image,style:e.normalizeStyle(t.value),draggable:"false"},null,12,Se)):(e.openBlock(),e.createElementBlock("img",{key:1,src:Ie,style:e.normalizeStyle(t.value),draggable:"false"},null,4))])],6),e.createElementVNode("div",{class:e.normalizeClass(e.unref(a).e("description"))},[e.renderSlot(n.$slots,"description",{},()=>[e.createElementVNode("p",null,e.toDisplayString(i.value),1)])],2),n.$slots.default?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(a).e("bottom"))},[e.renderSlot(n.$slots,"default")],2)):e.createCommentVNode("",!0)],2))}}),De=e.defineComponent({name:"XTimeline",__name:"index",props:{direction:{default:"vertical"}},setup(o){const r=o,a=K.useNamespace("timeline");e.provide("timeline",{props:r});const t=e.computed(()=>[a.b(),a.m(r.direction)]);return(i,n)=>(e.openBlock(),e.createElementBlock("ul",{class:e.normalizeClass(t.value),role:"timeline"},[e.renderSlot(i.$slots,"default")],2))}}),Le=e.defineComponent({name:"XTimelineItem",__name:"TimelineItem",props:{timestamp:{default:""},type:{default:"primary"},color:{},size:{default:"normal"},hideTimestamp:{type:Boolean,default:!1},placement:{default:"bottom"}},setup(o){const r=o,a=K.useNamespace("timeline-item"),t={primary:"#1D4ED8",success:"#059669",warning:"#F59E0B",danger:"#EF4444",info:"#909399"},i=e.computed(()=>{const l={};return r.color?l.backgroundColor=r.color:r.type&&t[r.type]&&(l.backgroundColor=t[r.type]),l}),n=e.computed(()=>[a.b(),a.m(r.size)]);return(l,m)=>(e.openBlock(),e.createElementBlock("li",{class:e.normalizeClass(n.value)},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(a).e("node")),style:e.normalizeStyle(i.value)},[e.renderSlot(l.$slots,"dot")],6),e.createElementVNode("div",{class:e.normalizeClass(e.unref(a).e("tail"))},null,2),e.createElementVNode("div",{class:e.normalizeClass(e.unref(a).e("wrapper"))},[!o.hideTimestamp&&o.timestamp&&o.placement==="top"?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(a).e("timestamp"))},e.toDisplayString(o.timestamp),3)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(e.unref(a).e("content"))},[e.renderSlot(l.$slots,"default")],2),!o.hideTimestamp&&o.timestamp&&o.placement==="bottom"?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(e.unref(a).e("timestamp"))},e.toDisplayString(o.timestamp),3)):e.createCommentVNode("",!0)],2)],2))}}),Te=["onMouseenter","onClick"],Ke=e.defineComponent({name:"XCarousel",__name:"index",props:{activeIndex:{default:0},autoplay:{type:Boolean,default:!0},interval:{default:3e3},indicatorPosition:{default:"inside"},trigger:{default:"hover"},arrow:{default:"hover"},loop:{type:Boolean,default:!0},height:{default:300}},emits:["update:activeIndex","change"],setup(o,{expose:r,emit:a}){const t=o,i=a,n=K.useNamespace("carousel"),l=e.ref(t.activeIndex),m=e.ref(0),f=e.ref(null),y=e.ref(!1);e.provide("carousel",{currentIndex:l,itemCount:m});const M=L=>{const H=l.value;t.loop?l.value=(L+m.value)%m.value:l.value=Math.max(0,Math.min(L,m.value-1)),i("update:activeIndex",l.value),i("change",l.value,H)},N=()=>{M(l.value-1)},B=()=>{M(l.value+1)},V=()=>{t.autoplay&&m.value>1&&(x(),f.value=setInterval(()=>{y.value||B()},t.interval))},x=()=>{f.value&&(clearInterval(f.value),f.value=null)},E=()=>{y.value=!0,t.arrow},I=()=>{y.value=!1},z=L=>{t.trigger==="hover"&&M(L)},p=L=>{t.trigger==="click"&&M(L)},g=e.computed(()=>({height:typeof t.height=="number"?`${t.height}px`:t.height})),k=e.computed(()=>[n.b(),n.m(`arrow-${t.arrow}`),n.m(`indicator-${t.indicatorPosition}`)]);return e.watch(()=>t.activeIndex,L=>{l.value=L}),e.watch(()=>t.autoplay,()=>{V()}),e.watch(m,()=>{e.nextTick(()=>{V()})}),e.onMounted(()=>{V()}),e.onUnmounted(()=>{x()}),r({prev:N,next:B,setActiveItem:M}),(L,H)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(k.value),style:e.normalizeStyle(g.value),onMouseenter:E,onMouseleave:I},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(n).e("container"))},[e.renderSlot(L.$slots,"default")],2),o.arrow!=="never"?(e.openBlock(),e.createElementBlock("button",{key:0,class:e.normalizeClass([e.unref(n).e("arrow"),e.unref(n).e("arrow-left")]),onClick:N}," ‹ ",2)):e.createCommentVNode("",!0),o.arrow!=="never"?(e.openBlock(),e.createElementBlock("button",{key:1,class:e.normalizeClass([e.unref(n).e("arrow"),e.unref(n).e("arrow-right")]),onClick:B}," › ",2)):e.createCommentVNode("",!0),o.indicatorPosition!=="none"?(e.openBlock(),e.createElementBlock("ul",{key:2,class:e.normalizeClass(e.unref(n).e("indicators"))},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,D=>(e.openBlock(),e.createElementBlock("li",{key:D,class:e.normalizeClass([e.unref(n).e("indicator"),e.unref(n).is("active",D-1===l.value)]),onMouseenter:T=>z(D-1),onClick:T=>p(D-1)},[e.createElementVNode("button",{class:e.normalizeClass(e.unref(n).e("indicator-btn"))},null,2)],42,Te))),128))],2)):e.createCommentVNode("",!0)],38))}}),Ae=e.defineComponent({name:"XCarouselItem",__name:"CarouselItem",setup(o){const r=K.useNamespace("carousel-item"),a=e.inject("carousel"),t=e.ref(-1);e.onMounted(()=>{a&&(t.value=a.itemCount.value,a.itemCount.value++)}),e.onUnmounted(()=>{a&&a.itemCount.value--});const i=e.computed(()=>a&&t.value===a.currentIndex.value),n=e.computed(()=>[r.b(),r.is("active",i.value)]);return(l,m)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(n.value)},[e.renderSlot(l.$slots,"default")],2))}}),He={key:0},je=["onClick"],Re={class:"sort-arrow up"},Pe={class:"sort-arrow down"},We=["onClick"],Fe=["onClick"],Oe={key:1},Ye=["colspan"],Xe={style:{display:"none"}},Qe=e.defineComponent({name:"XTable",__name:"index",props:{data:{default:()=>[]},height:{},maxHeight:{},rowKey:{},loading:{type:Boolean,default:!1},border:{type:Boolean,default:!1},stripe:{type:Boolean,default:!1},showHeader:{type:Boolean,default:!0},emptyText:{default:"暂无数据"},defaultSort:{},pagination:{}},emits:["sort-change","row-click","row-dblclick","cell-click","selection-change","select-all","page-change","size-change"],setup(o,{expose:r,emit:a}){var u,h;const t=o,i=a,n=K.useNamespace("table");e.useSlots();const l=e.reactive([]),m=(d,v)=>{l.findIndex(b=>b.config.prop===d.prop)===-1&&l.push({config:d,slot:v})},f=d=>{const v=l.findIndex(w=>w.config.prop===d);v!==-1&&l.splice(v,1)},y=(d,v)=>{const w=l.find(b=>b.config.prop===d);w&&(w.slot=v)};e.provide("x-table",{registerColumn:m,unregisterColumn:f,updateColumnSlot:y,props:t});const M=e.computed(()=>{const d=l.map($=>$.config),v=d.filter($=>$.fixed==="left"||$.fixed===!0),w=d.filter($=>!$.fixed),b=d.filter($=>$.fixed==="right");return[...v,...w,...b]}),N=e.computed(()=>M.value.filter(d=>d.fixed==="left"||d.fixed===!0)),B=e.computed(()=>M.value.filter(d=>d.fixed==="right"));e.computed(()=>M.value.filter(d=>!d.fixed)),e.computed(()=>N.value.reduce((d,v)=>{const w=v.width?typeof v.width=="number"?v.width:parseInt(v.width):100;return d+w},0)),e.computed(()=>B.value.reduce((d,v)=>{const w=v.width?typeof v.width=="number"?v.width:parseInt(v.width):100;return d+w},0));const V=e.computed(()=>{const d={};return l.forEach(v=>{v.slot&&(d[v.config.prop]=v.slot)}),d}),x=e.ref({prop:((u=t.defaultSort)==null?void 0:u.prop)||"",order:((h=t.defaultSort)==null?void 0:h.order)||null}),E=e.computed(()=>{if(!x.value.prop||!x.value.order)return t.data;const{prop:d,order:v}=x.value;return[...t.data].sort((w,b)=>{const $=w[d],P=b[d];if($===P)return 0;const W=$>P?1:-1;return v==="ascending"?W:-W})}),I=e.computed(()=>{const d={};return t.height&&(d.height=typeof t.height=="number"?`${t.height}px`:t.height),t.maxHeight&&(d.maxHeight=typeof t.maxHeight=="number"?`${t.maxHeight}px`:t.maxHeight),d}),z=e.computed(()=>[n.b(),n.is("border",t.border),n.is("stripe",t.stripe),n.is("loading",t.loading),n.is("has-fixed",N.value.length>0||B.value.length>0)]),p=d=>{d.sortable&&(x.value.prop===d.prop?x.value.order==="ascending"?x.value.order="descending":x.value.order==="descending"&&(x.value.order=null,x.value.prop=""):(x.value.prop=d.prop,x.value.order="ascending"),i("sort-change",{...x.value}))},g=d=>d.sortable?x.value.prop!==d.prop?n.is("sortable"):[n.is("sortable"),n.is(`sort-${x.value.order}`)]:"",k=(d,v,w)=>{const b=d[v.prop];return v.formatter?v.formatter(d,v,b,w):b??""},L=(d,v)=>{i("row-click",d,M.value[0],v)},H=(d,v,w)=>{const b=w.target;i("cell-click",d,v,b,w)},D=d=>{i("page-change",d)},T=d=>{i("size-change",d)},R=(d,v,w)=>{const b={};if(d.width&&(b.width=typeof d.width=="number"?`${d.width}px`:d.width),d.minWidth&&(b.minWidth=typeof d.minWidth=="number"?`${d.minWidth}px`:d.minWidth),d.align&&(b.textAlign=d.align),(d.fixed==="left"||d.fixed===!0)&&(b.position="sticky",b.left="0px",b.zIndex="2",v!==void 0&&v>0)){let $=0;for(let P=0;P<v;P++){const W=N.value[P],Y=W.width?typeof W.width=="number"?W.width:parseInt(W.width):100;$+=Y}b.left=`${$}px`}if(d.fixed==="right"&&(b.position="sticky",b.right="0px",b.zIndex="2",v!==void 0)){const $=B.value,P=$.length-1-v;if(P>0){let W=0;for(let Y=0;Y<P;Y++){const X=$[$.length-1-Y],U=X.width?typeof X.width=="number"?X.width:parseInt(X.width):100;W+=U}b.right=`${W}px`}}return b},F=d=>{const v=[];return(d.fixed==="left"||d.fixed===!0)&&v.push(n.is("fixed-left")),d.fixed==="right"&&v.push(n.is("fixed-right")),v},j=e.ref([]),C=d=>t.rowKey?typeof t.rowKey=="function"?t.rowKey(d):String(d[t.rowKey]):String(t.data.indexOf(d));return r({clearSelection:()=>{j.value=[],i("selection-change",[])},getSelection:()=>[...j.value],toggleRowSelection:(d,v)=>{const w=C(d),b=j.value.findIndex($=>C($)===w);v===void 0?b>-1?j.value.splice(b,1):j.value.push(d):v&&b===-1?j.value.push(d):!v&&b>-1&&j.value.splice(b,1),i("selection-change",[...j.value])},sortState:x,columns:M}),(d,v)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(z.value)},[o.loading?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(n).e("loading"))},[...v[0]||(v[0]=[e.createElementVNode("span",{class:"loading-spinner"},null,-1),e.createElementVNode("span",{class:"loading-text"},"加载中...",-1)])],2)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(e.unref(n).e("wrapper")),style:e.normalizeStyle(I.value)},[e.createElementVNode("table",null,[o.showHeader?(e.openBlock(),e.createElementBlock("thead",He,[e.createElementVNode("tr",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(M.value,(w,b)=>(e.openBlock(),e.createElementBlock("th",{key:w.prop,class:e.normalizeClass([e.unref(n).e("header-cell"),g(w),...F(w)]),style:e.normalizeStyle(R(w,w.fixed==="right"?B.value.indexOf(w):b)),onClick:$=>p(w)},[e.createElementVNode("span",null,e.toDisplayString(w.label),1),w.sortable?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(n).e("sort-icon"))},[e.createElementVNode("span",Re,[e.createVNode(e.unref(A),{name:"sort-up",size:12})]),e.createElementVNode("span",Pe,[e.createVNode(e.unref(A),{name:"sort-down",size:12})])],2)):e.createCommentVNode("",!0)],14,je))),128))])])):e.createCommentVNode("",!0),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(E.value,(w,b)=>(e.openBlock(),e.createElementBlock("tr",{key:o.rowKey?typeof o.rowKey=="function"?o.rowKey(w):w[o.rowKey]:b,class:e.normalizeClass([e.unref(n).e("row")]),onClick:$=>L(w,$)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(M.value,($,P)=>(e.openBlock(),e.createElementBlock("td",{key:$.prop,class:e.normalizeClass([e.unref(n).e("cell"),...F($)]),style:e.normalizeStyle(R($,$.fixed==="right"?B.value.indexOf($):P)),onClick:W=>H(w,$,W)},[V.value[$.prop]?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(()=>V.value[$.prop]({row:w,column:$,$index:b})),{key:0})):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(k(w,$,b)),1)],64))],14,Fe))),128))],10,We))),128))]),E.value.length===0&&!o.loading?(e.openBlock(),e.createElementBlock("tbody",Oe,[e.createElementVNode("tr",null,[e.createElementVNode("td",{colspan:M.value.length||1,class:e.normalizeClass(e.unref(n).e("empty"))},[e.renderSlot(d.$slots,"empty",{},()=>[e.createTextVNode(e.toDisplayString(o.emptyText),1)])],10,Ye)])])):e.createCommentVNode("",!0)])],6),o.pagination?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(e.unref(n).e("pagination"))},[e.createVNode(G,{total:o.pagination.total,"current-page":o.pagination.current,"page-size":o.pagination.pageSize,onCurrentChange:D,onSizeChange:T},null,8,["total","current-page","page-size"])],2)):e.createCommentVNode("",!0),e.createElementVNode("div",Xe,[e.renderSlot(d.$slots,"default")])],2))}}),Ge=e.defineComponent({name:"XTableColumn",__name:"TableColumn",props:{prop:{},label:{},width:{},minWidth:{},align:{default:"left"},sortable:{type:[Boolean,String]},fixed:{type:[String,Boolean]},formatter:{}},setup(o){const r=o;K.useNamespace("table-column");const a=e.useSlots(),t=e.ref(`column_${Date.now()}_${Math.random().toString(36).slice(2,9)}`),i=e.inject("x-table"),n=e.computed(()=>({prop:r.prop||t.value,label:r.label,width:r.width,minWidth:r.minWidth,align:r.align,sortable:r.sortable,fixed:r.fixed,formatter:r.formatter}));return e.onMounted(()=>{i!=null&&i.registerColumn&&i.registerColumn(n.value,a.default)}),e.watch(()=>a.default,l=>{i!=null&&i.updateColumnSlot&&l&&i.updateColumnSlot(r.prop||t.value,l)},{immediate:!0}),e.onUnmounted(()=>{i!=null&&i.unregisterColumn&&i.unregisterColumn(r.prop||t.value)}),(l,m)=>null}}),Ue={key:0},Ze=["onClick"],Je={class:"sort-arrow up"},qe={class:"sort-arrow down"},_e=["onClick"],et={key:0},tt=["colspan"],at={style:{display:"none"}},lt=e.defineComponent({name:"XTreeTable",__name:"index",props:{data:{default:()=>[]},rowKey:{},loading:{type:Boolean,default:!1},border:{type:Boolean,default:!1},stripe:{type:Boolean,default:!1},showHeader:{type:Boolean,default:!0},emptyText:{default:"暂无数据"},defaultExpandAll:{type:Boolean,default:!1},defaultExpandedKeys:{},indent:{default:20},treeProps:{default:()=>({children:"children",hasChildren:"hasChildren"})},expandIcon:{},collapseIcon:{}},emits:["row-click","cell-click","expand-change","sort-change"],setup(o,{expose:r,emit:a}){const t=o,i=a,n=K.useNamespace("tree-table"),l=e.ref(new Set),m=e.ref([]),f=e.ref({}),y=(C,S)=>{const s=m.value.findIndex(c=>c.prop===C.prop);s===-1?m.value.push(C):m.value[s]=C,S&&(f.value[C.prop]=S)},M=C=>{const S=m.value.findIndex(s=>s.prop===C);S>-1&&m.value.splice(S,1),delete f.value[C]},N=(C,S)=>{f.value[C]=S};e.provide("x-tree-table",{registerColumn:y,unregisterColumn:M,updateColumnSlot:N,props:t});const B=C=>typeof t.rowKey=="function"?t.rowKey(C):C[t.rowKey||"id"],V=C=>{var s;const S=((s=t.treeProps)==null?void 0:s.children)||"children";return C[S]||[]},x=C=>{var c;if(V(C).length>0)return!0;const s=((c=t.treeProps)==null?void 0:c.hasChildren)||"hasChildren";return C[s]===!0},E=C=>{const S=B(C);return l.value.has(S)},I=C=>{const S=B(C),s=!l.value.has(S);s?l.value.add(S):l.value.delete(S),i("expand-change",C,s)},z=()=>{const C=S=>{S.forEach(s=>{x(s)&&(l.value.add(B(s)),C(V(s)))})};C(t.data)},p=()=>{l.value.clear()},g=e.computed(()=>{const C=[],S=(s,c=0,u=!0)=>{s.forEach(h=>{const d=B(h),v=l.value.has(d),w=u;C.push({row:h,level:c,visible:w});const b=V(h);b.length>0&&v&&S(b,c+1,w)})};return S(t.data),C}),k=e.ref({prop:"",order:null}),L=e.computed(()=>{if(!k.value.prop||!k.value.order)return g.value;const{prop:C,order:S}=k.value;return[...g.value].sort((s,c)=>{const u=s.row[C],h=c.row[C];if(u===h)return 0;const d=u>h?1:-1;return S==="ascending"?d:-d})}),H=C=>{C.sortable&&(k.value.prop===C.prop?k.value.order==="ascending"?k.value.order="descending":k.value.order==="descending"&&(k.value.order=null,k.value.prop=""):(k.value.prop=C.prop,k.value.order="ascending"),i("sort-change",{...k.value}))},D=C=>C.sortable?k.value.prop!==C.prop?n.is("sortable"):[n.is("sortable"),n.is(`sort-${k.value.order}`)]:"",T=(C,S,s)=>{const c=C[S.prop];return S.formatter?S.formatter(C,S,c,s):c??""},R=C=>{const S={};return C.width&&(S.width=typeof C.width=="number"?`${C.width}px`:C.width),C.minWidth&&(S.minWidth=typeof C.minWidth=="number"?`${C.minWidth}px`:C.minWidth),C.align&&(S.textAlign=C.align),S},F=e.computed(()=>[n.b(),n.is("border",t.border),n.is("stripe",t.stripe),n.is("loading",t.loading)]),j=()=>{var C;t.defaultExpandAll?z():(C=t.defaultExpandedKeys)!=null&&C.length&&t.defaultExpandedKeys.forEach(S=>{l.value.add(S)})};return e.watch(()=>t.data,()=>{j()},{immediate:!0}),e.watch(()=>t.defaultExpandedKeys,C=>{C!=null&&C.length&&!t.defaultExpandAll&&(l.value.clear(),C.forEach(S=>{l.value.add(S)}))},{immediate:!0}),r({expandAll:z,collapseAll:p,toggleExpand:I,expandedKeys:l,columns:m}),(C,S)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(F.value)},[o.loading?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(n).e("loading"))},[...S[0]||(S[0]=[e.createElementVNode("span",{class:"loading-spinner"},null,-1),e.createElementVNode("span",{class:"loading-text"},"加载中...",-1)])],2)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(e.unref(n).e("wrapper"))},[e.createElementVNode("table",null,[o.showHeader?(e.openBlock(),e.createElementBlock("thead",Ue,[e.createElementVNode("tr",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,s=>(e.openBlock(),e.createElementBlock("th",{key:s.prop,class:e.normalizeClass([e.unref(n).e("header-cell"),D(s)]),style:e.normalizeStyle(R(s)),onClick:c=>H(s)},[e.createElementVNode("span",null,e.toDisplayString(s.label),1),s.sortable?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(n).e("sort-icon"))},[e.createElementVNode("span",Je,[e.createVNode(e.unref(A),{name:"sort-up",size:12})]),e.createElementVNode("span",qe,[e.createVNode(e.unref(A),{name:"sort-down",size:12})])],2)):e.createCommentVNode("",!0)],14,Ze))),128))])])):e.createCommentVNode("",!0),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(L.value,(s,c)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:B(s.row)},[s.visible?(e.openBlock(),e.createElementBlock("tr",{key:0,class:e.normalizeClass([e.unref(n).e("row"),e.unref(n).is("level-"+s.level)])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(u,h)=>(e.openBlock(),e.createElementBlock("td",{key:u.prop,class:e.normalizeClass(e.unref(n).e("cell")),style:e.normalizeStyle(R(u))},[h===0?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(n).e("cell-content"))},[e.createElementVNode("span",{class:e.normalizeClass(e.unref(n).e("indent")),style:e.normalizeStyle({width:`${s.level*o.indent}px`})},null,6),x(s.row)?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass([e.unref(n).e("expand-icon"),e.unref(n).is("expanded",E(s.row))]),onClick:e.withModifiers(d=>I(s.row),["stop"])},[E(s.row)?(e.openBlock(),e.createBlock(e.unref(A),{key:0,name:"chevron-down",size:14})):(e.openBlock(),e.createBlock(e.unref(A),{key:1,name:"chevron-right",size:14}))],10,_e)):(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(e.unref(n).e("expand-placeholder"))},null,2)),e.createElementVNode("span",null,[f.value[u.prop]?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(()=>f.value[u.prop]({row:s.row,column:u,$index:c})),{key:0})):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(T(s.row,u,c)),1)],64))])],2)):f.value[u.prop]?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(()=>f.value[u.prop]({row:s.row,column:u,$index:c})),{key:1})):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createTextVNode(e.toDisplayString(T(s.row,u,c)),1)],64))],6))),128))],2)):e.createCommentVNode("",!0)],64))),128)),L.value.length===0&&!o.loading?(e.openBlock(),e.createElementBlock("tr",et,[e.createElementVNode("td",{colspan:m.value.length||1,class:e.normalizeClass(e.unref(n).e("empty"))},[e.renderSlot(C.$slots,"empty",{},()=>[e.createTextVNode(e.toDisplayString(o.emptyText),1)])],10,tt)])):e.createCommentVNode("",!0)])])],2),e.createElementVNode("div",at,[e.renderSlot(C.$slots,"default")])],2))}}),nt=e.defineComponent({name:"XTreeTableColumn",__name:"TreeTableColumn",props:{prop:{},label:{},width:{},minWidth:{},align:{default:"left"},sortable:{type:[Boolean,String]},fixed:{type:[String,Boolean]},formatter:{}},setup(o){const r=o;K.useNamespace("tree-table-column");const a=e.useSlots(),t=e.inject("x-tree-table"),i=e.computed(()=>({prop:r.prop,label:r.label,width:r.width,minWidth:r.minWidth,align:r.align,sortable:r.sortable,fixed:r.fixed,formatter:r.formatter}));return e.onMounted(()=>{t!=null&&t.registerColumn&&t.registerColumn(i.value,a.default)}),e.watch(()=>a.default,n=>{t!=null&&t.updateColumnSlot&&n&&t.updateColumnSlot(r.prop,n)},{immediate:!0}),e.onUnmounted(()=>{t!=null&&t.unregisterColumn&&t.unregisterColumn(r.prop)}),(n,l)=>null}}),ot=["src","alt"],rt=e.defineComponent({name:"XAvatar",__name:"index",props:{src:{},icon:{},size:{default:"default"},shape:{default:"circle"},fit:{default:"cover"},alt:{}},emits:["error"],setup(o,{emit:r}){const a=o,t=r,i=K.useNamespace("avatar"),n=e.computed(()=>[i.b(),i.m(a.shape),typeof a.size=="string"?i.m(a.size):""]),l=e.computed(()=>{const f={};return typeof a.size=="number"&&(f.width=`${a.size}px`,f.height=`${a.size}px`,f.lineHeight=`${a.size}px`),f}),m=f=>{t("error",f)};return(f,y)=>(e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(n.value),style:e.normalizeStyle(l.value)},[o.src?(e.openBlock(),e.createElementBlock("img",{key:0,src:o.src,alt:o.alt,style:e.normalizeStyle({objectFit:o.fit}),onError:m},null,44,ot)):o.icon?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(e.unref(i).e("icon"))},e.toDisplayString(o.icon),3)):(e.openBlock(),e.createElementBlock("span",{key:2,class:e.normalizeClass(e.unref(i).e("default"))},[e.renderSlot(f.$slots,"default")],2))],6))}}),st=e.defineComponent({name:"XDescriptions",__name:"index",props:{title:{},column:{default:3},border:{type:Boolean,default:!1},size:{default:"default"},labelWidth:{},labelAlign:{default:"right"},contentAlign:{default:"left"},colon:{type:Boolean,default:!0}},setup(o){const r=o,a=K.useNamespace("descriptions");e.provide("x-descriptions",{props:r,column:e.computed(()=>r.column)});const t=e.computed(()=>[a.b(),a.m(r.size),a.is("bordered",r.border)]);return(i,n)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(t.value)},[o.title?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(a).e("title"))},e.toDisplayString(o.title),3)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(e.unref(a).e("body"))},[e.createElementVNode("table",null,[e.createElementVNode("tbody",null,[e.renderSlot(i.$slots,"default")])])],2)],2))}}),it=["colspan"],ct=["colspan"],dt=e.defineComponent({name:"XDescriptionsItem",__name:"DescriptionsItem",props:{label:{},span:{default:1},labelAlign:{},contentAlign:{}},setup(o){const r=o,a=K.useNamespace("descriptions-item"),t=e.inject("x-descriptions"),i=e.computed(()=>{var N;const y={},M=(N=t==null?void 0:t.props)==null?void 0:N.labelWidth;return M&&(y.width=typeof M=="number"?`${M}px`:M),y}),n=e.computed(()=>{var y;return r.labelAlign||((y=t==null?void 0:t.props)==null?void 0:y.labelAlign)||"right"}),l=e.computed(()=>{var y;return r.contentAlign||((y=t==null?void 0:t.props)==null?void 0:y.contentAlign)||"left"}),m=e.computed(()=>{var y;return((y=t==null?void 0:t.props)==null?void 0:y.colon)??!0}),f=e.computed(()=>{var y;return((y=t==null?void 0:t.props)==null?void 0:y.border)??!1});return(y,M)=>f.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("th",{class:e.normalizeClass([e.unref(a).b(),e.unref(a).e("label"),`is-${n.value}`]),style:e.normalizeStyle(i.value)},e.toDisplayString(o.label)+e.toDisplayString(m.value?":":""),7),e.createElementVNode("td",{class:e.normalizeClass([e.unref(a).e("content"),`is-${l.value}`]),colspan:o.span*2-1},[e.renderSlot(y.$slots,"default")],10,it)],64)):(e.openBlock(),e.createElementBlock("tr",{key:1,class:e.normalizeClass(e.unref(a).b())},[e.createElementVNode("th",{class:e.normalizeClass([e.unref(a).e("label"),`is-${n.value}`]),style:e.normalizeStyle(i.value)},e.toDisplayString(o.label)+e.toDisplayString(m.value?":":""),7),e.createElementVNode("td",{class:e.normalizeClass([e.unref(a).e("content"),`is-${l.value}`]),colspan:o.span*2-1},[e.renderSlot(y.$slots,"default")],10,ct)],2))}}),ut=e.defineComponent({name:"XScrollbar",__name:"index",props:{height:{},maxHeight:{},native:{type:Boolean,default:!1},wrapStyle:{},wrapClass:{},viewStyle:{},viewClass:{},noresize:{type:Boolean},tag:{default:"div"},always:{type:Boolean,default:!1},minSize:{default:20}},emits:["scroll"],setup(o,{expose:r,emit:a}){const t=o,i=a,n=K.useNamespace("scrollbar"),l=e.ref(),m=e.ref(),f=e.ref("0"),y=e.ref("0"),M=e.ref(0),N=e.ref(0),B=e.computed(()=>{const g={};return t.height&&(g.height=typeof t.height=="number"?`${t.height}px`:t.height),t.maxHeight&&(g.maxHeight=typeof t.maxHeight=="number"?`${t.maxHeight}px`:t.maxHeight),g}),V=()=>{if(!l.value)return;const g=l.value.offsetHeight-4,k=l.value.offsetWidth-4,L=l.value.scrollHeight,H=l.value.scrollWidth,D=g/L,T=k/H;y.value=D>=1?"0":`${g*D}px`,f.value=T>=1?"0":`${k*T}px`},x=g=>{if(!l.value)return;const k=l.value.offsetHeight,L=l.value.offsetWidth;N.value=l.value.scrollTop*100/k,M.value=l.value.scrollLeft*100/L,i("scroll",g)},E=g=>{var k;(k=l.value)==null||k.scrollTo(g)},I=g=>{l.value&&(l.value.scrollTop=g)},z=g=>{l.value&&(l.value.scrollLeft=g)};let p=null;return e.onMounted(()=>{t.native||(e.nextTick(V),t.noresize||(p=new ResizeObserver(V),m.value&&p.observe(m.value),window.addEventListener("resize",V)))}),e.onUnmounted(()=>{p&&p.disconnect(),window.removeEventListener("resize",V)}),r({scrollTo:E,setScrollTop:I,setScrollLeft:z,update:V}),(g,k)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(n).b())},[e.createElementVNode("div",{ref_key:"wrapRef",ref:l,class:e.normalizeClass([e.unref(n).e("wrap"),o.wrapClass,{[e.unref(n).em("wrap","hidden-default")]:!o.native}]),style:e.normalizeStyle([B.value,{overflow:o.native?"auto":"hidden"}]),onScroll:x},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.tag),{ref_key:"resizeRef",ref:m,class:e.normalizeClass([e.unref(n).e("view"),o.viewClass]),style:e.normalizeStyle(o.viewStyle)},{default:e.withCtx(()=>[e.renderSlot(g.$slots,"default")]),_:3},8,["class","style"]))],38),!o.native&&y.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass([e.unref(n).e("bar"),e.unref(n).is("vertical")]),style:e.normalizeStyle({height:y.value,top:`${N.value}%`})},null,6)):e.createCommentVNode("",!0),!o.native&&f.value?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass([e.unref(n).e("bar"),e.unref(n).is("horizontal")]),style:e.normalizeStyle({width:f.value,left:`${M.value}%`})},null,6)):e.createCommentVNode("",!0)],2))}}),mt=e.defineComponent({name:"XCollapse",__name:"index",props:{modelValue:{default:()=>[]},accordion:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(o,{emit:r}){const a=o,t=r,i=K.useNamespace("collapse"),n=e.ref([]);e.watch(()=>a.modelValue,m=>{Array.isArray(m)?n.value=m:m?n.value=[m]:n.value=[]},{immediate:!0});const l=m=>{if(a.accordion){const f=n.value.includes(m)?"":m;n.value=f?[f]:[],t("update:modelValue",f),t("change",f)}else{const f=n.value.indexOf(m);f>-1?n.value.splice(f,1):n.value.push(m),t("update:modelValue",n.value),t("change",n.value)}};return e.provide("collapse",{activeNames:n,handleItemClick:l}),(m,f)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(i).b())},[e.renderSlot(m.$slots,"default")],2))}}),ht=e.defineComponent({name:"XCollapseItem",__name:"CollapseItem",props:{name:{},title:{},disabled:{type:Boolean}},setup(o){const r=o,a=K.useNamespace("collapse-item"),t=e.inject("collapse"),{activeNames:i,handleItemClick:n}=t,l=e.computed(()=>i.value.includes(r.name)),m=()=>{r.disabled||n(r.name)};return(f,y)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([e.unref(a).b(),e.unref(a).is("active",l.value),e.unref(a).is("disabled",o.disabled)])},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(a).e("header")),onClick:m},[e.createElementVNode("span",{class:e.normalizeClass(e.unref(a).e("arrow"))},[e.createVNode(e.unref(A),{name:"right",size:12})],2),e.renderSlot(f.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(o.title),1)])],2),e.withDirectives(e.createElementVNode("div",{class:e.normalizeClass(e.unref(a).e("content"))},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(a).e("content-box"))},[e.renderSlot(f.$slots,"default")],2)],2),[[e.vShow,l.value]])],2))}}),ft=["src","loading"],pt=["src"],vt=e.defineComponent({name:"XImage",__name:"index",props:{src:{default:""},previewList:{default:()=>[]},initialIndex:{default:0},preview:{type:Boolean,default:!0},width:{},height:{},fit:{default:"cover"},error:{},placeholder:{},lazy:{type:Boolean,default:!1}},emits:["load","error"],setup(o,{emit:r}){const a=o,t=r,i=K.useNamespace("image"),n=e.ref(!0),l=e.ref(!1),m=e.ref(!1),f=e.ref(0),y=e.computed(()=>({width:typeof a.width=="number"?`${a.width}px`:a.width,height:typeof a.height=="number"?`${a.height}px`:a.height,objectFit:a.fit})),M=e.computed(()=>a.previewList.length>0?a.previewList:[a.src]),N=e.computed(()=>M.value[f.value]),B=g=>{n.value=!1,t("load",g)},V=g=>{n.value=!1,l.value=!0,t("error",g)},x=()=>{a.preview&&(f.value=a.initialIndex,m.value=!0)},E=()=>{m.value=!1},I=()=>{f.value>0?f.value--:f.value=M.value.length-1},z=()=>{f.value<M.value.length-1?f.value++:f.value=0},p=g=>{if(m.value)switch(g.key){case"ArrowLeft":I();break;case"ArrowRight":z();break;case"Escape":E();break}};return typeof window<"u"&&window.addEventListener("keydown",p),(g,k)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(i).b()),style:e.normalizeStyle({width:y.value.width,height:y.value.height})},[e.createElementVNode("img",{src:o.src,class:e.normalizeClass(e.unref(i).e("inner")),style:e.normalizeStyle(y.value),loading:o.lazy?"lazy":"eager",onLoad:B,onError:V,onClick:x},null,46,ft),n.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(i).e("placeholder"))},[e.renderSlot(g.$slots,"placeholder",{},()=>[e.createVNode(e.unref(A),{name:"loading",size:24})])],2)):e.createCommentVNode("",!0),l.value?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(e.unref(i).e("error"))},[e.renderSlot(g.$slots,"error",{},()=>[e.createVNode(e.unref(A),{name:"image",size:24}),k[1]||(k[1]=e.createElementVNode("span",null,"加载失败",-1))])],2)):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[m.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(i).e("preview")),onClick:E},[e.createElementVNode("span",{class:e.normalizeClass(e.unref(i).e("preview-close")),onClick:e.withModifiers(E,["stop"])},[e.createVNode(e.unref(A),{name:"close",size:24})],2),e.createElementVNode("img",{src:N.value,class:e.normalizeClass(e.unref(i).e("preview-image")),onClick:k[0]||(k[0]=e.withModifiers(()=>{},["stop"]))},null,10,pt),M.value.length>1?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass([e.unref(i).e("preview-arrow"),e.unref(i).em("preview-arrow","left")]),onClick:e.withModifiers(I,["stop"])},[e.createVNode(e.unref(A),{name:"left",size:24})],2)):e.createCommentVNode("",!0),M.value.length>1?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass([e.unref(i).e("preview-arrow"),e.unref(i).em("preview-arrow","right")]),onClick:e.withModifiers(z,["stop"])},[e.createVNode(e.unref(A),{name:"right",size:24})],2)):e.createCommentVNode("",!0),M.value.length>1?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(e.unref(i).e("preview-counter"))},e.toDisplayString(f.value+1)+" / "+e.toDisplayString(M.value.length),3)):e.createCommentVNode("",!0)],2)):e.createCommentVNode("",!0)]))],6))}}),gt=["onClick"],kt=e.defineComponent({name:"XCalendar",__name:"index",props:{modelValue:{default:()=>new Date},range:{}},emits:["update:modelValue","select","change"],setup(o,{emit:r}){const a=o,t=r,i=K.useNamespace("calendar"),n=e.ref(a.modelValue.getFullYear()),l=e.ref(a.modelValue.getMonth()),m=["日","一","二","三","四","五","六"],f=["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],y=new Date,M=e.computed(()=>{const p=[],g=new Date(n.value,l.value,1),k=new Date(n.value,l.value+1,0),L=g.getDay();for(let D=L-1;D>=0;D--){const T=new Date(n.value,l.value,-D);p.push({date:T,isCurrentMonth:!1,isToday:N(T,y),isSelected:N(T,a.modelValue)})}for(let D=1;D<=k.getDate();D++){const T=new Date(n.value,l.value,D);p.push({date:T,isCurrentMonth:!0,isToday:N(T,y),isSelected:N(T,a.modelValue)})}const H=42-p.length;for(let D=1;D<=H;D++){const T=new Date(n.value,l.value+1,D);p.push({date:T,isCurrentMonth:!1,isToday:N(T,y),isSelected:N(T,a.modelValue)})}return p}),N=(p,g)=>p.getFullYear()===g.getFullYear()&&p.getMonth()===g.getMonth()&&p.getDate()===g.getDate(),B=p=>{t("update:modelValue",p.date),t("select",p.date),t("change",p.date)},V=()=>{n.value--},x=()=>{n.value++},E=()=>{l.value===0?(l.value=11,n.value--):l.value--},I=()=>{l.value===11?(l.value=0,n.value++):l.value++},z=()=>{n.value=y.getFullYear(),l.value=y.getMonth(),t("update:modelValue",y),t("select",y)};return e.watch(()=>a.modelValue,p=>{n.value=p.getFullYear(),l.value=p.getMonth()}),(p,g)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(i).b())},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(i).e("header"))},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(i).e("title"))},e.toDisplayString(n.value)+" 年 "+e.toDisplayString(f[l.value]),3),e.createElementVNode("div",{class:e.normalizeClass(e.unref(i).e("actions"))},[e.createElementVNode("button",{class:e.normalizeClass(e.unref(i).e("btn")),onClick:V},[e.createVNode(e.unref(A),{name:"d-arrow-left",size:12})],2),e.createElementVNode("button",{class:e.normalizeClass(e.unref(i).e("btn")),onClick:E},[e.createVNode(e.unref(A),{name:"arrow-left",size:12})],2),e.createElementVNode("button",{class:e.normalizeClass(e.unref(i).e("btn")),onClick:z},"今天",2),e.createElementVNode("button",{class:e.normalizeClass(e.unref(i).e("btn")),onClick:I},[e.createVNode(e.unref(A),{name:"arrow-right",size:12})],2),e.createElementVNode("button",{class:e.normalizeClass(e.unref(i).e("btn")),onClick:x},[e.createVNode(e.unref(A),{name:"d-arrow-right",size:12})],2)],2)],2),e.createElementVNode("div",{class:e.normalizeClass(e.unref(i).e("weekdays"))},[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(m,k=>e.createElementVNode("div",{key:k,class:e.normalizeClass(e.unref(i).e("weekday"))},e.toDisplayString(k),3)),64))],2),e.createElementVNode("div",{class:e.normalizeClass(e.unref(i).e("body"))},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(M.value,(k,L)=>(e.openBlock(),e.createElementBlock("div",{key:L,class:e.normalizeClass([e.unref(i).e("day"),e.unref(i).is("current-month",k.isCurrentMonth),e.unref(i).is("today",k.isToday),e.unref(i).is("selected",k.isSelected)]),onClick:H=>B(k)},[e.renderSlot(p.$slots,"default",{date:k.date,isCurrentMonth:k.isCurrentMonth},()=>[e.createTextVNode(e.toDisplayString(k.date.getDate()),1)])],10,gt))),128))],2)],2))}}),yt=e.defineComponent({name:"XQRCode",__name:"index",props:{value:{default:""},size:{default:128},bgColor:{default:"#ffffff"},fgColor:{default:"#000000"},level:{default:"M"},showDownload:{type:Boolean,default:!1}},emits:["ready","error"],setup(o,{emit:r}){const a=o,t=r,i=K.useNamespace("qrcode"),n=e.ref(),l=async()=>{if(!(!n.value||!a.value))try{const B=await m(a.value,a.level);M(B),t("ready",n.value)}catch(B){t("error",B)}},m=async(B,V)=>{const E=[];for(let p=0;p<21;p++)E.push(new Array(21).fill(0));f(E,0,0),f(E,14,0),f(E,0,14);for(let p=8;p<13;p++)E[6][p]=p%2===0?1:0,E[p][6]=p%2===0?1:0;const I=new TextEncoder().encode(B);let z=0;for(let p=20;p>0;p-=2){p===6&&p--;for(let g=0;g<21;g++)for(let k=0;k<2;k++){const L=p-k;if(!y(L,g,21)&&z<I.length){const H=I[z];for(let D=7;D>=0&&!(g<21&&!y(L,g,21)&&(E[g][L]=H>>D&1,g++,g>=21));D--);z++}}}return E},f=(B,V,x)=>{for(let E=0;E<7;E++)for(let I=0;I<7;I++)(E===0||E===6||I===0||I===6||E>=2&&E<=4&&I>=2&&I<=4)&&(B[V+E][x+I]=1)},y=(B,V,x)=>B<8&&V<8||B<8&&V>=x-8||B>=x-8&&V<8||B===6||V===6,M=B=>{if(!n.value)return;const V=n.value.getContext("2d");if(!V)return;const x=B.length,E=a.size/x;n.value.width=a.size,n.value.height=a.size,V.fillStyle=a.bgColor,V.fillRect(0,0,a.size,a.size),V.fillStyle=a.fgColor;for(let I=0;I<x;I++)for(let z=0;z<x;z++)B[I][z]&&V.fillRect(z*E,I*E,E,E)},N=()=>{if(!n.value)return;const B=document.createElement("a");B.download="qrcode.png",B.href=n.value.toDataURL("image/png"),B.click()};return e.watch(()=>[a.value,a.size,a.bgColor,a.fgColor,a.level],()=>{l()}),e.onMounted(()=>{l()}),(B,V)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(i).b())},[e.createElementVNode("canvas",{ref_key:"canvasRef",ref:n,class:e.normalizeClass(e.unref(i).e("canvas"))},null,2),o.showDownload?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(i).e("actions"))},[e.createElementVNode("button",{class:e.normalizeClass(e.unref(i).e("download")),onClick:N}," 下载二维码 ",2)],2)):e.createCommentVNode("",!0)],2))}}),Ct=e.defineComponent({name:"XVirtualScroll",__name:"index",props:{items:{default:()=>[]},itemSize:{default:50},height:{default:400},buffer:{default:5},virtual:{type:Boolean,default:!0}},emits:["scroll"],setup(o,{expose:r,emit:a}){const t=o,i=a,n=K.useNamespace("virtual-scroll"),l=e.ref(),m=e.ref(0),f=e.computed(()=>typeof t.height=="number"?`${t.height}px`:t.height),y=e.computed(()=>t.items.length*t.itemSize),M=e.computed(()=>{const p=typeof t.height=="number"?t.height:parseInt(t.height)||400;return Math.ceil(p/t.itemSize)+t.buffer*2}),N=e.computed(()=>{if(!t.virtual)return 0;const p=Math.floor(m.value/t.itemSize)-t.buffer;return Math.max(0,p)}),B=e.computed(()=>t.virtual?Math.min(t.items.length,N.value+M.value):t.items.length),V=e.computed(()=>t.virtual?t.items.slice(N.value,B.value).map((p,g)=>({...p,index:N.value+g})):t.items),x=e.computed(()=>N.value*t.itemSize),E=p=>{const g=p.target;m.value=g.scrollTop,i("scroll",m.value)};return r({scrollToIndex:p=>{l.value&&(l.value.scrollTop=p*t.itemSize)},scrollToBottom:()=>{l.value&&(l.value.scrollTop=y.value)}}),(p,g)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"containerRef",ref:l,class:e.normalizeClass(e.unref(n).b()),style:e.normalizeStyle({height:f.value}),onScroll:E},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(n).e("wrapper")),style:e.normalizeStyle({height:`${y.value}px`})},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(n).e("content")),style:e.normalizeStyle({transform:`translateY(${x.value}px)`})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(V.value,(k,L)=>(e.openBlock(),e.createElementBlock("div",{key:k.id??L,class:e.normalizeClass(e.unref(n).e("item")),style:e.normalizeStyle({height:`${o.itemSize}px`})},[e.renderSlot(p.$slots,"default",{item:k,index:k.index})],6))),128))],6)],6)],38))}}),Mt=e.defineComponent({name:"XInfiniteScroll",__name:"index",props:{loading:{type:Boolean,default:!1},finished:{type:Boolean,default:!1},immediate:{type:Boolean,default:!0},distance:{default:50},loadingText:{default:"加载中..."},finishedText:{default:"没有更多了"}},emits:["load"],setup(o,{emit:r}){const a=o,t=r,i=K.useNamespace("infinite-scroll"),n=e.ref(),l=e.ref();let m=null;const f=()=>{m&&m.disconnect(),m=new IntersectionObserver(y=>{y[0].isIntersecting&&!a.loading&&!a.finished&&t("load")},{rootMargin:`${a.distance}px`}),l.value&&m.observe(l.value)};return e.onMounted(()=>{f(),a.immediate&&!a.finished&&t("load")}),e.onBeforeUnmount(()=>{m&&m.disconnect()}),(y,M)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"containerRef",ref:n,class:e.normalizeClass(e.unref(i).b())},[e.renderSlot(y.$slots,"default"),e.createElementVNode("div",{ref_key:"observerRef",ref:l,class:e.normalizeClass(e.unref(i).e("footer"))},[o.loading?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(i).e("loading"))},[e.createVNode(e.unref(A),{name:"loading",size:16}),e.createElementVNode("span",null,e.toDisplayString(o.loadingText),1)],2)):o.finished?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(e.unref(i).e("finished"))},e.toDisplayString(o.finishedText),3)):e.createCommentVNode("",!0)],2)],2))}});exports.Avatar=rt;exports.Calendar=kt;exports.Card=te;exports.Carousel=Ke;exports.CarouselItem=Ae;exports.Collapse=mt;exports.CollapseItem=ht;exports.Descriptions=st;exports.DescriptionsItem=dt;exports.DynamicTable=ze;exports.Empty=$e;exports.Image=vt;exports.InfiniteScroll=Mt;exports.Pagination=G;exports.Progress=oe;exports.QRCode=yt;exports.Scrollbar=ut;exports.Table=Qe;exports.TableColumn=Ge;exports.Tag=ee;exports.Timeline=De;exports.TimelineItem=Le;exports.Tree=Ve;exports.TreeNode=O;exports.TreeTable=lt;exports.TreeTableColumn=nt;exports.VirtualScroll=Ct;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),H=require("@xto/core"),U={"arrow-up":"M12 19V5m0 0l-7 7m7-7l7 7","arrow-down":"M12 5v14m0 0l7-7m-7 7l-7-7","arrow-left":"M19 12H5m0 0l7 7m-7-7l7-7","arrow-right":"M5 12h14m0 0l-7-7m7 7l-7 7","arrow-up-bold":"M12 5l-7 7h4v7h6v-7h4l-7-7z","arrow-down-bold":"M12 19l7-7h-4V5H9v7H5l7 7z","arrow-left-bold":"M5 12l7-7v4h7v6h-7v4l-7-7z","arrow-right-bold":"M19 12l-7 7v-4H5v-6h7V5l7 7z","caret-down":"M6 9l6 6 6-6","caret-right":"M9 18l6-6-6-6",plus:"M12 5v14m-7-7h14",minus:"M5 12h14",close:"M6 18L18 6M6 6l12 12",check:"M5 13l4 4L19 7","check-bold":"M4 12l5 5L20 6",edit:"M11 4H4a2 2 0 00-2 2v14a2 2 0 002 2h14a2 2 0 002-2v-7M18.5 2.5a2.121 2.121 0 013 3L12 15l-4 1 1-4 9.5-9.5z",delete:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16",copy:"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z",download:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4",upload:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12",refresh:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15",search:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z",filter:"M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z",more:"M12 5v.01M12 12v.01M12 19v.01M12 6a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2z","more-h":"M5 12h.01M12 12h.01M19 12h.01M6 12a1 1 0 11-2 0 1 1 0 012 0zm7 0a1 1 0 11-2 0 1 1 0 012 0zm7 0a1 1 0 11-2 0 1 1 0 012 0z",setting:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z M15 12a3 3 0 11-6 0 3 3 0 016 0z",share:"M8.684 13.342C8.886 12.938 9 12.482 9 12c0-.482-.114-.938-.316-1.342m0 2.684a3 3 0 110-2.684m0 2.684l6.632 3.316m-6.632-6l6.632-3.316m0 0a3 3 0 105.367-2.684 3 3 0 00-5.367 2.684zm0 9.316a3 3 0 105.368 2.684 3 3 0 00-5.368-2.684z",loading:"M12 2v4m0 12v4M4.93 4.93l2.83 2.83m8.48 8.48l2.83 2.83M2 12h4m12 0h4M4.93 19.07l2.83-2.83m8.48-8.48l2.83-2.83",info:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z",success:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z",warning:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z",error:"M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z",question:"M8.228 9c.549-1.165 2.03-2 3.772-2 2.21 0 4 1.343 4 3 0 1.4-1.278 2.575-3.006 2.907-.542.104-.994.54-.994 1.093m0 3h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z",user:"M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z","user-add":"M18 9v3m0 0v3m0-3h3m-3 0h-3m-2-5a4 4 0 11-8 0 4 4 0 018 0zM3 20a6 6 0 0112 0v1H3v-1z","user-group":"M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z",logout:"M17 16l4-4m0 0l-4-4m4 4H7m6 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h4a3 3 0 013 3v1",login:"M11 16l-4-4m0 0l4-4m-4 4h14m-5 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h7a3 3 0 013 3v1",file:"M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z",folder:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z","folder-open":"M5 19a2 2 0 01-2-2V7a2 2 0 012-2h4l2 2h4a2 2 0 012 2v1M5 19h14a2 2 0 002-2v-5a2 2 0 00-2-2H9a2 2 0 00-2 2v5a2 2 0 01-2 2z",document:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z",image:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z",video:"M15 10l4.553-2.276A1 1 0 0121 8.618v6.764a1 1 0 01-1.447.894L15 14M5 18h8a2 2 0 002-2V8a2 2 0 00-2-2H5a2 2 0 00-2 2v8a2 2 0 002 2z",music:"M9 19V6l12-3v13M9 19c0 1.105-1.343 2-3 2s-3-.895-3-2 1.343-2 3-2 3 .895 3 2zm12-3c0 1.105-1.343 2-3 2s-3-.895-3-2 1.343-2 3-2 3 .895 3 2zM9 10l12-3",camera:"M3 9a2 2 0 012-2h.93a2 2 0 001.664-.89l.812-1.22A2 2 0 0110.07 4h3.86a2 2 0 011.664.89l.812 1.22A2 2 0 0018.07 7H19a2 2 0 012 2v9a2 2 0 01-2 2H5a2 2 0 01-2-2V9z M15 13a3 3 0 11-6 0 3 3 0 016 0z",mail:"M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z",phone:"M3 5a2 2 0 012-2h3.28a1 1 0 01.948.684l1.498 4.493a1 1 0 01-.502 1.21l-2.257 1.13a11.042 11.042 0 005.516 5.516l1.13-2.257a1 1 0 011.21-.502l4.493 1.498a1 1 0 01.684.949V19a2 2 0 01-2 2h-1C9.716 21 3 14.284 3 6V5z",chat:"M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z",bell:"M15 17h5l-1.405-1.405A2.032 2.032 0 0118 14.158V11a6.002 6.002 0 00-4-5.659V5a2 2 0 10-4 0v.341C7.67 6.165 6 8.388 6 11v3.159c0 .538-.214 1.055-.595 1.436L4 17h5m6 0v1a3 3 0 11-6 0v-1m6 0H9",message:"M8 10h.01M12 10h.01M16 10h.01M9 16H5a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v8a2 2 0 01-2 2h-5l-5 5v-5z",eye:"M15 12a3 3 0 11-6 0 3 3 0 016 0z M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z","eye-off":"M13.875 18.825A10.05 10.05 0 0112 19c-4.478 0-8.268-2.943-9.543-7a9.97 9.97 0 011.563-3.029m5.858.908a3 3 0 114.243 4.243M9.878 9.878l4.242 4.242M9.88 9.88l-3.29-3.29m7.532 7.532l3.29 3.29M3 3l3.59 3.59m0 0A9.953 9.953 0 0112 5c4.478 0 8.268 2.943 9.543 7a10.025 10.025 0 01-4.132 5.411m0 0L21 21",calendar:"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z",clock:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z",history:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z",timer:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z",location:"M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z M15 11a3 3 0 11-6 0 3 3 0 016 0z",map:"M9 20l-5.447-2.724A1 1 0 013 16.382V5.618a1 1 0 011.447-.894L9 7m0 13l6-3m-6 3V7m6 10l4.553 2.276A1 1 0 0021 18.382V7.618a1 1 0 00-.553-.894L15 4m0 13V4m0 0L9 7",globe:"M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9",star:"M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z",heart:"M4.318 6.318a4.5 4.5 0 000 6.364L12 20.364l7.682-7.682a4.5 4.5 0 00-6.364-6.364L12 7.636l-1.318-1.318a4.5 4.5 0 00-6.364 0z","thumb-up":"M14 10h4.764a2 2 0 011.789 2.894l-3.5 7A2 2 0 0115.263 21h-4.017c-.163 0-.326-.02-.485-.06L7 20m7-10V5a2 2 0 00-2-2h-.095c-.5 0-.905.405-.905.905 0 .714-.211 1.412-.608 2.006L7 11v9m7-10h-2M7 20H5a2 2 0 01-2-2v-6a2 2 0 012-2h2.5",link:"M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1","external-link":"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14",lock:"M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z",unlock:"M8 11V7a4 4 0 118 0m-4 8v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2z",key:"M15 7a2 2 0 012 2m4 0a6 6 0 01-7.743 5.743L11 17H9v2H7v2H4a1 1 0 01-1-1v-2.586a1 1 0 01.293-.707l5.964-5.964A6 6 0 1121 9z",home:"M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6",menu:"M4 6h16M4 12h16M4 18h16","menu-fold":"M4 6h16M4 12h10M4 18h16","menu-unfold":"M4 6h16M10 12h10M4 18h16","menu-collapse":"M4 6h16M4 12h10M4 18h16","menu-expand":"M4 6h16M10 12h10M4 18h16","sidebar-fold":"M11 19l-7-7 7-7m8 14l-7-7 7-7","sidebar-expand":"M13 5l7 7-7 7M5 5l7 7-7 7","sidebar-left":"M11 19l-7-7 7-7m8 14l-7-7 7-7",dashboard:"M4 5a1 1 0 011-1h4a1 1 0 011 1v5a1 1 0 01-1 1H5a1 1 0 01-1-1V5zM14 5a1 1 0 011-1h4a1 1 0 011 1v2a1 1 0 01-1 1h-4a1 1 0 01-1-1V5zM4 15a1 1 0 011-1h4a1 1 0 011 1v4a1 1 0 01-1 1H5a1 1 0 01-1-1v-4zM14 12a1 1 0 011-1h4a1 1 0 011 1v7a1 1 0 01-1 1h-4a1 1 0 01-1-1v-7z",chart:"M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z","chart-pie":"M11 3.055A9.001 9.001 0 1020.945 13H11V3.055z M20.488 9H15V3.512A9.025 9.025 0 0120.488 9z","chart-line":"M7 12l3-3 3 3 4-4M8 21l4-4 4 4M3 4h18M4 4v16",report:"M9 17v-2m3 2v-4m3 4v-6m2 10H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z",analytics:"M16 8v8m-4-5v5m-4-2v2m-2 4h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z",system:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z M12 15a3 3 0 100-6 3 3 0 000 6z",permission:"M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z",role:"M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z","user-manage":"M12 4.354a4 4 0 110 5.292M15 21H3v-1a6 6 0 0112 0v1zm0 0h6v-1a6 6 0 00-9-5.197M13 7a4 4 0 11-8 0 4 4 0 018 0z",log:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z",notification:"M15 17h5l-1.405-1.405A2.032 2.032 0 0118 14.158V11a6.002 6.002 0 00-4-5.659V5a2 2 0 10-4 0v.341C7.67 6.165 6 8.388 6 11v3.159c0 .538-.214 1.055-.595 1.436L4 17h5m6 0v1a3 3 0 11-6 0v-1m6 0H9",app:"M4 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2V6zM14 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2V6zM4 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2v-2zM14 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2v-2z",list:"M4 6h16M4 10h16M4 14h16M4 18h16",grid:"M4 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2V6zM14 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2V6zM4 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2v-2zM14 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2v-2z",fullscreen:"M4 8V4m0 0h4M4 4l5 5m11-1V4m0 0h-4m4 0l-5 5M4 16v4m0 0h4m-4 0l5-5m11 5l-5-5m5 5v-4m0 4h-4","fullscreen-exit":"M9 4V9H4m11-5v5h5M4 15h5v5m11-5h-5v5","zoom-in":"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0zM10 7v6m3-3H7","zoom-out":"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0zM13 10H7",print:"M17 17h2a2 2 0 002-2v-4a2 2 0 00-2-2H5a2 2 0 00-2 2v4a2 2 0 002 2h2m2 4h6a2 2 0 002-2v-4a2 2 0 00-2-2H9a2 2 0 00-2 2v4a2 2 0 002 2zm8-12V5a2 2 0 00-2-2H9a2 2 0 00-2 2v4h10z",bookmark:"M5 5a2 2 0 012-2h10a2 2 0 012 2v16l-7-3.5L5 21V5z",tag:"M7 7h.01M7 3h5c.512 0 1.024.195 1.414.586l7 7a2 2 0 010 2.828l-7 7a2 2 0 01-2.828 0l-7-7A1.994 1.994 0 013 12V7a4 4 0 014-4z",code:"M10 20l4-16m4 4l4 4-4 4M6 16l-4-4 4-4",terminal:"M8 9l3 3-3 3m5 0h3M5 20h14a2 2 0 002-2V6a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z",database:"M4 7v10c0 2.21 3.582 4 8 4s8-1.79 8-4V7M4 7c0 2.21 3.582 4 8 4s8-1.79 8-4M4 7c0-2.21 3.582-4 8-4s8 1.79 8 4m0 5c0 2.21-3.582 4-8 4s-8-1.79-8-4",server:"M5 12h14M5 12a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v4a2 2 0 01-2 2M5 12a2 2 0 00-2 2v4a2 2 0 002 2h14a2 2 0 002-2v-4a2 2 0 00-2-2m-2-4h.01M17 16h.01",cloud:"M3 15a4 4 0 004 4h9a5 5 0 10-.1-9.999 5.002 5.002 0 10-9.78 2.096A4.001 4.001 0 003 15z",gift:"M12 8v13m0-13V6a2 2 0 112 2h-2zm0 0V5.5A2.5 2.5 0 109.5 8H12zm-7 4h14M5 12a2 2 0 110-4h14a2 2 0 110 4M5 12v7a2 2 0 002 2h10a2 2 0 002-2v-7",moon:"M20.354 15.354A9 9 0 018.646 3.646 9.003 9.003 0 0012 21a9.003 9.003 0 008.354-5.646z",sun:"M12 3v1m0 16v1m9-9h-1M4 12H3m15.364 6.364l-.707-.707M6.343 6.343l-.707-.707m12.728 0l-.707.707M6.343 17.657l-.707.707M16 12a4 4 0 11-8 0 4 4 0 018 0z",theme:"M7 21a4 4 0 01-4-4V5a2 2 0 012-2h4a2 2 0 012 2v12a4 4 0 01-4 4zm0 0h12a2 2 0 002-2v-4a2 2 0 00-2-2h-2.343M11 7.343l1.657-1.657a2 2 0 012.828 0l2.829 2.829a2 2 0 010 2.828l-8.486 8.485M7 17h.01",skin:"M7 4h2v1c0 1.66 1.34 3 3 3s3-1.34 3-3V4h2l3 3v6h-4l1 3v5H7v-5l1-3H4V7l3-3z",heading:"M4 6h16M4 12h8m-8 6h16",bold:"M6 4h8a4 4 0 014 4 4 4 0 01-4 4H6z M6 12h9a4 4 0 014 4 4 4 0 01-4 4H6z",italic:"M10 4h4m-2 0v16m-4 0h8",strikethrough:"M16 4H8a4 4 0 00-4 4v4h16V8a4 4 0 00-4-4zM4 12h16m-4 4H8a4 4 0 00-4 4v0a4 4 0 004 4h8a4 4 0 004-4v0a4 4 0 00-4-4z","list-bullet":"M4 6h.01M4 12h.01M4 18h.01M8 6h12M8 12h12M8 18h12","list-number":"M4 6h2M4 12h2M4 18h2M8 6h12M8 12h12M8 18h12","link-text":"M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1","image-insert":"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z","code-inline":"M10 20l4-16m4 4l4 4-4 4M6 16l-4-4 4-4","divider-h":"M4 12h16",quote:"M8 10h.01M12 10h.01M16 10h.01M9 16H5a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v8a2 2 0 01-2 2h-5l-5 5v-5z","code-block":"M4 4h16v16H4z M8 8h8M8 12h8M8 16h4","sort-up":"M12 5v14m-7-7l7-7 7 7","sort-down":"M12 19V5m7 7l-7 7-7-7","chevron-down":"M6 9l6 6 6-6","chevron-right":"M9 18l6-6-6-6","chevron-up":"M18 15l-6-6-6 6","chevron-left":"M15 18l-6-6 6-6","move-up":"M5 15l7-7 7 7","move-down":"M19 9l-7 7-7-7","back-top":"M12 19V5m-7 7l7-7 7 7","dropdown-arrow":"M6 9l6 6 6-6","close-circle":"M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z","close-bold":"M6 18L18 6M6 6l12 12","check-circle":"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z","info-circle":"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z","warning-circle":"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z","back-arrow":"M19 12H5m0 0l7 7m-7-7l7-7","d-arrow-left":"M11 17l-5-5 5-5M18 17l-5-5 5-5","d-arrow-right":"M6 7l5 5-5 5M13 7l5 5-5 5",left:"M15 19l-7-7 7-7",right:"M9 5l7 7-7 7",down:"M19 9l-7 7-7-7",up:"M5 15l7-7 7 7"};function q(o){return o in U}const _=["aria-hidden","aria-label"],ee=["stroke-width"],te=["d"],R=e.defineComponent({name:"XIcon",__name:"index",props:{name:{},size:{default:24},color:{},spin:{type:Boolean,default:!1},strokeWidth:{default:2}},setup(o,{expose:r}){const l=o,t=H.useNamespace("icon"),i=e.computed(()=>typeof l.size=="number"?`${l.size}px`:l.size),n=e.computed(()=>({width:i.value,height:i.value,color:l.color})),a=e.computed(()=>({strokeWidth:l.strokeWidth})),m=e.computed(()=>[t.b(),t.is("spin",l.spin)]),p=e.computed(()=>l.name&&q(l.name)?U[l.name]:"");return r({iconSize:i,iconStyle:n,iconPath:p}),(g,z)=>(e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(m.value),style:e.normalizeStyle(n.value),"aria-hidden":!o.name,"aria-label":o.name,role:"img"},[p.value?(e.openBlock(),e.createElementBlock("svg",{key:0,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":o.strokeWidth,"stroke-linecap":"round","stroke-linejoin":"round",style:e.normalizeStyle(a.value),"aria-hidden":"true"},[e.createElementVNode("path",{d:p.value},null,8,te)],12,ee)):e.renderSlot(g.$slots,"default",{key:1},()=>[e.createTextVNode(e.toDisplayString(o.name),1)])],14,_))}}),le=e.defineComponent({name:"XTag",__name:"index",props:{type:{default:""},size:{default:"default"},effect:{default:"light"},closable:{type:Boolean,default:!1},hit:{type:Boolean,default:!1},color:{}},emits:["close"],setup(o,{emit:r}){const l=o,t=r,i=H.useNamespace("tag"),n=e.computed(()=>[i.b(),i.m(l.type||"primary"),l.size!=="default"?i.m(l.size):"",i.m(l.effect),i.is("hit",l.hit)]),a=e.computed(()=>l.color?{backgroundColor:l.effect==="dark"?l.color:"",borderColor:l.color,color:l.effect==="dark"?"#fff":l.color}:{}),m=p=>{t("close",p)};return(p,g)=>(e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(n.value),style:e.normalizeStyle(a.value)},[e.renderSlot(p.$slots,"default"),o.closable?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass(e.unref(i).e("close")),onClick:m},[e.createVNode(e.unref(R),{name:"close",size:10})],2)):e.createCommentVNode("",!0)],6))}}),ae=e.defineComponent({name:"XCard",__name:"index",props:{header:{},bodyStyle:{default:()=>({padding:"20px"})},shadow:{default:"always"}},setup(o){const r=o,l=H.useNamespace("card"),t=e.computed(()=>[l.b(),l.is(`shadow-${r.shadow}`)]);return(i,n)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(t.value)},[o.header||i.$slots.header?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(l).e("header"))},[e.renderSlot(i.$slots,"header",{},()=>[e.createTextVNode(e.toDisplayString(o.header),1)])],2)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(e.unref(l).e("body")),style:e.normalizeStyle(o.bodyStyle)},[e.renderSlot(i.$slots,"default")],6)],2))}}),ne=["viewBox"],oe=["cx","cy","r","stroke-width"],re=["cx","cy","r","stroke-width","stroke-dasharray","stroke"],se=e.defineComponent({name:"XProgress",__name:"index",props:{percentage:{default:0},type:{default:"line"},status:{default:""},strokeWidth:{default:6},color:{type:[String,Array,Function],default:"#12B6AF"},width:{default:126},showText:{type:Boolean,default:!0}},setup(o){const r=o,l=H.useNamespace("progress"),t=e.computed(()=>Math.min(100,Math.max(0,r.percentage))),i=e.computed(()=>({width:`${t.value}%`,backgroundColor:typeof r.color=="function"?r.color(t.value):r.color})),n=e.computed(()=>[l.b(),l.m(r.type),l.is("show-text",r.showText),l.is(`status-${r.status||""}`,r.status)]);return e.computed(()=>r.status==="success"?"100%":r.status==="warning"?"Warning":r.status==="exception"?"Exception":`${t.value}%`),(a,m)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(n.value)},[o.type==="line"?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(l).e("line"))},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(l).e("outer"))},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(l).e("inner"))},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(l).e("bar")),style:e.normalizeStyle(i.value)},null,6)],2)],2),o.showText?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(l).e("text"))},e.toDisplayString(t.value)+"% ",3)):e.createCommentVNode("",!0)],2)):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(e.unref(l).e("circle"))},[(e.openBlock(),e.createElementBlock("svg",{viewBox:`0 0 ${o.width} ${o.width}`,style:e.normalizeStyle({width:`${o.width}px`,height:`${o.width}px`})},[e.createElementVNode("circle",{cx:o.width/2,cy:o.width/2,r:(o.width-o.strokeWidth)/2,fill:"none","stroke-width":o.strokeWidth,stroke:"var(--xto-fill-color, #F2F3F5)"},null,8,oe),e.createElementVNode("circle",{cx:o.width/2,cy:o.width/2,r:(o.width-o.strokeWidth)/2,fill:"none","stroke-width":o.strokeWidth,"stroke-dasharray":`${t.value/100*Math.PI*(o.width-o.strokeWidth)} ${Math.PI*(o.width-o.strokeWidth)}`,stroke:typeof o.color=="function"?o.color(t.value):o.color,"stroke-linecap":"round",style:{transform:"rotate(-90deg)","transform-origin":"center"}},null,8,re)],12,ne)),o.showText?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(l).e("circle-text"))},e.toDisplayString(t.value)+"% ",3)):e.createCommentVNode("",!0)],2))],2))}}),ie=["disabled"],ce=["onClick"],de=["disabled"],ue=["value"],me=["value"],Z=e.defineComponent({name:"XPagination",__name:"index",props:{total:{default:0},pageSize:{default:10},currentPage:{default:1},pageSizes:{default:()=>[10,20,50,100]},layout:{default:"total, sizes, prev, pager, next, jumper"}},emits:["update:currentPage","update:pageSize","current-change","size-change"],setup(o,{emit:r}){const l=o,t=r,i=H.useNamespace("pagination"),n=e.ref(l.currentPage),a=e.ref(l.pageSize);e.watch(()=>l.currentPage,M=>{n.value=M}),e.watch(()=>l.pageSize,M=>{a.value=M});const m=e.computed(()=>n.value),p=e.computed(()=>a.value),g=e.computed(()=>Math.max(1,Math.ceil(l.total/p.value))),z=e.computed(()=>l.layout.split(",").map(M=>M.trim()).filter(Boolean)),N=M=>z.value.includes(M),x=e.computed(()=>{const M=[],h=g.value,y=m.value;if(h<=7)for(let C=1;C<=h;C++)M.push(C);else if(y<=4){for(let C=1;C<=5;C++)M.push(C);M.push(-1),M.push(h)}else if(y>=h-3){M.push(1),M.push(-1);for(let C=h-4;C<=h;C++)M.push(C)}else{M.push(1),M.push(-1);for(let C=y-1;C<=y+1;C++)M.push(C);M.push(-1),M.push(h)}return M}),b=M=>{M<1||M>g.value||M===m.value||(n.value=M,t("update:currentPage",M),t("current-change",M))},B=M=>{M!==p.value&&(a.value=M,t("update:pageSize",M),t("size-change",M),n.value=1,t("update:currentPage",1),t("current-change",1))},S=e.ref(""),$=()=>{const M=parseInt(S.value,10);isFinite(M)&&(b(Math.min(Math.max(1,M),g.value)),S.value="")};return(M,h)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(i).b())},[N("total")?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(i).e("total"))},"共 "+e.toDisplayString(o.total)+" 条",3)):e.createCommentVNode("",!0),N("prev")?(e.openBlock(),e.createElementBlock("button",{key:1,class:e.normalizeClass(e.unref(i).e("btn")),disabled:m.value<=1,onClick:h[0]||(h[0]=y=>b(m.value-1))},[...h[4]||(h[4]=[e.createElementVNode("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2",width:"12",height:"12"},[e.createElementVNode("path",{d:"M15 18l-6-6 6-6","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])],10,ie)):e.createCommentVNode("",!0),N("pager")?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(x.value,y=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:y},[y===-1?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(i).e("ellipsis"))},"...",2)):(e.openBlock(),e.createElementBlock("button",{key:1,class:e.normalizeClass([e.unref(i).e("btn"),e.unref(i).is("active",y===m.value)]),onClick:C=>b(y)},e.toDisplayString(y),11,ce))],64))),128)):e.createCommentVNode("",!0),N("next")?(e.openBlock(),e.createElementBlock("button",{key:3,class:e.normalizeClass(e.unref(i).e("btn")),disabled:m.value>=g.value,onClick:h[1]||(h[1]=y=>b(m.value+1))},[...h[5]||(h[5]=[e.createElementVNode("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2",width:"12",height:"12"},[e.createElementVNode("path",{d:"M9 18l6-6-6-6","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])],10,de)):e.createCommentVNode("",!0),N("sizes")?(e.openBlock(),e.createElementBlock("select",{key:4,class:e.normalizeClass(e.unref(i).e("sizes")),value:p.value,onChange:h[2]||(h[2]=y=>B(Number(y.target.value)))},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.pageSizes,y=>(e.openBlock(),e.createElementBlock("option",{key:y,value:y},e.toDisplayString(y)+" 条/页",9,me))),128))],42,ue)):e.createCommentVNode("",!0),N("jumper")?(e.openBlock(),e.createElementBlock("span",{key:5,class:e.normalizeClass(e.unref(i).e("jumper"))},[h[6]||(h[6]=e.createTextVNode(" 前往 ",-1)),e.withDirectives(e.createElementVNode("input",{class:e.normalizeClass(e.unref(i).e("jumper-input")),type:"text",inputmode:"numeric","onUpdate:modelValue":h[3]||(h[3]=y=>S.value=y),onKeyup:e.withKeys($,["enter"]),onBlur:$},null,34),[[e.vModelText,S.value]]),h[7]||(h[7]=e.createTextVNode(" 页 ",-1))],2)):e.createCommentVNode("",!0)],2))}}),he={key:0},fe=["checked","indeterminate"],pe=["onClick"],ve={class:"sort-arrow up"},ge={class:"sort-arrow down"},ke=["onClick"],ye=["checked","onChange"],Ce=["onClick"],Me=["onClick"],ze={key:1},we=["colspan"],xe=e.defineComponent({name:"XDynamicTable",__name:"index",props:{data:{default:()=>[]},columns:{default:()=>[]},height:{},maxHeight:{},rowKey:{},loading:{type:Boolean,default:!1},border:{type:Boolean,default:!1},stripe:{type:Boolean,default:!1},showHeader:{type:Boolean,default:!0},showIndex:{type:Boolean,default:!1},showOperation:{type:Boolean,default:!1},showAddButton:{type:Boolean,default:!1},operationWidth:{default:120},operationLabel:{default:"操作"},emptyText:{default:"暂无数据"},defaultSort:{}},emits:["sort-change","row-click","row-dblclick","selection-change","select-all","cell-click","add-row","delete-row","update:data"],setup(o,{expose:r,emit:l}){var V,s;const t=o,i=l,n=H.useNamespace("dynamic-table");e.useSlots();const a=e.computed({get:()=>t.data,set:c=>i("update:data",c)}),m=e.ref({prop:((V=t.defaultSort)==null?void 0:V.prop)||"",order:((s=t.defaultSort)==null?void 0:s.order)||null}),p=e.ref([]),g=e.ref(!1),z=e.ref(!1),N=e.computed(()=>{if(!m.value.prop||!m.value.order)return a.value;const{prop:c,order:u}=m.value;return[...a.value].sort((f,d)=>{const v=f[c],w=d[c];if(v===w)return 0;const E=v>w?1:-1;return u==="ascending"?E:-E})}),x=e.computed(()=>{const c={};return t.height&&(c.height=typeof t.height=="number"?`${t.height}px`:t.height),t.maxHeight&&(c.maxHeight=typeof t.maxHeight=="number"?`${t.maxHeight}px`:t.maxHeight),c}),b=e.computed(()=>{const c=typeof t.operationWidth=="number"?`${t.operationWidth}px`:t.operationWidth;return{width:c,minWidth:c}}),B=e.computed(()=>[n.b(),n.is("border",t.border),n.is("stripe",t.stripe),n.is("loading",t.loading)]),S=c=>{c.sortable&&(m.value.prop===c.prop?m.value.order==="ascending"?m.value.order="descending":m.value.order==="descending"&&(m.value.order=null,m.value.prop=""):(m.value.prop=c.prop,m.value.order="ascending"),i("sort-change",{...m.value}))},$=c=>c.sortable?m.value.prop!==c.prop?n.is("sortable"):[n.is("sortable"),n.is(`sort-${m.value.order}`)]:"",M=(c,u,f)=>{const d=c[u.prop];return u.formatter?u.formatter(c,u,d,f):d??""},h=(c,u,f)=>{i("row-click",c,u,f)},y=(c,u,f)=>{const d=f.target;i("cell-click",c,u,d,f)},C=()=>{g.value||z.value?(p.value=[],g.value=!1,z.value=!1):(p.value=[...a.value],g.value=!0,z.value=!1),i("select-all",p.value),i("selection-change",p.value)},D=c=>{const u=p.value.findIndex(f=>typeof t.rowKey=="function"?t.rowKey(f)===t.rowKey(c):t.rowKey?f[t.rowKey]===c[t.rowKey]:f===c);u>-1?p.value.splice(u,1):p.value.push(c),g.value=p.value.length===a.value.length,z.value=p.value.length>0&&p.value.length<a.value.length,i("selection-change",p.value)},j=c=>p.value.some(u=>typeof t.rowKey=="function"?t.rowKey(u)===t.rowKey(c):t.rowKey?u[t.rowKey]===c[t.rowKey]:u===c),A=c=>{const u={};return c.width&&(u.width=typeof c.width=="number"?`${c.width}px`:c.width),c.minWidth&&(u.minWidth=typeof c.minWidth=="number"?`${c.minWidth}px`:c.minWidth),c.align&&(u.textAlign=c.align),u},K=c=>{const u=c||{};t.columns.forEach(f=>{u[f.prop]===void 0&&(u[f.prop]="")}),a.value=[...a.value,u],i("add-row",u)},P=c=>{const u=a.value[c];a.value=a.value.filter((f,d)=>d!==c),i("delete-row",u,c)};return r({clearSelection:()=>{p.value=[],g.value=!1,z.value=!1},getSelection:()=>[...p.value],sortState:m,addRow:K,deleteRow:P,getData:()=>[...a.value]}),(c,u)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(B.value)},[o.showAddButton?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(n).e("toolbar"))},[e.renderSlot(c.$slots,"toolbar",{},()=>[e.createElementVNode("button",{class:e.normalizeClass(e.unref(n).e("add-btn")),onClick:u[0]||(u[0]=f=>K())},[...u[2]||(u[2]=[e.createElementVNode("span",{class:"add-icon"},"+",-1),e.createTextVNode(" 新增一行 ",-1)])],2)])],2)):e.createCommentVNode("",!0),o.loading?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(e.unref(n).e("loading"))},[...u[3]||(u[3]=[e.createElementVNode("span",{class:"loading-spinner"},null,-1),e.createElementVNode("span",{class:"loading-text"},"加载中...",-1)])],2)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(e.unref(n).e("wrapper")),style:e.normalizeStyle(x.value)},[e.createElementVNode("table",null,[o.showHeader?(e.openBlock(),e.createElementBlock("thead",he,[e.createElementVNode("tr",null,[o.rowKey?(e.openBlock(),e.createElementBlock("th",{key:0,class:e.normalizeClass([e.unref(n).e("header-cell"),e.unref(n).e("selection-cell")])},[e.createElementVNode("input",{type:"checkbox",checked:g.value,indeterminate:z.value,onChange:C},null,40,fe)],2)):e.createCommentVNode("",!0),o.showIndex?(e.openBlock(),e.createElementBlock("th",{key:1,class:e.normalizeClass(e.unref(n).e("header-cell")),style:{width:"60px"}}," 序号 ",2)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.columns,f=>(e.openBlock(),e.createElementBlock("th",{key:f.prop,class:e.normalizeClass([e.unref(n).e("header-cell"),$(f)]),style:e.normalizeStyle(A(f)),onClick:d=>S(f)},[e.createElementVNode("span",null,e.toDisplayString(f.label),1),f.sortable?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(n).e("sort-icon"))},[e.createElementVNode("span",ve,[e.createVNode(e.unref(R),{name:"sort-up",size:12})]),e.createElementVNode("span",ge,[e.createVNode(e.unref(R),{name:"sort-down",size:12})])],2)):e.createCommentVNode("",!0)],14,pe))),128)),o.showOperation?(e.openBlock(),e.createElementBlock("th",{key:2,class:e.normalizeClass(e.unref(n).e("header-cell")),style:e.normalizeStyle(b.value)},e.toDisplayString(o.operationLabel),7)):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,(f,d)=>(e.openBlock(),e.createElementBlock("tr",{key:o.rowKey?typeof o.rowKey=="function"?o.rowKey(f):f[o.rowKey]:d,class:e.normalizeClass([e.unref(n).e("row"),e.unref(n).is("selected",j(f))]),onClick:v=>h(f,o.columns[0],v)},[o.rowKey?(e.openBlock(),e.createElementBlock("td",{key:0,class:e.normalizeClass(e.unref(n).e("cell"))},[e.createElementVNode("input",{type:"checkbox",checked:j(f),onClick:u[1]||(u[1]=e.withModifiers(()=>{},["stop"])),onChange:v=>D(f)},null,40,ye)],2)):e.createCommentVNode("",!0),o.showIndex?(e.openBlock(),e.createElementBlock("td",{key:1,class:e.normalizeClass(e.unref(n).e("cell"))},e.toDisplayString(d+1),3)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.columns,v=>(e.openBlock(),e.createElementBlock("td",{key:v.prop,class:e.normalizeClass(e.unref(n).e("cell")),style:e.normalizeStyle(A(v)),onClick:w=>y(f,v,w)},[e.renderSlot(c.$slots,`column-${v.prop}`,{row:f,column:v,$index:d},()=>[e.createTextVNode(e.toDisplayString(M(f,v,d)),1)])],14,Ce))),128)),o.showOperation?(e.openBlock(),e.createElementBlock("td",{key:2,class:e.normalizeClass([e.unref(n).e("cell"),e.unref(n).e("operation-cell")])},[e.renderSlot(c.$slots,"operation",{row:f,$index:d,deleteRow:()=>P(d)},()=>[e.createElementVNode("button",{class:e.normalizeClass(e.unref(n).e("operation-btn")),onClick:e.withModifiers(v=>P(d),["stop"])}," 删除 ",10,Me)])],2)):e.createCommentVNode("",!0)],10,ke))),128))]),N.value.length===0&&!o.loading?(e.openBlock(),e.createElementBlock("tbody",ze,[e.createElementVNode("tr",null,[e.createElementVNode("td",{colspan:o.columns.length+(o.rowKey?1:0)+(o.showIndex?1:0)+(o.showOperation?1:0),class:e.normalizeClass(e.unref(n).e("empty"))},[e.renderSlot(c.$slots,"empty",{},()=>[e.createTextVNode(e.toDisplayString(o.emptyText),1)])],10,we)])])):e.createCommentVNode("",!0)])],6)],2))}}),Be=["draggable"],Ee={key:0,class:"x-tree-node__loading-icon"},Ne={key:0,class:"x-tree-node__expand-arrow"},be={key:0,class:"x-tree-node__icon"},Ve={class:"x-tree-node__label"},Se=e.defineComponent({name:"XTreeNode",__name:"tree-node",props:{node:{}},setup(o){const r=o,l=e.inject("tree"),{props:t,store:i,toggleExpand:n,toggleCheck:a,handleNodeClick:m,handleNodeContextmenu:p}=l,g=e.ref(),z=e.ref(null),N=e.computed(()=>r.node.expanded),x=e.computed(()=>r.node.checked),b=e.computed(()=>r.node.indeterminate),B=e.computed(()=>r.node.disabled),S=e.computed(()=>r.node.loading),$=e.computed(()=>r.node.isLeaf),M=e.computed(()=>t.showCheckbox||t.checkable),h=e.computed(()=>r.node.selected),y=e.computed(()=>({paddingLeft:`${r.node.level*(t.indent||16)}px`})),C=s=>{m(r.node,s)},D=s=>{p(r.node,s)},j=s=>{s.stopPropagation(),B.value||n(r.node)},A=s=>{s.stopPropagation(),B.value||a(r.node)},K=s=>{var c;if(!(!t.draggable||B.value)){if(t.allowDrag&&!t.allowDrag(r.node)){s.preventDefault();return}s.dataTransfer.effectAllowed="move",s.dataTransfer.setData("nodeKey",String(r.node.key)),(c=l.emit)==null||c.call(l,"node-drag-start",r.node,s)}},P=s=>{var c;s.preventDefault(),t.draggable&&(z.value="inner",(c=l.emit)==null||c.call(l,"node-drag-enter",r.node,s))},F=s=>{var c;z.value=null,(c=l.emit)==null||c.call(l,"node-drag-leave",r.node,s)},W=s=>{var d,v;if(s.preventDefault(),!t.draggable||B.value)return;const c=(d=g.value)==null?void 0:d.getBoundingClientRect();if(!c)return;const u=s.clientY-c.top,f=c.height;u<f*.25?z.value="prev":u>f*.75?z.value="next":z.value="inner",(v=l.emit)==null||v.call(l,"node-drag-over",r.node,s)},k=s=>{var u,f;if(s.preventDefault(),!t.draggable)return;const c=(u=s.dataTransfer)==null?void 0:u.getData("nodeKey");if(c){const d=i.nodesMap.get(c);if(d&&z.value){if(t.allowDrop&&!t.allowDrop(d,r.node,z.value)){z.value=null;return}(f=l.emit)==null||f.call(l,"node-drop",d,r.node,z.value,s)}}z.value=null},V=s=>{var c;z.value=null,(c=l.emit)==null||c.call(l,"node-drag-end",r.node,s)};return(s,c)=>{var f;const u=e.resolveComponent("TreeNode",!0);return e.withDirectives((e.openBlock(),e.createElementBlock("div",{ref_key:"nodeRef",ref:g,class:e.normalizeClass(["x-tree-node",{"is-expanded":N.value,"is-current":s.isCurrent,"is-selected":h.value,"is-disabled":B.value,"is-drop-inner":z.value==="inner","is-drop-prev":z.value==="prev","is-drop-next":z.value==="next"}]),draggable:e.unref(t).draggable&&!B.value,onDragstart:K,onDragenter:P,onDragleave:F,onDragover:W,onDrop:k,onDragend:V},[e.createElementVNode("div",{class:"x-tree-node__content",style:e.normalizeStyle(y.value),onClick:C,onContextmenu:D},[e.createElementVNode("span",{class:e.normalizeClass(["x-tree-node__expand-icon",{"is-expanded":N.value,"is-leaf":$.value,"is-loading":S.value}]),onClick:j},[S.value?(e.openBlock(),e.createElementBlock("span",Ee)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[$.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("span",Ne))],64))],2),o.node.icon||e.unref(t).icon?(e.openBlock(),e.createElementBlock("span",be,e.toDisplayString(o.node.icon||e.unref(t).icon),1)):e.createCommentVNode("",!0),M.value?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(["x-tree-node__checkbox",{"is-checked":x.value,"is-indeterminate":b.value,"is-disabled":B.value}]),onClick:e.withModifiers(A,["stop"])},[x.value?(e.openBlock(),e.createBlock(e.unref(R),{key:0,name:"check",size:12,class:"x-tree-node__checkbox-icon"})):b.value?(e.openBlock(),e.createBlock(e.unref(R),{key:1,name:"minus",size:12,class:"x-tree-node__checkbox-icon"})):e.createCommentVNode("",!0)],2)):e.createCommentVNode("",!0),e.createElementVNode("span",Ve,[e.renderSlot(s.$slots,"default",{node:o.node,data:o.node.data},()=>[e.createTextVNode(e.toDisplayString(o.node.label),1)])])],36),!$.value&&N.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["x-tree-node__children",{"x-tree-node__children--show-line":e.unref(t).showLine}])},[!e.unref(t).renderAfterExpand||N.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(o.node.children,d=>(e.openBlock(),e.createBlock(u,{key:d.key,node:d},{default:e.withCtx(v=>[e.renderSlot(s.$slots,"default",{node:v.node,data:v.data})]),_:3},8,["node"]))),128)):e.createCommentVNode("",!0)],2)):e.createCommentVNode("",!0)],42,Be)),[[e.vShow,o.node.visible&&(((f=o.node.parent)==null?void 0:f.expanded)??!0)]])}}});class O{constructor(r,l,t=0,i=null){this.data=r,this.store=l,this.level=t,this.parent=i,this.children=[],this.expanded=!1,this.selected=!1,this.checked=!1,this.indeterminate=!1,this.loading=!1,this.visible=!0,this.loaded=!1;const n=l.props||{},a=n.value||"value",m=n.label||"label",p=n.disabled||"disabled",g=n.isLeaf||"isLeaf";this.key=r[a]??r.value??r.id??Math.random().toString(),this.label=r[m]??r.label??"",this.disabled=r[p]??r.disabled??!1,this.isLeaf=r[g]??r.isLeaf??!1;const z=n.children||"children",N=r[z]??r.children??[];N.length>0?this.children=N.map(x=>new O(x,l,t+1,this)):this.isLeaf=!0}setExpanded(r,l=!0){this.expanded=r,r?this.store.expandedKeys.add(this.key):this.store.expandedKeys.delete(this.key)}setSelected(r){this.selected=r,r?this.store.selectedKeys.add(this.key):this.store.selectedKeys.delete(this.key)}setChecked(r,l=!0,t=!0){this.checked=r,this.indeterminate=!1,r?(this.store.checkedKeys.add(this.key),this.store.indeterminateKeys.delete(this.key)):(this.store.checkedKeys.delete(this.key),this.store.indeterminateKeys.delete(this.key)),l&&(this.updateChildrenChecked(r),this.updateParentChecked())}updateChildrenChecked(r){const l=t=>{t.children.forEach(i=>{i.disabled||(i.checked=r,i.indeterminate=!1,r?(this.store.checkedKeys.add(i.key),this.store.indeterminateKeys.delete(i.key)):(this.store.checkedKeys.delete(i.key),this.store.indeterminateKeys.delete(i.key)),l(i))})};l(this)}updateParentChecked(){let r=this.parent;for(;r;){const l=r.children.filter(n=>!n.disabled);if(l.length===0){r=r.parent;continue}const t=l.every(n=>n.checked),i=l.some(n=>n.checked||n.indeterminate);t?(r.checked=!0,r.indeterminate=!1,this.store.checkedKeys.add(r.key),this.store.indeterminateKeys.delete(r.key)):i?(r.checked=!1,r.indeterminate=!0,this.store.checkedKeys.delete(r.key),this.store.indeterminateKeys.add(r.key)):(r.checked=!1,r.indeterminate=!1,this.store.checkedKeys.delete(r.key),this.store.indeterminateKeys.delete(r.key)),r=r.parent}}toggleExpand(){this.setExpanded(!this.expanded)}toggleCheck(){this.setChecked(!this.checked)}get shouldShow(){return!(!this.visible||this.parent&&!this.parent.expanded)}getParentKeys(){const r=[];let l=this.parent;for(;l;)r.push(l.key),l=l.parent;return r}getChildrenKeys(){const r=[],l=t=>{t.forEach(i=>{r.push(i.key),i.children.length&&l(i.children)})};return l(this.children),r}}const Ie=e.defineComponent({name:"XTree",__name:"index",props:{data:{default:()=>[]},treeData:{},emptyText:{default:"暂无数据"},nodeKey:{default:"value"},props:{default:()=>({})},fieldNames:{},renderAfterExpand:{type:Boolean,default:!0},load:{},renderContent:{},highlightCurrent:{type:Boolean,default:!1},checkOnClickNode:{type:Boolean,default:!1},autoExpandParent:{type:Boolean,default:!0},defaultExpandedKeys:{default:()=>[]},defaultCheckedKeys:{default:()=>[]},defaultSelectedKeys:{default:()=>[]},expandedKeys:{},checkedKeys:{},selectedKeys:{},checkStrictly:{type:Boolean,default:!1},lazy:{type:Boolean,default:!1},draggable:{type:Boolean,default:!1},allowDrag:{},allowDrop:{},accordion:{type:Boolean,default:!1},indent:{default:16},icon:{},expandOnClickNode:{type:Boolean,default:!0},checkDescendants:{type:Boolean,default:!1},currentKey:{},showLine:{type:Boolean,default:!1},showCheckbox:{type:Boolean,default:!1},selectable:{type:Boolean,default:!1},size:{default:"default"},defaultExpandAll:{type:Boolean,default:!1},checkable:{type:Boolean}},emits:["node-click","node-contextmenu","check-change","check","current-change","node-expand","node-collapse","node-drag-start","node-drag-enter","node-drag-leave","node-drag-over","node-drag-end","node-drop"],setup(o,{expose:r,emit:l}){const t=o,i=l,n=H.useNamespace("tree"),a=e.reactive({nodesMap:new Map,rootNodes:[],expandedKeys:new Set,checkedKeys:new Set,selectedKeys:new Set,indeterminateKeys:new Set,currentKey:null,filterValue:""}),m=e.ref(""),p=()=>t.fieldNames?{value:t.fieldNames.key||"value",label:t.fieldNames.title||t.fieldNames.key||"label",children:t.fieldNames.children||"children",disabled:t.fieldNames.disabled||"disabled",isLeaf:t.fieldNames.isLeaf||"isLeaf"}:t.props,g=()=>t.treeData||t.data||[];a.props=p();const z=s=>{if(a.nodesMap.clear(),a.rootNodes=[],a.checkedKeys.clear(),a.indeterminateKeys.clear(),!s||!s.length)return;const c=p(),u=(f,d,v)=>{const w=new O(f,a,d,v);a.nodesMap.set(w.key,w);const E=(c==null?void 0:c.children)||"children",L=f[E]??f.children??[];return L.length>0&&(w.children=L.map(I=>u(I,d+1,w)),w.isLeaf=!1),w};a.rootNodes=s.map(f=>u(f,0,null)),N()},N=()=>{var s,c,u;t.defaultExpandAll?x():(s=t.defaultExpandedKeys)!=null&&s.length&&t.defaultExpandedKeys.forEach(f=>{const d=a.nodesMap.get(f);d&&(d.expanded=!0,a.expandedKeys.add(f))}),(c=t.defaultCheckedKeys)!=null&&c.length&&t.defaultCheckedKeys.forEach(f=>{const d=a.nodesMap.get(f);d&&d.setChecked(!0,!t.checkStrictly)}),(u=t.checkedKeys)!=null&&u.length&&t.checkedKeys.forEach(f=>{const d=a.nodesMap.get(f);d&&d.setChecked(!0,!t.checkStrictly)})},x=()=>{a.nodesMap.forEach(s=>{s.children.length>0&&(s.expanded=!0,a.expandedKeys.add(s.key))})},b=()=>{a.nodesMap.forEach(s=>{s.expanded=!1}),a.expandedKeys.clear()},B=s=>{if(s.disabled)return;!s.expanded?(s.expanded=!0,a.expandedKeys.add(s.key),i("node-expand",s.data,s,null)):(s.expanded=!1,a.expandedKeys.delete(s.key),i("node-collapse",s.data,s,null))},S=(s,c)=>{if(s.disabled)return;const u=c??!s.checked;s.setChecked(u,!t.checkStrictly),i("check-change",s.data,s.checked,s.indeterminate);const f=[],d=[],v=[],w=[];a.nodesMap.forEach(E=>{E.checked&&(f.push(E.data),d.push(E.key)),E.indeterminate&&(v.push(E.data),w.push(E.key))}),i("check",s.data,{checkedNodes:f,checkedKeys:d,halfCheckedNodes:v,halfCheckedKeys:w})},$=(s,c)=>{s.disabled||(i("node-click",s.data,s,null),t.expandOnClickNode&&s.children.length>0&&B(s),t.highlightCurrent&&(a.currentKey=s.key,i("current-change",s.data,s)))},M=s=>{if(m.value=s,a.filterValue=s,!s){a.nodesMap.forEach(c=>{c.visible=!0});return}a.nodesMap.forEach(c=>{const u=c.label||"";c.visible=String(u).toLowerCase().includes(s.toLowerCase())}),a.nodesMap.forEach(c=>{if(c.visible&&c.parent){let u=c.parent;for(;u;)u.visible=!0,u.expanded=!0,a.expandedKeys.add(u.key),u=u.parent}})},h=s=>a.nodesMap.get(s),y=s=>{a.currentKey=s},C=()=>{if(a.currentKey)return a.nodesMap.get(a.currentKey)},D=(s=!1)=>{const c=[];return a.nodesMap.forEach(u=>{u.checked&&(!s||u.isLeaf)&&c.push(u.data)}),c},j=(s=!1)=>{const c=[];return a.nodesMap.forEach(u=>{u.checked&&(!s||u.isLeaf)&&c.push(u.key)}),c},A=s=>{a.nodesMap.forEach(c=>{c.checked=!1,c.indeterminate=!1}),a.checkedKeys.clear(),a.indeterminateKeys.clear(),s.forEach(c=>{const u=a.nodesMap.get(c);u&&u.setChecked(!0,!t.checkStrictly)})},K=()=>{const s=[];return a.nodesMap.forEach(c=>{c.indeterminate&&s.push(c.data)}),s},P=()=>{const s=[];return a.nodesMap.forEach(c=>{c.indeterminate&&s.push(c.key)}),s},F=(s,c,u=!0)=>{const f=a.nodesMap.get(s);f&&f.setChecked(c,u&&!t.checkStrictly)},W=()=>{const s=[];return a.nodesMap.forEach(c=>{c.selected&&s.push(c.data)}),s},k=s=>{a.nodesMap.forEach(c=>{c.selected=!1}),a.selectedKeys.clear(),s.forEach(c=>{const u=a.nodesMap.get(c);u&&(u.selected=!0,a.selectedKeys.add(c))})},V=e.computed(()=>t.showCheckbox||t.checkable);return e.provide("tree",{props:t,store:a,emit:i,toggleExpand:B,toggleCheck:S,handleNodeClick:$,filterValue:e.toRef(m),showCheckboxComputed:V}),r({filter:M,getNode:h,setCurrentKey:y,getCurrentKey:()=>a.currentKey,getCurrentNode:C,getCheckedNodes:D,getCheckedKeys:j,setCheckedKeys:A,getHalfCheckedNodes:K,getHalfCheckedKeys:P,setChecked:F,getSelectedNodes:W,setSelectedKeys:k,expandAll:x,collapseAll:b,updateKeyChildren:(s,c)=>{const u=a.nodesMap.get(s);u&&(u.children.forEach(f=>{a.nodesMap.delete(f.key)}),u.children=c.map(f=>{const d=new O(f,a,u.level+1,u);return a.nodesMap.set(d.key,d),d}),u.isLeaf=u.children.length===0)},remove:s=>{const c=a.nodesMap.get(s);if(c){const u=c.parent;if(u){const d=u.children.indexOf(c);d>-1&&u.children.splice(d,1),u.children.length===0&&(u.isLeaf=!0)}else{const d=a.rootNodes.indexOf(c);d>-1&&a.rootNodes.splice(d,1)}const f=d=>{a.nodesMap.delete(d.key),d.children.forEach(f)};f(c)}},append:(s,c)=>{if(c){const u=a.nodesMap.get(c);if(u){const f=new O(s,a,u.level+1,u);a.nodesMap.set(f.key,f),u.children.push(f),u.isLeaf=!1}}else{const u=new O(s,a,0,null);a.nodesMap.set(u.key,u),a.rootNodes.push(u)}},insertBefore:(s,c)=>{var f;const u=a.nodesMap.get(c);if(u){const d=new O(s,a,u.level,u.parent);a.nodesMap.set(d.key,d);const v=((f=u.parent)==null?void 0:f.children)||a.rootNodes,w=v.indexOf(u);v.splice(w,0,d)}},insertAfter:(s,c)=>{var f;const u=a.nodesMap.get(c);if(u){const d=new O(s,a,u.level,u.parent);a.nodesMap.set(d.key,d);const v=((f=u.parent)==null?void 0:f.children)||a.rootNodes,w=v.indexOf(u);v.splice(w+1,0,d)}}}),e.watch(()=>[t.treeData,t.data],()=>{z(g())},{immediate:!0,deep:!0}),e.watch(()=>t.checkedKeys,s=>{s&&A(s)},{immediate:!0,deep:!0}),e.watch(()=>t.defaultCheckedKeys,s=>{s&&s.length>0&&!t.checkedKeys&&A(s)},{immediate:!0,deep:!0}),(s,c)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([e.unref(n).b(),e.unref(n).m(o.size)])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.rootNodes,u=>(e.openBlock(),e.createBlock(Se,{key:u.key,node:u},{default:e.withCtx(f=>[e.renderSlot(s.$slots,"default",{node:f.node,data:f.data},()=>[e.createTextVNode(e.toDisplayString(f.node.label),1)])]),_:2},1032,["node"]))),128)),a.rootNodes.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(n).e("empty"))},[e.renderSlot(s.$slots,"empty",{},()=>[e.createTextVNode(e.toDisplayString(o.emptyText),1)])],2))],2))}}),$e=["src"],De="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTg0IiBoZWlnaHQ9IjE1MiIgdmlld0JveD0iMCAwIDE4NCAxNTIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgPGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj4KICAgIDxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKDI0IDMxLjY3KSI+CiAgICAgIDxlbGxpcHNlIGZpbGwtb3BhY2l0eT0iLjgiIGZpbGw9IiNGNUY1RjciIGN4PSI2Ny43OTciIGN5PSIxMDYuODkiIHJ4PSI2Ny43OTciIHJ5PSIxMi42NjgiLz4KICAgICAgPHBhdGggZD0iTTEyMi4wMzQgNjkuNjc0TDk5LjM5NCA0OC4xNjJsMCAyMS41MTYgMjIuNjQgMjIuNjQ0IDAtMjIuNjQ0em0tMjIuNjQgMjIuNjQ0TDc2Ljk5OCA3MC43OThsMCAyMS41MTYgMjIuMzk2IDIyLjM5NiAwLTIyLjM5NnoiIGZpbGw9IiNFRkVGRkYiLz4KICAgICAgPHBhdGggZD0iTTk5LjM5NCA0OC4xNjJsLTIyLjM5NiAyMi42MzYgMjIuMzk2IDIxLjUyIDAtNDQuMTU2eiIgZmlsbD0iI0YyRjZGQyIvPgogICAgICA8cGF0aCBkPSJNMTIxLjk3OCA2OS42NzRMOTkuMzk0IDkyLjI1OGwzLjE2OCAzLjE2OCAyMi41ODQtMjIuNTg0LTMuMTY4LTMuMTY4eiIgZmlsbD0iI0M3Q0NEQyIvPgogICAgICA8cGF0aCBkPSJNOTkuMzk0IDkyLjI1OEw3Ni44MSA2OS42NzRsMy4xNjgtMy4xNjggMjIuNTg0IDIyLjU4NC0zLjE2OCAzLjE2OHoiIGZpbGw9IiNDN0NEREMiLz4KICAgIDwvZz4KICAgIDxwYXRoIGQ9Ik0xNDcuODU3IDMxLjY3bC0zLjI5Mi0zLjI5MmEyLjUgMi41IDAgMCAwLTMuNTM2IDBsLTEzLjQ2IDEzLjQ2YTMuNSAzLjUgMCAwIDAgMCA0Ljk1bDMuMjkzIDMuMjkyYTMuNSAzLjUgMCAwIDAgNC45NSAwbDEzLjQ2LTEzLjQ2YTIuNSAyLjUgMCAwIDAgMC0zLjUzNnoiIGZpbGw9IiNENkRCRUMiLz4KICAgIDxwYXRoIGQ9Ik0zNi4xNDMgMzEuNjdsMy4yOTItMy4yOTJhMi41IDIuNSAwIDAgMSAzLjUzNiAwbDEzLjQ2IDEzLjQ2YTMuNSAzLjUgMCAwIDEgMCA0Ljk1bC0zLjI5MyAzLjI5MmEzLjUgMy41IDAgMCAxLTQuOTUgMEwzNi4xNDMgMzUuMmEyLjUgMi41IDAgMCAxIDAtMy41MzZ6IiBmaWxsPSIjRDZEQkVDIi8+CiAgICA8Y2lyY2xlIGZpbGw9IiNFQUVFRjQiIGN4PSI5MiIgY3k9IjgiIHI9IjgiLz4KICA8L2c+Cjwvc3ZnPg==",Le=e.defineComponent({name:"XEmpty",__name:"index",props:{image:{default:""},imageSize:{default:0},description:{default:""},size:{default:"default"}},setup(o){const r=o,l=H.useNamespace("empty"),t=e.computed(()=>{const n={};return r.imageSize&&(n.height=`${r.imageSize}px`,n.width=`${r.imageSize}px`),n}),i=e.computed(()=>r.description||"暂无数据");return(n,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([e.unref(l).b(),e.unref(l).m(o.size)])},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(l).e("image")),style:e.normalizeStyle(t.value)},[e.renderSlot(n.$slots,"image",{},()=>[o.image?(e.openBlock(),e.createElementBlock("img",{key:0,src:o.image,style:e.normalizeStyle(t.value),draggable:"false"},null,12,$e)):(e.openBlock(),e.createElementBlock("img",{key:1,src:De,style:e.normalizeStyle(t.value),draggable:"false"},null,4))])],6),e.createElementVNode("div",{class:e.normalizeClass(e.unref(l).e("description"))},[e.renderSlot(n.$slots,"description",{},()=>[e.createElementVNode("p",null,e.toDisplayString(i.value),1)])],2),n.$slots.default?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(l).e("bottom"))},[e.renderSlot(n.$slots,"default")],2)):e.createCommentVNode("",!0)],2))}}),Ae=e.defineComponent({name:"XTimeline",__name:"index",props:{direction:{default:"vertical"}},setup(o){const r=o,l=H.useNamespace("timeline");e.provide("timeline",{props:r});const t=e.computed(()=>[l.b(),l.m(r.direction)]);return(i,n)=>(e.openBlock(),e.createElementBlock("ul",{class:e.normalizeClass(t.value),role:"timeline"},[e.renderSlot(i.$slots,"default")],2))}}),Te=e.defineComponent({name:"XTimelineItem",__name:"TimelineItem",props:{timestamp:{default:""},type:{default:"primary"},color:{},size:{default:"normal"},hideTimestamp:{type:Boolean,default:!1},placement:{default:"bottom"}},setup(o){const r=o,l=H.useNamespace("timeline-item"),t={primary:"#12B6AF",success:"#00A870",warning:"#FF7D00",danger:"#F53F3F",info:"#86909C"},i=e.computed(()=>{const a={};return r.color?a.backgroundColor=r.color:r.type&&t[r.type]&&(a.backgroundColor=t[r.type]),a}),n=e.computed(()=>[l.b(),l.m(r.size)]);return(a,m)=>(e.openBlock(),e.createElementBlock("li",{class:e.normalizeClass(n.value)},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(l).e("node")),style:e.normalizeStyle(i.value)},[e.renderSlot(a.$slots,"dot")],6),e.createElementVNode("div",{class:e.normalizeClass(e.unref(l).e("tail"))},null,2),e.createElementVNode("div",{class:e.normalizeClass(e.unref(l).e("wrapper"))},[!o.hideTimestamp&&o.timestamp&&o.placement==="top"?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(l).e("timestamp"))},e.toDisplayString(o.timestamp),3)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(e.unref(l).e("content"))},[e.renderSlot(a.$slots,"default")],2),!o.hideTimestamp&&o.timestamp&&o.placement==="bottom"?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(e.unref(l).e("timestamp"))},e.toDisplayString(o.timestamp),3)):e.createCommentVNode("",!0)],2)],2))}}),Ke=["onMouseenter","onClick"],He=e.defineComponent({name:"XCarousel",__name:"index",props:{activeIndex:{default:0},autoplay:{type:Boolean,default:!0},interval:{default:3e3},indicatorPosition:{default:"inside"},trigger:{default:"hover"},arrow:{default:"hover"},loop:{type:Boolean,default:!0},height:{default:300}},emits:["update:activeIndex","change"],setup(o,{expose:r,emit:l}){const t=o,i=l,n=H.useNamespace("carousel"),a=e.ref(t.activeIndex),m=e.ref(0),p=e.ref(null),g=e.ref(!1);e.provide("carousel",{currentIndex:a,itemCount:m});const z=D=>{const j=a.value;t.loop?a.value=(D+m.value)%m.value:a.value=Math.max(0,Math.min(D,m.value-1)),i("update:activeIndex",a.value),i("change",a.value,j)},N=()=>{z(a.value-1)},x=()=>{z(a.value+1)},b=()=>{t.autoplay&&m.value>1&&(B(),p.value=setInterval(()=>{g.value||x()},t.interval))},B=()=>{p.value&&(clearInterval(p.value),p.value=null)},S=()=>{g.value=!0,t.arrow},$=()=>{g.value=!1},M=D=>{t.trigger==="hover"&&z(D)},h=D=>{t.trigger==="click"&&z(D)},y=e.computed(()=>({height:typeof t.height=="number"?`${t.height}px`:t.height})),C=e.computed(()=>[n.b(),n.m(`arrow-${t.arrow}`),n.m(`indicator-${t.indicatorPosition}`)]);return e.watch(()=>t.activeIndex,D=>{a.value=D}),e.watch(()=>t.autoplay,()=>{b()}),e.watch(m,()=>{e.nextTick(()=>{b()})}),e.onMounted(()=>{b()}),e.onUnmounted(()=>{B()}),r({prev:N,next:x,setActiveItem:z}),(D,j)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(C.value),style:e.normalizeStyle(y.value),onMouseenter:S,onMouseleave:$},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(n).e("container"))},[e.renderSlot(D.$slots,"default")],2),o.arrow!=="never"?(e.openBlock(),e.createElementBlock("button",{key:0,class:e.normalizeClass([e.unref(n).e("arrow"),e.unref(n).e("arrow-left")]),onClick:N}," ‹ ",2)):e.createCommentVNode("",!0),o.arrow!=="never"?(e.openBlock(),e.createElementBlock("button",{key:1,class:e.normalizeClass([e.unref(n).e("arrow"),e.unref(n).e("arrow-right")]),onClick:x}," › ",2)):e.createCommentVNode("",!0),o.indicatorPosition!=="none"?(e.openBlock(),e.createElementBlock("ul",{key:2,class:e.normalizeClass(e.unref(n).e("indicators"))},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,A=>(e.openBlock(),e.createElementBlock("li",{key:A,class:e.normalizeClass([e.unref(n).e("indicator"),e.unref(n).is("active",A-1===a.value)]),onMouseenter:K=>M(A-1),onClick:K=>h(A-1)},[e.createElementVNode("button",{class:e.normalizeClass(e.unref(n).e("indicator-btn"))},null,2)],42,Ke))),128))],2)):e.createCommentVNode("",!0)],38))}}),je=e.defineComponent({name:"XCarouselItem",__name:"CarouselItem",setup(o){const r=H.useNamespace("carousel-item"),l=e.inject("carousel"),t=e.ref(-1);e.onMounted(()=>{l&&(t.value=l.itemCount.value,l.itemCount.value++)}),e.onUnmounted(()=>{l&&l.itemCount.value--});const i=e.computed(()=>l&&t.value===l.currentIndex.value),n=e.computed(()=>[r.b(),r.is("active",i.value)]);return(a,m)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(n.value)},[e.renderSlot(a.$slots,"default")],2))}}),Re={key:0},We=["onClick"],Pe={class:"sort-arrow up"},Fe={class:"sort-arrow down"},Oe=["onClick"],Ye=["onClick"],Xe={key:1},Qe=["colspan"],Ge={style:{display:"none"}},Ue=e.defineComponent({name:"XTable",__name:"index",props:{data:{default:()=>[]},height:{},maxHeight:{},rowKey:{},loading:{type:Boolean,default:!1},border:{type:Boolean,default:!1},stripe:{type:Boolean,default:!1},showHeader:{type:Boolean,default:!0},emptyText:{default:"暂无数据"},defaultSort:{},pagination:{}},emits:["sort-change","row-click","row-dblclick","cell-click","selection-change","select-all","page-change","size-change"],setup(o,{expose:r,emit:l}){var u,f;const t=o,i=l,n=H.useNamespace("table");e.useSlots();const a=e.reactive([]),m=(d,v)=>{a.findIndex(E=>E.config.prop===d.prop)===-1&&a.push({config:d,slot:v})},p=d=>{const v=a.findIndex(w=>w.config.prop===d);v!==-1&&a.splice(v,1)},g=(d,v)=>{const w=a.find(E=>E.config.prop===d);w&&(w.slot=v)};e.provide("x-table",{registerColumn:m,unregisterColumn:p,updateColumnSlot:g,props:t});const z=e.computed(()=>{const d=a.map(L=>L.config),v=d.filter(L=>L.fixed==="left"||L.fixed===!0),w=d.filter(L=>!L.fixed),E=d.filter(L=>L.fixed==="right");return[...v,...w,...E]}),N=e.computed(()=>z.value.filter(d=>d.fixed==="left"||d.fixed===!0)),x=e.computed(()=>z.value.filter(d=>d.fixed==="right"));e.computed(()=>z.value.filter(d=>!d.fixed)),e.computed(()=>N.value.reduce((d,v)=>{const w=v.width?typeof v.width=="number"?v.width:parseInt(v.width):100;return d+w},0)),e.computed(()=>x.value.reduce((d,v)=>{const w=v.width?typeof v.width=="number"?v.width:parseInt(v.width):100;return d+w},0));const b=e.computed(()=>{const d={};return a.forEach(v=>{v.slot&&(d[v.config.prop]=v.slot)}),d}),B=e.ref({prop:((u=t.defaultSort)==null?void 0:u.prop)||"",order:((f=t.defaultSort)==null?void 0:f.order)||null}),S=e.computed(()=>{if(!B.value.prop||!B.value.order)return t.data;const{prop:d,order:v}=B.value;return[...t.data].sort((w,E)=>{const L=w[d],I=E[d];if(L===I)return 0;const T=L>I?1:-1;return v==="ascending"?T:-T})}),$=e.computed(()=>{const d={};return t.height&&(d.height=typeof t.height=="number"?`${t.height}px`:t.height),t.maxHeight&&(d.maxHeight=typeof t.maxHeight=="number"?`${t.maxHeight}px`:t.maxHeight),d}),M=e.computed(()=>[n.b(),n.is("border",t.border),n.is("stripe",t.stripe),n.is("loading",t.loading),n.is("has-fixed",N.value.length>0||x.value.length>0)]),h=d=>{d.sortable&&(B.value.prop===d.prop?B.value.order==="ascending"?B.value.order="descending":B.value.order==="descending"&&(B.value.order=null,B.value.prop=""):(B.value.prop=d.prop,B.value.order="ascending"),i("sort-change",{...B.value}))},y=d=>d.sortable?B.value.prop!==d.prop?n.is("sortable"):[n.is("sortable"),n.is(`sort-${B.value.order}`)]:"",C=(d,v,w)=>{const E=d[v.prop];return v.formatter?v.formatter(d,v,E,w):E??""},D=(d,v)=>{i("row-click",d,z.value[0],v)},j=(d,v,w)=>{const E=w.target;i("cell-click",d,v,E,w)},A=d=>{i("page-change",d)},K=d=>{i("size-change",d)},P=(d,v,w)=>{const E={};if(d.width&&(E.width=typeof d.width=="number"?`${d.width}px`:d.width),d.minWidth&&(E.minWidth=typeof d.minWidth=="number"?`${d.minWidth}px`:d.minWidth),d.align&&(E.textAlign=d.align),(d.fixed==="left"||d.fixed===!0)&&(E.position="sticky",E.left="0px",E.zIndex="2",v!==void 0&&v>0)){let L=0;for(let I=0;I<v;I++){const T=N.value[I],Y=T.width?typeof T.width=="number"?T.width:parseInt(T.width):100;L+=Y}E.left=`${L}px`}if(d.fixed==="right"&&(E.position="sticky",E.right="0px",E.zIndex="2",v!==void 0)){const L=x.value,I=L.length-1-v;if(I>0){let T=0;for(let Y=0;Y<I;Y++){const X=L[L.length-1-Y],J=X.width?typeof X.width=="number"?X.width:parseInt(X.width):100;T+=J}E.right=`${T}px`}}return E},F=d=>{const v=[];return(d.fixed==="left"||d.fixed===!0)&&v.push(n.is("fixed-left")),d.fixed==="right"&&v.push(n.is("fixed-right")),v},W=e.ref([]),k=d=>t.rowKey?typeof t.rowKey=="function"?t.rowKey(d):String(d[t.rowKey]):String(t.data.indexOf(d));return r({clearSelection:()=>{W.value=[],i("selection-change",[])},getSelection:()=>[...W.value],toggleRowSelection:(d,v)=>{const w=k(d),E=W.value.findIndex(L=>k(L)===w);v===void 0?E>-1?W.value.splice(E,1):W.value.push(d):v&&E===-1?W.value.push(d):!v&&E>-1&&W.value.splice(E,1),i("selection-change",[...W.value])},sortState:B,columns:z}),(d,v)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(M.value)},[o.loading?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(n).e("loading"))},[...v[0]||(v[0]=[e.createElementVNode("span",{class:"loading-spinner"},null,-1),e.createElementVNode("span",{class:"loading-text"},"加载中...",-1)])],2)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(e.unref(n).e("wrapper")),style:e.normalizeStyle($.value)},[e.createElementVNode("table",null,[o.showHeader?(e.openBlock(),e.createElementBlock("thead",Re,[e.createElementVNode("tr",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(z.value,(w,E)=>(e.openBlock(),e.createElementBlock("th",{key:w.prop,class:e.normalizeClass([e.unref(n).e("header-cell"),y(w),...F(w)]),style:e.normalizeStyle(P(w,w.fixed==="right"?x.value.indexOf(w):E)),onClick:L=>h(w)},[e.createElementVNode("span",null,e.toDisplayString(w.label),1),w.sortable?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(n).e("sort-icon"))},[e.createElementVNode("span",Pe,[e.createVNode(e.unref(R),{name:"sort-up",size:12})]),e.createElementVNode("span",Fe,[e.createVNode(e.unref(R),{name:"sort-down",size:12})])],2)):e.createCommentVNode("",!0)],14,We))),128))])])):e.createCommentVNode("",!0),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(S.value,(w,E)=>(e.openBlock(),e.createElementBlock("tr",{key:o.rowKey?typeof o.rowKey=="function"?o.rowKey(w):w[o.rowKey]:E,class:e.normalizeClass([e.unref(n).e("row")]),onClick:L=>D(w,L)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(z.value,(L,I)=>(e.openBlock(),e.createElementBlock("td",{key:L.prop,class:e.normalizeClass([e.unref(n).e("cell"),...F(L)]),style:e.normalizeStyle(P(L,L.fixed==="right"?x.value.indexOf(L):I)),onClick:T=>j(w,L,T)},[b.value[L.prop]?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(()=>b.value[L.prop]({row:w,column:L,$index:E})),{key:0})):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(C(w,L,E)),1)],64))],14,Ye))),128))],10,Oe))),128))]),S.value.length===0&&!o.loading?(e.openBlock(),e.createElementBlock("tbody",Xe,[e.createElementVNode("tr",null,[e.createElementVNode("td",{colspan:z.value.length||1,class:e.normalizeClass(e.unref(n).e("empty"))},[e.renderSlot(d.$slots,"empty",{},()=>[e.createTextVNode(e.toDisplayString(o.emptyText),1)])],10,Qe)])])):e.createCommentVNode("",!0)])],6),o.pagination?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(e.unref(n).e("pagination"))},[e.createVNode(Z,{total:o.pagination.total,"current-page":o.pagination.current,"page-size":o.pagination.pageSize,onCurrentChange:A,onSizeChange:K},null,8,["total","current-page","page-size"])],2)):e.createCommentVNode("",!0),e.createElementVNode("div",Ge,[e.renderSlot(d.$slots,"default")])],2))}}),Ze=e.defineComponent({name:"XTableColumn",__name:"TableColumn",props:{prop:{},label:{},width:{},minWidth:{},align:{default:"left"},sortable:{type:[Boolean,String]},fixed:{type:[String,Boolean]},formatter:{}},setup(o){const r=o;H.useNamespace("table-column");const l=e.useSlots(),t=e.ref(`column_${Date.now()}_${Math.random().toString(36).slice(2,9)}`),i=e.inject("x-table"),n=e.computed(()=>({prop:r.prop||t.value,label:r.label,width:r.width,minWidth:r.minWidth,align:r.align,sortable:r.sortable,fixed:r.fixed,formatter:r.formatter}));return e.onMounted(()=>{i!=null&&i.registerColumn&&i.registerColumn(n.value,l.default)}),e.watch(()=>l.default,a=>{i!=null&&i.updateColumnSlot&&a&&i.updateColumnSlot(r.prop||t.value,a)},{immediate:!0}),e.onUnmounted(()=>{i!=null&&i.unregisterColumn&&i.unregisterColumn(r.prop||t.value)}),(a,m)=>null}}),Je={key:0},qe=["onClick"],_e={class:"sort-arrow up"},et={class:"sort-arrow down"},tt=["onClick"],lt={key:0},at=["colspan"],nt={style:{display:"none"}},ot=e.defineComponent({name:"XTreeTable",__name:"index",props:{data:{default:()=>[]},rowKey:{},loading:{type:Boolean,default:!1},border:{type:Boolean,default:!1},stripe:{type:Boolean,default:!1},showHeader:{type:Boolean,default:!0},emptyText:{default:"暂无数据"},defaultExpandAll:{type:Boolean,default:!1},defaultExpandedKeys:{},indent:{default:20},treeProps:{default:()=>({children:"children",hasChildren:"hasChildren"})},expandIcon:{},collapseIcon:{}},emits:["row-click","cell-click","expand-change","sort-change"],setup(o,{expose:r,emit:l}){const t=o,i=l,n=H.useNamespace("tree-table"),a=e.ref(new Set),m=e.ref([]),p=e.ref({}),g=(k,V)=>{const s=m.value.findIndex(c=>c.prop===k.prop);s===-1?m.value.push(k):m.value[s]=k,V&&(p.value[k.prop]=V)},z=k=>{const V=m.value.findIndex(s=>s.prop===k);V>-1&&m.value.splice(V,1),delete p.value[k]},N=(k,V)=>{p.value[k]=V};e.provide("x-tree-table",{registerColumn:g,unregisterColumn:z,updateColumnSlot:N,props:t});const x=k=>typeof t.rowKey=="function"?t.rowKey(k):k[t.rowKey||"id"],b=k=>{var s;const V=((s=t.treeProps)==null?void 0:s.children)||"children";return k[V]||[]},B=k=>{var c;if(b(k).length>0)return!0;const s=((c=t.treeProps)==null?void 0:c.hasChildren)||"hasChildren";return k[s]===!0},S=k=>{const V=x(k);return a.value.has(V)},$=k=>{const V=x(k),s=!a.value.has(V);s?a.value.add(V):a.value.delete(V),i("expand-change",k,s)},M=()=>{const k=V=>{V.forEach(s=>{B(s)&&(a.value.add(x(s)),k(b(s)))})};k(t.data)},h=()=>{a.value.clear()},y=e.computed(()=>{const k=[],V=(s,c=0,u=!0)=>{s.forEach(f=>{const d=x(f),v=a.value.has(d),w=u;k.push({row:f,level:c,visible:w});const E=b(f);E.length>0&&v&&V(E,c+1,w)})};return V(t.data),k}),C=e.ref({prop:"",order:null}),D=e.computed(()=>{if(!C.value.prop||!C.value.order)return y.value;const{prop:k,order:V}=C.value;return[...y.value].sort((s,c)=>{const u=s.row[k],f=c.row[k];if(u===f)return 0;const d=u>f?1:-1;return V==="ascending"?d:-d})}),j=k=>{k.sortable&&(C.value.prop===k.prop?C.value.order==="ascending"?C.value.order="descending":C.value.order==="descending"&&(C.value.order=null,C.value.prop=""):(C.value.prop=k.prop,C.value.order="ascending"),i("sort-change",{...C.value}))},A=k=>k.sortable?C.value.prop!==k.prop?n.is("sortable"):[n.is("sortable"),n.is(`sort-${C.value.order}`)]:"",K=(k,V,s)=>{const c=k[V.prop];return V.formatter?V.formatter(k,V,c,s):c??""},P=k=>{const V={};return k.width&&(V.width=typeof k.width=="number"?`${k.width}px`:k.width),k.minWidth&&(V.minWidth=typeof k.minWidth=="number"?`${k.minWidth}px`:k.minWidth),k.align&&(V.textAlign=k.align),V},F=e.computed(()=>[n.b(),n.is("border",t.border),n.is("stripe",t.stripe),n.is("loading",t.loading)]),W=()=>{var k;t.defaultExpandAll?M():(k=t.defaultExpandedKeys)!=null&&k.length&&t.defaultExpandedKeys.forEach(V=>{a.value.add(V)})};return e.watch(()=>t.data,()=>{W()},{immediate:!0}),e.watch(()=>t.defaultExpandedKeys,k=>{k!=null&&k.length&&!t.defaultExpandAll&&(a.value.clear(),k.forEach(V=>{a.value.add(V)}))},{immediate:!0}),r({expandAll:M,collapseAll:h,toggleExpand:$,expandedKeys:a,columns:m}),(k,V)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(F.value)},[o.loading?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(n).e("loading"))},[...V[0]||(V[0]=[e.createElementVNode("span",{class:"loading-spinner"},null,-1),e.createElementVNode("span",{class:"loading-text"},"加载中...",-1)])],2)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(e.unref(n).e("wrapper"))},[e.createElementVNode("table",null,[o.showHeader?(e.openBlock(),e.createElementBlock("thead",Je,[e.createElementVNode("tr",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,s=>(e.openBlock(),e.createElementBlock("th",{key:s.prop,class:e.normalizeClass([e.unref(n).e("header-cell"),A(s)]),style:e.normalizeStyle(P(s)),onClick:c=>j(s)},[e.createElementVNode("span",null,e.toDisplayString(s.label),1),s.sortable?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(n).e("sort-icon"))},[e.createElementVNode("span",_e,[e.createVNode(e.unref(R),{name:"sort-up",size:12})]),e.createElementVNode("span",et,[e.createVNode(e.unref(R),{name:"sort-down",size:12})])],2)):e.createCommentVNode("",!0)],14,qe))),128))])])):e.createCommentVNode("",!0),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(D.value,(s,c)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:x(s.row)},[s.visible?(e.openBlock(),e.createElementBlock("tr",{key:0,class:e.normalizeClass([e.unref(n).e("row"),e.unref(n).is("level-"+s.level)])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(u,f)=>(e.openBlock(),e.createElementBlock("td",{key:u.prop,class:e.normalizeClass(e.unref(n).e("cell")),style:e.normalizeStyle(P(u))},[f===0?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(n).e("cell-content"))},[e.createElementVNode("span",{class:e.normalizeClass(e.unref(n).e("indent")),style:e.normalizeStyle({width:`${s.level*o.indent}px`})},null,6),B(s.row)?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass([e.unref(n).e("expand-icon"),e.unref(n).is("expanded",S(s.row))]),onClick:e.withModifiers(d=>$(s.row),["stop"])},[S(s.row)?(e.openBlock(),e.createBlock(e.unref(R),{key:0,name:"chevron-down",size:14})):(e.openBlock(),e.createBlock(e.unref(R),{key:1,name:"chevron-right",size:14}))],10,tt)):(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(e.unref(n).e("expand-placeholder"))},null,2)),e.createElementVNode("span",null,[p.value[u.prop]?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(()=>p.value[u.prop]({row:s.row,column:u,$index:c})),{key:0})):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(K(s.row,u,c)),1)],64))])],2)):p.value[u.prop]?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(()=>p.value[u.prop]({row:s.row,column:u,$index:c})),{key:1})):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createTextVNode(e.toDisplayString(K(s.row,u,c)),1)],64))],6))),128))],2)):e.createCommentVNode("",!0)],64))),128)),D.value.length===0&&!o.loading?(e.openBlock(),e.createElementBlock("tr",lt,[e.createElementVNode("td",{colspan:m.value.length||1,class:e.normalizeClass(e.unref(n).e("empty"))},[e.renderSlot(k.$slots,"empty",{},()=>[e.createTextVNode(e.toDisplayString(o.emptyText),1)])],10,at)])):e.createCommentVNode("",!0)])])],2),e.createElementVNode("div",nt,[e.renderSlot(k.$slots,"default")])],2))}}),rt=e.defineComponent({name:"XTreeTableColumn",__name:"TreeTableColumn",props:{prop:{},label:{},width:{},minWidth:{},align:{default:"left"},sortable:{type:[Boolean,String]},fixed:{type:[String,Boolean]},formatter:{}},setup(o){const r=o;H.useNamespace("tree-table-column");const l=e.useSlots(),t=e.inject("x-tree-table"),i=e.computed(()=>({prop:r.prop,label:r.label,width:r.width,minWidth:r.minWidth,align:r.align,sortable:r.sortable,fixed:r.fixed,formatter:r.formatter}));return e.onMounted(()=>{t!=null&&t.registerColumn&&t.registerColumn(i.value,l.default)}),e.watch(()=>l.default,n=>{t!=null&&t.updateColumnSlot&&n&&t.updateColumnSlot(r.prop,n)},{immediate:!0}),e.onUnmounted(()=>{t!=null&&t.unregisterColumn&&t.unregisterColumn(r.prop)}),(n,a)=>null}}),st=["src","alt"],it=e.defineComponent({name:"XAvatar",__name:"index",props:{src:{},icon:{},size:{default:"default"},shape:{default:"circle"},fit:{default:"cover"},alt:{}},emits:["error"],setup(o,{emit:r}){const l=o,t=r,i=H.useNamespace("avatar"),n=e.computed(()=>[i.b(),i.m(l.shape),typeof l.size=="string"?i.m(l.size):""]),a=e.computed(()=>{const p={};return typeof l.size=="number"&&(p.width=`${l.size}px`,p.height=`${l.size}px`,p.lineHeight=`${l.size}px`),p}),m=p=>{t("error",p)};return(p,g)=>(e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(n.value),style:e.normalizeStyle(a.value)},[o.src?(e.openBlock(),e.createElementBlock("img",{key:0,src:o.src,alt:o.alt,style:e.normalizeStyle({objectFit:o.fit}),onError:m},null,44,st)):o.icon?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(e.unref(i).e("icon"))},e.toDisplayString(o.icon),3)):(e.openBlock(),e.createElementBlock("span",{key:2,class:e.normalizeClass(e.unref(i).e("default"))},[e.renderSlot(p.$slots,"default")],2))],6))}}),ct=e.defineComponent({name:"XDescriptions",__name:"index",props:{title:{},column:{default:3},border:{type:Boolean,default:!1},size:{default:"default"},labelWidth:{},labelAlign:{default:"right"},contentAlign:{default:"left"},colon:{type:Boolean,default:!0}},setup(o){const r=o,l=H.useNamespace("descriptions");e.provide("x-descriptions",{props:r,column:e.computed(()=>r.column)});const t=e.computed(()=>[l.b(),l.m(r.size),l.is("bordered",r.border)]);return(i,n)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(t.value)},[o.title?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(l).e("title"))},e.toDisplayString(o.title),3)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(e.unref(l).e("body"))},[e.createElementVNode("table",null,[e.createElementVNode("tbody",null,[e.renderSlot(i.$slots,"default")])])],2)],2))}}),dt=["colspan"],ut=["colspan"],mt=e.defineComponent({name:"XDescriptionsItem",__name:"DescriptionsItem",props:{label:{},span:{default:1},labelAlign:{},contentAlign:{}},setup(o){const r=o,l=H.useNamespace("descriptions-item"),t=e.inject("x-descriptions"),i=e.computed(()=>{var N;const g={},z=(N=t==null?void 0:t.props)==null?void 0:N.labelWidth;return z&&(g.width=typeof z=="number"?`${z}px`:z),g}),n=e.computed(()=>{var g;return r.labelAlign||((g=t==null?void 0:t.props)==null?void 0:g.labelAlign)||"right"}),a=e.computed(()=>{var g;return r.contentAlign||((g=t==null?void 0:t.props)==null?void 0:g.contentAlign)||"left"}),m=e.computed(()=>{var g;return((g=t==null?void 0:t.props)==null?void 0:g.colon)??!0}),p=e.computed(()=>{var g;return((g=t==null?void 0:t.props)==null?void 0:g.border)??!1});return(g,z)=>p.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("th",{class:e.normalizeClass([e.unref(l).b(),e.unref(l).e("label"),`is-${n.value}`]),style:e.normalizeStyle(i.value)},e.toDisplayString(o.label)+e.toDisplayString(m.value?":":""),7),e.createElementVNode("td",{class:e.normalizeClass([e.unref(l).e("content"),`is-${a.value}`]),colspan:o.span*2-1},[e.renderSlot(g.$slots,"default")],10,dt)],64)):(e.openBlock(),e.createElementBlock("tr",{key:1,class:e.normalizeClass(e.unref(l).b())},[e.createElementVNode("th",{class:e.normalizeClass([e.unref(l).e("label"),`is-${n.value}`]),style:e.normalizeStyle(i.value)},e.toDisplayString(o.label)+e.toDisplayString(m.value?":":""),7),e.createElementVNode("td",{class:e.normalizeClass([e.unref(l).e("content"),`is-${a.value}`]),colspan:o.span*2-1},[e.renderSlot(g.$slots,"default")],10,ut)],2))}}),ht=e.defineComponent({name:"XScrollbar",__name:"index",props:{height:{},maxHeight:{},native:{type:Boolean,default:!1},wrapStyle:{},wrapClass:{},viewStyle:{},viewClass:{},noresize:{type:Boolean},tag:{default:"div"},always:{type:Boolean,default:!1},minSize:{default:20}},emits:["scroll"],setup(o,{expose:r,emit:l}){const t=o,i=l,n=H.useNamespace("scrollbar"),a=e.ref(),m=e.ref(),p=e.ref("0"),g=e.ref("0"),z=e.ref(0),N=e.ref(0),x=e.computed(()=>{const y={};return t.height&&(y.height=typeof t.height=="number"?`${t.height}px`:t.height),t.maxHeight&&(y.maxHeight=typeof t.maxHeight=="number"?`${t.maxHeight}px`:t.maxHeight),y}),b=()=>{if(!a.value)return;const y=a.value.offsetHeight-4,C=a.value.offsetWidth-4,D=a.value.scrollHeight,j=a.value.scrollWidth,A=y/D,K=C/j;g.value=A>=1?"0":`${y*A}px`,p.value=K>=1?"0":`${C*K}px`},B=y=>{if(!a.value)return;const C=a.value.offsetHeight,D=a.value.offsetWidth;N.value=a.value.scrollTop*100/C,z.value=a.value.scrollLeft*100/D,i("scroll",y)},S=y=>{var C;(C=a.value)==null||C.scrollTo(y)},$=y=>{a.value&&(a.value.scrollTop=y)},M=y=>{a.value&&(a.value.scrollLeft=y)};let h=null;return e.onMounted(()=>{t.native||(e.nextTick(b),t.noresize||(h=new ResizeObserver(b),m.value&&h.observe(m.value),window.addEventListener("resize",b)))}),e.onUnmounted(()=>{h&&h.disconnect(),window.removeEventListener("resize",b)}),r({scrollTo:S,setScrollTop:$,setScrollLeft:M,update:b}),(y,C)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(n).b())},[e.createElementVNode("div",{ref_key:"wrapRef",ref:a,class:e.normalizeClass([e.unref(n).e("wrap"),o.wrapClass,{[e.unref(n).em("wrap","hidden-default")]:!o.native}]),style:e.normalizeStyle([x.value,{overflow:o.native?"auto":"hidden"}]),onScroll:B},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.tag),{ref_key:"resizeRef",ref:m,class:e.normalizeClass([e.unref(n).e("view"),o.viewClass]),style:e.normalizeStyle(o.viewStyle)},{default:e.withCtx(()=>[e.renderSlot(y.$slots,"default")]),_:3},8,["class","style"]))],38),!o.native&&g.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass([e.unref(n).e("bar"),e.unref(n).is("vertical")]),style:e.normalizeStyle({height:g.value,top:`${N.value}%`})},null,6)):e.createCommentVNode("",!0),!o.native&&p.value?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass([e.unref(n).e("bar"),e.unref(n).is("horizontal")]),style:e.normalizeStyle({width:p.value,left:`${z.value}%`})},null,6)):e.createCommentVNode("",!0)],2))}}),ft=e.defineComponent({name:"XCollapse",__name:"index",props:{modelValue:{default:()=>[]},accordion:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(o,{emit:r}){const l=o,t=r,i=H.useNamespace("collapse"),n=e.ref([]);e.watch(()=>l.modelValue,m=>{Array.isArray(m)?n.value=m:m?n.value=[m]:n.value=[]},{immediate:!0});const a=m=>{if(l.accordion){const p=n.value.includes(m)?"":m;n.value=p?[p]:[],t("update:modelValue",p),t("change",p)}else{const p=n.value.indexOf(m);p>-1?n.value.splice(p,1):n.value.push(m),t("update:modelValue",n.value),t("change",n.value)}};return e.provide("collapse",{activeNames:n,handleItemClick:a}),(m,p)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(i).b())},[e.renderSlot(m.$slots,"default")],2))}}),pt=e.defineComponent({name:"XCollapseItem",__name:"CollapseItem",props:{name:{},title:{},disabled:{type:Boolean}},setup(o){const r=o,l=H.useNamespace("collapse-item"),t=e.inject("collapse"),{activeNames:i,handleItemClick:n}=t,a=e.computed(()=>i.value.includes(r.name)),m=()=>{r.disabled||n(r.name)};return(p,g)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([e.unref(l).b(),e.unref(l).is("active",a.value),e.unref(l).is("disabled",o.disabled)])},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(l).e("header")),onClick:m},[e.createElementVNode("span",{class:e.normalizeClass(e.unref(l).e("arrow"))},[e.createVNode(e.unref(R),{name:"right",size:12})],2),e.renderSlot(p.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(o.title),1)])],2),e.withDirectives(e.createElementVNode("div",{class:e.normalizeClass(e.unref(l).e("content"))},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(l).e("content-box"))},[e.renderSlot(p.$slots,"default")],2)],2),[[e.vShow,a.value]])],2))}}),vt=["src","loading"],gt=["src"],Q=.2,G=8,kt=e.defineComponent({name:"XImage",__name:"index",props:{src:{default:""},previewList:{default:()=>[]},initialIndex:{default:0},preview:{type:Boolean,default:!0},width:{},height:{},fit:{default:"cover"},error:{},placeholder:{},lazy:{type:Boolean,default:!1}},emits:["load","error"],setup(o,{emit:r}){const l=o,t=r,i=H.useNamespace("image"),n=e.ref(!0),a=e.ref(!1),m=e.ref(!1),p=e.ref(0),g=e.ref(1),z=e.ref(0),N=e.ref(0),x=e.ref(0),b=e.ref(!1),B=e.ref({x:0,y:0}),S=e.ref({x:0,y:0}),$=e.ref(null),M=e.computed(()=>({width:typeof l.width=="number"?`${l.width}px`:l.width,height:typeof l.height=="number"?`${l.height}px`:l.height,objectFit:l.fit})),h=e.computed(()=>l.previewList.length>0?l.previewList:[l.src]),y=e.computed(()=>h.value[p.value]),C=e.computed(()=>`translate(${N.value}px, ${x.value}px) scale(${g.value}) rotate(${z.value}deg)`),D=()=>{g.value=1,z.value=0,N.value=0,x.value=0,b.value=!1},j=I=>{n.value=!1,t("load",I)},A=I=>{n.value=!1,a.value=!0,t("error",I)},K=()=>{l.preview&&(p.value=l.initialIndex,D(),m.value=!0)},P=()=>{m.value=!1,D()},F=()=>{h.value.length<=1||(p.value=p.value>0?p.value-1:h.value.length-1)},W=()=>{h.value.length<=1||(p.value=p.value<h.value.length-1?p.value+1:0)},k=()=>{g.value=Math.min(G,g.value*1.25)},V=()=>{g.value=Math.max(Q,g.value/1.25),g.value<=1&&(N.value=0,x.value=0)},s=()=>D(),c=()=>{const I=$.value;if(!I||!I.naturalWidth)return;const T=I.getBoundingClientRect();T.width<=0||(g.value=Math.min(G,Math.max(Q,g.value*(I.naturalWidth/T.width))))},u=()=>{z.value=(z.value+90)%360},f=()=>{const I=document.createElement("a");I.href=y.value,I.download="",I.target="_blank",I.rel="noopener",I.click()},d=I=>{I.preventDefault(),I.deltaY<0?k():V()},v=I=>{g.value<=1||(b.value=!0,B.value={x:I.clientX,y:I.clientY},S.value={x:N.value,y:x.value})},w=I=>{b.value&&(N.value=S.value.x+(I.clientX-B.value.x),x.value=S.value.y+(I.clientY-B.value.y))},E=()=>{b.value=!1},L=I=>{if(m.value)switch(I.key){case"ArrowLeft":F();break;case"ArrowRight":W();break;case"Escape":P();break;case"+":case"=":k();break;case"-":V();break;case"r":case"R":u();break;case"0":D();break}};return typeof window<"u"&&window.addEventListener("keydown",L),e.onUnmounted(()=>{typeof window<"u"&&window.removeEventListener("keydown",L)}),e.watch(p,()=>D()),(I,T)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(i).b()),style:e.normalizeStyle({width:M.value.width,height:M.value.height})},[e.createElementVNode("img",{src:o.src,class:e.normalizeClass(e.unref(i).e("inner")),style:e.normalizeStyle(M.value),loading:o.lazy?"lazy":"eager",onLoad:j,onError:A,onClick:K},null,46,vt),n.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(i).e("placeholder"))},[e.renderSlot(I.$slots,"placeholder",{},()=>[e.createVNode(e.unref(R),{name:"loading",size:24})])],2)):e.createCommentVNode("",!0),a.value?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(e.unref(i).e("error"))},[e.renderSlot(I.$slots,"error",{},()=>[e.createVNode(e.unref(R),{name:"image",size:24}),T[2]||(T[2]=e.createElementVNode("span",null,"加载失败",-1))])],2)):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[m.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(i).e("preview")),onClick:P},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(i).e("preview-toolbar")),onClick:T[0]||(T[0]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("span",{class:e.normalizeClass(e.unref(i).e("preview-tool")),title:"放大",onClick:k},[...T[3]||(T[3]=[e.createElementVNode("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2",width:"18",height:"18"},[e.createElementVNode("circle",{cx:"11",cy:"11",r:"7"}),e.createElementVNode("path",{d:"M21 21l-4.35-4.35M11 8v6M8 11h6","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])],2),e.createElementVNode("span",{class:e.normalizeClass(e.unref(i).e("preview-tool")),title:"缩小",onClick:V},[...T[4]||(T[4]=[e.createElementVNode("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2",width:"18",height:"18"},[e.createElementVNode("circle",{cx:"11",cy:"11",r:"7"}),e.createElementVNode("path",{d:"M21 21l-4.35-4.35M8 11h6","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])],2),e.createElementVNode("span",{class:e.normalizeClass(e.unref(i).e("preview-tool")),title:"1:1 实际大小",onClick:c},[...T[5]||(T[5]=[e.createElementVNode("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2",width:"18",height:"18"},[e.createElementVNode("path",{d:"M9 3H3v6M15 3h6v6M9 21H3v-6M15 21h6v-6","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])],2),e.createElementVNode("span",{class:e.normalizeClass(e.unref(i).e("preview-tool")),title:"适应窗口",onClick:s},[...T[6]||(T[6]=[e.createElementVNode("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2",width:"18",height:"18"},[e.createElementVNode("path",{d:"M4 9V4h5M20 9V4h-5M4 15v5h5M20 15v5h-5","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])],2),e.createElementVNode("span",{class:e.normalizeClass(e.unref(i).e("preview-tool")),title:"旋转",onClick:u},[...T[7]||(T[7]=[e.createElementVNode("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2",width:"18",height:"18"},[e.createElementVNode("path",{d:"M20 12a8 8 0 1 1-2.34-5.66M20 3v4h-4","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])],2),e.createElementVNode("span",{class:e.normalizeClass(e.unref(i).e("preview-tool")),title:"下载",onClick:f},[...T[8]||(T[8]=[e.createElementVNode("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2",width:"18",height:"18"},[e.createElementVNode("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4M7 10l5 5 5-5M12 15V3","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])],2),e.createElementVNode("span",{class:e.normalizeClass(e.unref(i).e("preview-close")),title:"关闭",onClick:e.withModifiers(P,["stop"])},[...T[9]||(T[9]=[e.createElementVNode("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2",width:"18",height:"18"},[e.createElementVNode("path",{d:"M18 6L6 18M6 6l12 12","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])],2)],2),e.createElementVNode("img",{ref_key:"previewImgRef",ref:$,src:y.value,class:e.normalizeClass([e.unref(i).e("preview-image"),{"is-zoomable":g.value>1}]),style:e.normalizeStyle({transform:C.value}),draggable:!1,onClick:T[1]||(T[1]=e.withModifiers(()=>{},["stop"])),onWheel:e.withModifiers(d,["prevent"]),onMousedown:v,onMousemove:w,onMouseup:E,onMouseleave:E},null,46,gt),h.value.length>1?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass([e.unref(i).e("preview-arrow"),e.unref(i).em("preview-arrow","left")]),onClick:e.withModifiers(F,["stop"])},[e.createVNode(e.unref(R),{name:"left",size:24})],2)):e.createCommentVNode("",!0),h.value.length>1?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass([e.unref(i).e("preview-arrow"),e.unref(i).em("preview-arrow","right")]),onClick:e.withModifiers(W,["stop"])},[e.createVNode(e.unref(R),{name:"right",size:24})],2)):e.createCommentVNode("",!0),h.value.length>1?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(e.unref(i).e("preview-counter"))},e.toDisplayString(p.value+1)+" / "+e.toDisplayString(h.value.length),3)):e.createCommentVNode("",!0)],2)):e.createCommentVNode("",!0)]))],6))}}),yt=["onClick"],Ct=e.defineComponent({name:"XCalendar",__name:"index",props:{modelValue:{default:()=>new Date},range:{}},emits:["update:modelValue","select","change"],setup(o,{emit:r}){const l=o,t=r,i=H.useNamespace("calendar"),n=e.ref(l.modelValue.getFullYear()),a=e.ref(l.modelValue.getMonth()),m=["日","一","二","三","四","五","六"],p=["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],g=new Date,z=e.computed(()=>{const h=[],y=new Date(n.value,a.value,1),C=new Date(n.value,a.value+1,0),D=y.getDay();for(let A=D-1;A>=0;A--){const K=new Date(n.value,a.value,-A);h.push({date:K,isCurrentMonth:!1,isToday:N(K,g),isSelected:N(K,l.modelValue)})}for(let A=1;A<=C.getDate();A++){const K=new Date(n.value,a.value,A);h.push({date:K,isCurrentMonth:!0,isToday:N(K,g),isSelected:N(K,l.modelValue)})}const j=42-h.length;for(let A=1;A<=j;A++){const K=new Date(n.value,a.value+1,A);h.push({date:K,isCurrentMonth:!1,isToday:N(K,g),isSelected:N(K,l.modelValue)})}return h}),N=(h,y)=>h.getFullYear()===y.getFullYear()&&h.getMonth()===y.getMonth()&&h.getDate()===y.getDate(),x=h=>{t("update:modelValue",h.date),t("select",h.date),t("change",h.date)},b=()=>{n.value--},B=()=>{n.value++},S=()=>{a.value===0?(a.value=11,n.value--):a.value--},$=()=>{a.value===11?(a.value=0,n.value++):a.value++},M=()=>{n.value=g.getFullYear(),a.value=g.getMonth(),t("update:modelValue",g),t("select",g)};return e.watch(()=>l.modelValue,h=>{n.value=h.getFullYear(),a.value=h.getMonth()}),(h,y)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(i).b())},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(i).e("header"))},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(i).e("title"))},e.toDisplayString(n.value)+" 年 "+e.toDisplayString(p[a.value]),3),e.createElementVNode("div",{class:e.normalizeClass(e.unref(i).e("actions"))},[e.createElementVNode("button",{class:e.normalizeClass(e.unref(i).e("btn")),onClick:b},[e.createVNode(e.unref(R),{name:"d-arrow-left",size:12})],2),e.createElementVNode("button",{class:e.normalizeClass(e.unref(i).e("btn")),onClick:S},[e.createVNode(e.unref(R),{name:"arrow-left",size:12})],2),e.createElementVNode("button",{class:e.normalizeClass(e.unref(i).e("btn")),onClick:M},"今天",2),e.createElementVNode("button",{class:e.normalizeClass(e.unref(i).e("btn")),onClick:$},[e.createVNode(e.unref(R),{name:"arrow-right",size:12})],2),e.createElementVNode("button",{class:e.normalizeClass(e.unref(i).e("btn")),onClick:B},[e.createVNode(e.unref(R),{name:"d-arrow-right",size:12})],2)],2)],2),e.createElementVNode("div",{class:e.normalizeClass(e.unref(i).e("weekdays"))},[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(m,C=>e.createElementVNode("div",{key:C,class:e.normalizeClass(e.unref(i).e("weekday"))},e.toDisplayString(C),3)),64))],2),e.createElementVNode("div",{class:e.normalizeClass(e.unref(i).e("body"))},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(z.value,(C,D)=>(e.openBlock(),e.createElementBlock("div",{key:D,class:e.normalizeClass([e.unref(i).e("day"),e.unref(i).is("current-month",C.isCurrentMonth),e.unref(i).is("today",C.isToday),e.unref(i).is("selected",C.isSelected)]),onClick:j=>x(C)},[e.renderSlot(h.$slots,"default",{date:C.date,isCurrentMonth:C.isCurrentMonth},()=>[e.createTextVNode(e.toDisplayString(C.date.getDate()),1)])],10,yt))),128))],2)],2))}}),Mt=e.defineComponent({name:"XQRCode",__name:"index",props:{value:{default:""},size:{default:128},bgColor:{default:"#ffffff"},fgColor:{default:"#000000"},level:{default:"M"},showDownload:{type:Boolean,default:!1}},emits:["ready","error"],setup(o,{emit:r}){const l=o,t=r,i=H.useNamespace("qrcode"),n=e.ref(),a=async()=>{if(!(!n.value||!l.value))try{const x=await m(l.value,l.level);z(x),t("ready",n.value)}catch(x){t("error",x)}},m=async(x,b)=>{const S=[];for(let h=0;h<21;h++)S.push(new Array(21).fill(0));p(S,0,0),p(S,14,0),p(S,0,14);for(let h=8;h<13;h++)S[6][h]=h%2===0?1:0,S[h][6]=h%2===0?1:0;const $=new TextEncoder().encode(x);let M=0;for(let h=20;h>0;h-=2){h===6&&h--;for(let y=0;y<21;y++)for(let C=0;C<2;C++){const D=h-C;if(!g(D,y,21)&&M<$.length){const j=$[M];for(let A=7;A>=0&&!(y<21&&!g(D,y,21)&&(S[y][D]=j>>A&1,y++,y>=21));A--);M++}}}return S},p=(x,b,B)=>{for(let S=0;S<7;S++)for(let $=0;$<7;$++)(S===0||S===6||$===0||$===6||S>=2&&S<=4&&$>=2&&$<=4)&&(x[b+S][B+$]=1)},g=(x,b,B)=>x<8&&b<8||x<8&&b>=B-8||x>=B-8&&b<8||x===6||b===6,z=x=>{if(!n.value)return;const b=n.value.getContext("2d");if(!b)return;const B=x.length,S=l.size/B;n.value.width=l.size,n.value.height=l.size,b.fillStyle=l.bgColor,b.fillRect(0,0,l.size,l.size),b.fillStyle=l.fgColor;for(let $=0;$<B;$++)for(let M=0;M<B;M++)x[$][M]&&b.fillRect(M*S,$*S,S,S)},N=()=>{if(!n.value)return;const x=document.createElement("a");x.download="qrcode.png",x.href=n.value.toDataURL("image/png"),x.click()};return e.watch(()=>[l.value,l.size,l.bgColor,l.fgColor,l.level],()=>{a()}),e.onMounted(()=>{a()}),(x,b)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(i).b())},[e.createElementVNode("canvas",{ref_key:"canvasRef",ref:n,class:e.normalizeClass(e.unref(i).e("canvas"))},null,2),o.showDownload?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(i).e("actions"))},[e.createElementVNode("button",{class:e.normalizeClass(e.unref(i).e("download")),onClick:N}," 下载二维码 ",2)],2)):e.createCommentVNode("",!0)],2))}}),zt=e.defineComponent({name:"XVirtualScroll",__name:"index",props:{items:{default:()=>[]},itemSize:{default:50},height:{default:400},buffer:{default:5},virtual:{type:Boolean,default:!0}},emits:["scroll"],setup(o,{expose:r,emit:l}){const t=o,i=l,n=H.useNamespace("virtual-scroll"),a=e.ref(),m=e.ref(0),p=e.computed(()=>typeof t.height=="number"?`${t.height}px`:t.height),g=e.computed(()=>t.items.length*t.itemSize),z=e.computed(()=>{const h=typeof t.height=="number"?t.height:parseInt(t.height)||400;return Math.ceil(h/t.itemSize)+t.buffer*2}),N=e.computed(()=>{if(!t.virtual)return 0;const h=Math.floor(m.value/t.itemSize)-t.buffer;return Math.max(0,h)}),x=e.computed(()=>t.virtual?Math.min(t.items.length,N.value+z.value):t.items.length),b=e.computed(()=>t.virtual?t.items.slice(N.value,x.value).map((h,y)=>({...h,index:N.value+y})):t.items),B=e.computed(()=>N.value*t.itemSize),S=h=>{const y=h.target;m.value=y.scrollTop,i("scroll",m.value)};return r({scrollToIndex:h=>{a.value&&(a.value.scrollTop=h*t.itemSize)},scrollToBottom:()=>{a.value&&(a.value.scrollTop=g.value)}}),(h,y)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"containerRef",ref:a,class:e.normalizeClass(e.unref(n).b()),style:e.normalizeStyle({height:p.value}),onScroll:S},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(n).e("wrapper")),style:e.normalizeStyle({height:`${g.value}px`})},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(n).e("content")),style:e.normalizeStyle({transform:`translateY(${B.value}px)`})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value,(C,D)=>(e.openBlock(),e.createElementBlock("div",{key:C.id??D,class:e.normalizeClass(e.unref(n).e("item")),style:e.normalizeStyle({height:`${o.itemSize}px`})},[e.renderSlot(h.$slots,"default",{item:C,index:C.index})],6))),128))],6)],6)],38))}}),wt=e.defineComponent({name:"XInfiniteScroll",__name:"index",props:{loading:{type:Boolean,default:!1},finished:{type:Boolean,default:!1},immediate:{type:Boolean,default:!0},distance:{default:50},loadingText:{default:"加载中..."},finishedText:{default:"没有更多了"}},emits:["load"],setup(o,{emit:r}){const l=o,t=r,i=H.useNamespace("infinite-scroll"),n=e.ref(),a=e.ref();let m=null;const p=()=>{m&&m.disconnect(),m=new IntersectionObserver(g=>{g[0].isIntersecting&&!l.loading&&!l.finished&&t("load")},{rootMargin:`${l.distance}px`}),a.value&&m.observe(a.value)};return e.onMounted(()=>{p(),l.immediate&&!l.finished&&t("load")}),e.onBeforeUnmount(()=>{m&&m.disconnect()}),(g,z)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"containerRef",ref:n,class:e.normalizeClass(e.unref(i).b())},[e.renderSlot(g.$slots,"default"),e.createElementVNode("div",{ref_key:"observerRef",ref:a,class:e.normalizeClass(e.unref(i).e("footer"))},[o.loading?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(i).e("loading"))},[e.createVNode(e.unref(R),{name:"loading",size:16}),e.createElementVNode("span",null,e.toDisplayString(o.loadingText),1)],2)):o.finished?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(e.unref(i).e("finished"))},e.toDisplayString(o.finishedText),3)):e.createCommentVNode("",!0)],2)],2))}});exports.Avatar=it;exports.Calendar=Ct;exports.Card=ae;exports.Carousel=He;exports.CarouselItem=je;exports.Collapse=ft;exports.CollapseItem=pt;exports.Descriptions=ct;exports.DescriptionsItem=mt;exports.DynamicTable=xe;exports.Empty=Le;exports.Image=kt;exports.InfiniteScroll=wt;exports.Pagination=Z;exports.Progress=se;exports.QRCode=Mt;exports.Scrollbar=ht;exports.Table=Ue;exports.TableColumn=Ze;exports.Tag=le;exports.Timeline=Ae;exports.TimelineItem=Te;exports.Tree=Ie;exports.TreeNode=O;exports.TreeTable=ot;exports.TreeTableColumn=rt;exports.VirtualScroll=zt;