From 520f7fa6391bdc30d45d92b00bdbe062c49ecde7 Mon Sep 17 00:00:00 2001 From: Neil Dorin Date: Wed, 17 May 2017 23:01:29 -0600 Subject: [PATCH] Added Extend Meeting and End Meeting early features, as well as Fusion Events. ECS-316 ECS-317 ECS-320 --- .../PepperDash_Essentials_Core.projectinfo | Bin 1287 -> 1286 bytes .../Essentials_DM/Essentials_DM.projectinfo | Bin 1140 -> 1143 bytes .../Essentials Devices Common.projectinfo | Bin 1161 -> 1164 bytes .../Fusion/FusionEventHandlers.cs | 18 ++ .../Fusion/FusionSystemController.cs | 281 ++++++++++++++---- .../PepperDashEssentials.csproj | 1 + .../PepperDashEssentials.projectinfo | Bin 1870 -> 1871 bytes 7 files changed, 246 insertions(+), 54 deletions(-) create mode 100644 Essentials/PepperDashEssentials/Fusion/FusionEventHandlers.cs diff --git a/Essentials Core/PepperDashEssentialsBase/PepperDash_Essentials_Core.projectinfo b/Essentials Core/PepperDashEssentialsBase/PepperDash_Essentials_Core.projectinfo index 8b7940ff9031bc6cdb5c0915bb0d310320eee0fe..ee8c89873495ad0d0c9a45eecef2f23a6c4b3b7c 100644 GIT binary patch delta 39 vcmZqYYU7%)SGd`{y1M_}d;42=rSIS0U0+|HU%&C99t+1Mi$w?BMHv_Xeg6^| delta 40 ycmV+@0N4M93Wo}iy%gS?-MvS9_a5E5H-7Nxr}yta{B*IAmfpPao~ z>bJ%6B7Iua`LwO-B5!`*-}hy{TIKcAteOA5zwhfG|9yYo+;;i<{=TmJ^ywG=pT9r; zoD|E>XXELr`~h`X*b%<0tDmO6&X(uZv!cwG*&_ehK_!!^YF9ek?g$dz{I$NC0-eecUUoY}nrr>xsE83!3W+jFwpPf{T6^(WF~*!Sr}=R`ofnt6oxhW6b^WG#R+Y27Za#Ws*m&=wUo!gWi(*+U){AFF zy|~Ki{3odeQGWtVKHk}RNdMn^NWi~bx2tvgGHZWUxR5&dB3l;cdDA-V?$M_@y$~c~-AT0LM@B%VL_pUawYF-6}w(<}}Ol z{mDL2G0V)o|Ka&gmfzdoe{gSdKHKxD`5w^ao!j?un~8Yz9{vC9&scv>zCZft zRo?Kx`G3z}GBUID>Fs98%(aqjGCRMYP0zD~o$2)6WODG}d~bJ_PYxdL?(Q8-c4xPl z8Ur$zk6Qr#p!qPJ{=aJy9t`TJld8@`((mldb|(*K2M-?HyZ`Xu{`vm-B;TLT?%$v8 zP44fr4T|X)4^TkxTY$S2!Q);1zl+QVgJkyL_LC_Cd;y1(rUS+ZcA&w_!VmxeizfnoPS)Auh>#(~=pX%&7xW9jN z=wD>T@|eC@Ov-BqV4uG6CSwrDtSqTzFmU>BZ|D9FM&6-MmoVQZc=Xx*>F&KxcXnp? zX7_d{JK6O7{$zKTKAhakKHbY7KA@H|HMbazQu(H4&ws0FR{m_wh%(v@G<%w_^5raF zPN}bt9(~Uc{(eaKlbYtWu9oB1#bQ;yo@e!n-B0?)vW?lYEH8(-=FO7 z-G7*6=b!FA+`0eod?(BA?e9OhH#wi}`P6(5=%H=f4Voh zzt1)(rei!n0l{wp?p6ekclG}+G9TQ=6!a;+JCiR1c>#lysRPCcr-;g(zz_fc2C9P4 diff --git a/Essentials Devices Common/Essentials Devices Common/Essentials Devices Common.projectinfo b/Essentials Devices Common/Essentials Devices Common/Essentials Devices Common.projectinfo index e063b4eabde2c4fe2473008d88969b9939421ea1..0c9c0cb1ea977d6ec9cd80b74f5ba9ac11372ee2 100644 GIT binary patch delta 984 zcmV;}11J2635*Gl!hZ*E_Vym#-+#3G>3HYh!Gi}6Ki%H>^wG`^wVPABlSjYr@B7`V zep@Ur(x*k8Pur?4^5*ybeP8CQRbD^Mn)&bh`@a71-}m>;ZO^~&?>mU)#;+#Drtino zRrv!#s<4E4Syw+z_?#`zt7k=-FSAAd!$o))*Oj1F5Nd?-S${)_wAW@HUtc$EzIY+% zZkkXU;6uG*mPv^yDZdv1`T3x@Xo>k>6ubYn^8Nu57=$DK>`l47Ci}m7JQ7^8t zI{!&(LDYiSjemD`9@78!9un{`*X?TEz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ww?&pS`Zu^)x@Or}N@6x2$net*+lx&#H2k*Ud+dj9~43^h-t`eNiln#d`6qs25jR zo&O}YAZkJE#(z6I59$AV4+;2}>vpwnUuNwORS2l#FS2EEo;R(-`W}6H6So+ee32E) zV`{XRl-CZzK7HfO+3SyI!0B=q0j&i$PSAN45LCE2%$3_y4H-ro7nz59FT`?G_G z56@@Q{rmwv4-fY4-Jje?OPRFWj7KNn#&*xEX;%KQXMgKPMip{C%~$zymM^D-#7B?5 zXC~!-I4LJJO?pi)y)G83^7TBcS0veEf%tm8T2*zc0F}_wEX(&N`+N5vX4(0tyAOBn zKRn;b@_YOH5AIFQXL~-O-vhe5bNfDSHARo!1A(8rx$IBY_eUSS${VH#|M^QsX8Jz8 z)%1OywSW0lcHM+C_h4^-FW=kU%d&e1`}g+t4zl~Rhr9XY(@zif9-bd$x0tyO;9$~j z0sey~t<(4aH|Fa>IA0E*-~Xhl^KgE4c4oVihqHqR5ANN6cyRxG|9q0~PiObK|ARsLyFMaQv41`(R{Odjq%eE9I*&cV*!1F|j; zX4BpCgS`hkfs(rsW-u$afc)OG67Tl^8x!;}oFFIiFY>FlS~k^r$NoH=?mV2{pWWM; zW%+D2J3n}Me|qoJY&tp5ruok7zCSe^paqk13z)Z?lnovJe`7j!cZTNUReoL~xTuzA z%YQbnL78x3@_Xm!2l;F=$qx3X)7gXF`}ZdgA0F)IpFY?>IG6-7a~rV14BZ0w`_9mC z&;K8ps@FgkTaBy$7KY4I}Z}-9d9nwyd2Lm%T z2sN0fTflzbi5l$q|JC!<`M}QF-q5T)%}&~EJj+@)PX~KDlTUZ2`v=p5Y;Q{ACP(W2 zgFK&+2;6({VCv7)W@_G+>K&p+kozUy|0TbKW3}SEm}Zb38s)ldWzhc*iX!aWOcDS9 DzFsO0 diff --git a/Essentials/PepperDashEssentials/Fusion/FusionEventHandlers.cs b/Essentials/PepperDashEssentials/Fusion/FusionEventHandlers.cs new file mode 100644 index 00000000..9825b603 --- /dev/null +++ b/Essentials/PepperDashEssentials/Fusion/FusionEventHandlers.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Crestron.SimplSharp; + +namespace PepperDash.Essentials.Fusion +{ + public class ScheduleChangeEventArgs : EventArgs + { + public RoomSchedule MyProperty { get; set; } + } + + public class MeetingChangeEventArgs : EventArgs + { + public Event Meeting { get; set; } + } +} \ No newline at end of file diff --git a/Essentials/PepperDashEssentials/Fusion/FusionSystemController.cs b/Essentials/PepperDashEssentials/Fusion/FusionSystemController.cs index 041b5a88..d7ee0254 100644 --- a/Essentials/PepperDashEssentials/Fusion/FusionSystemController.cs +++ b/Essentials/PepperDashEssentials/Fusion/FusionSystemController.cs @@ -26,6 +26,10 @@ namespace PepperDash.Essentials.Fusion { public class EssentialsHuddleSpaceFusionSystemController : Device { + public event EventHandler ScheduleChange; + public event EventHandler MeetingEndWarning; + public event EventHandler NextMeetingBeginWarning; + FusionRoom FusionRoom; EssentialsHuddleSpaceRoom Room; Dictionary SourceToFeedbackSigs = @@ -35,7 +39,7 @@ namespace PepperDash.Essentials.Fusion StringSigData SourceNameSig; - ScheduleResponse CurrentSchedule; + RoomSchedule CurrentSchedule; Event NextMeeting; @@ -49,8 +53,14 @@ namespace PepperDash.Essentials.Fusion bool IsRegisteredForSchedulePushNotifications = false; + CTimer PollTimer = null; + + CTimer PushNotificationTimer = null; + // Default poll time is 5 min unless overridden by config value - int SchedulePollInterval = 300000; + public long SchedulePollInterval = 300000; + + public long PushNotificationTimeout = 5000; List StaticAssets; @@ -65,6 +75,7 @@ namespace PepperDash.Essentials.Fusion StaticAssets = new List(); + var mac = CrestronEthernetHelper.GetEthernetParameter(CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_MAC_ADDRESS, 0); var slot = Global.ControlSystem.ProgramNumber; @@ -209,7 +220,7 @@ namespace PepperDash.Essentials.Fusion Debug.Console(0, this, "Fusion Guids successfully read from file:"); - Debug.Console(1, this, "\nRoom Name: {0}\nIPID: {1}\n RoomGuid: {2}", Room.Name, IpId, RoomGuid); + Debug.Console(1, this, "\nRoom Name: {0}\nIPID: {1:x}\n RoomGuid: {2}", Room.Name, IpId, RoomGuid); foreach (StaticAsset asset in StaticAssets) { @@ -228,7 +239,6 @@ namespace PepperDash.Essentials.Fusion } - void CreateSymbolAndBasicSigs(uint ipId) { Debug.Console(1, this, "Creating Fusion Room symbol with GUID: {0}", RoomGuid); @@ -247,6 +257,7 @@ namespace PepperDash.Essentials.Fusion CrestronConsole.AddNewConsoleCommand(RequestFullRoomSchedule, "FusReqRoomSchedule", "Requests schedule of the room for the next 24 hours", ConsoleAccessLevelEnum.AccessOperator); CrestronConsole.AddNewConsoleCommand(ModifyMeetingEndTimeConsoleHelper, "FusReqRoomSchMod", "Ends or extends a meeting by the specified time", ConsoleAccessLevelEnum.AccessOperator); + CrestronConsole.AddNewConsoleCommand(CreateAsHocMeeting, "FusCreateMeeting", "Creates and Ad Hoc meeting for on hour or until the next meeting", ConsoleAccessLevelEnum.AccessOperator); // Room to fusion room Room.OnFeedback.LinkInputSig(FusionRoom.SystemPowerOn.InputSig); @@ -308,12 +319,11 @@ namespace PepperDash.Essentials.Fusion } - /// /// Generates a room schedule request for this room for the next 24 hours. /// /// string identifying this request. Used with a corresponding ScheduleResponse value - public void RequestFullRoomSchedule(string requestID) + public void RequestFullRoomSchedule(object callbackObject) { DateTime now = DateTime.Today; @@ -329,13 +339,20 @@ namespace PepperDash.Essentials.Fusion // string.Format("{0}{1}2017-05-02T00:00:0024", requestID, GUID); string requestTest = - string.Format("{0}{1}{2}24", requestID, RoomGuid, currentTime); + string.Format("FullSchedleRequest{0}{1}24", RoomGuid, currentTime); Debug.Console(1, this, "Sending Fusion ScheduleQuery: \n{0}", requestTest); FusionRoom.ExtenderRoomViewSchedulingDataReservedSigs.ScheduleQuery.StringValue = requestTest; - } + if (IsRegisteredForSchedulePushNotifications) + PushNotificationTimer.Stop(); + } + + /// + /// Wrapper method to allow console commands to modify the current meeting end time + /// + /// meetingID extendTime public void ModifyMeetingEndTimeConsoleHelper(string command) { string requestID; @@ -357,36 +374,99 @@ namespace PepperDash.Essentials.Fusion Debug.Console(1, this, "Error parsing console command: {0}", e); } - Event tempEvent = CurrentSchedule.Events.FirstOrDefault(e => e.MeetingID.Equals(meetingID)); + ModifyMeetingEndTime(requestID, extendMinutes); - if (tempEvent != null && extendMinutes > -1) - { - ModifyMeetingEndTime(requestID, tempEvent, extendMinutes); - } - else - { - Debug.Console(1, this, "No matching MeetingID found in CurrentSchedule.Events or invalid time specified"); - } } /// - /// Ends or Extends a meeting by the specified number of minutes. + /// Ends or Extends the current meeting by the specified number of minutes. /// /// Number of minutes to extend the meeting. A value of 0 will end the meeting. - public void ModifyMeetingEndTime(string requestID, PepperDash.Essentials.Fusion.Event meeting, int extendMinutes) + public void ModifyMeetingEndTime(string requestID, int extendMinutes) { - string requestTest = string.Format( - "{0}{1}MeetingChange" - , requestID, RoomGuid, meeting.MeetingID, extendMinutes); + if(CurrentMeeting == null) + { + Debug.Console(1, this, "No meeting in progress. Unable to modify end time."); + return; + } +#warning Need to add logic to properly extend from the current time. See S+ module for reference. + if (extendMinutes > -1) + { + if(extendMinutes > 0) + { + var extendTime = CurrentMeeting.dtEnd - DateTime.Now; + double extendMinutesRaw = extendTime.TotalMinutes; - Debug.Console(1, this, "Sending MeetingChange Request: \n{0}", requestTest); + extendMinutes = extendMinutes + (int)Math.Round(extendMinutesRaw); + } + + + string requestTest = string.Format( + "{0}{1}MeetingChange" + , requestID, RoomGuid, CurrentMeeting.MeetingID, extendMinutes); + + Debug.Console(1, this, "Sending MeetingChange Request: \n{0}", requestTest); + + FusionRoom.ExtenderFusionRoomDataReservedSigs.ActionQuery.StringValue = requestTest; + } + else + { + Debug.Console(1, this, "Invalid time specified"); + } - //FusionRoom.ExtenderRoomViewSchedulingDataReservedSigs.ScheduleQuery.StringValue = requestTest; - FusionRoom.ExtenderFusionRoomDataReservedSigs.ActionQuery.StringValue = requestTest; } + /// + /// Creates and Ad Hoc meeting with a duration of 1 hour, or until the next meeting if in less than 1 hour. + /// + public void CreateAsHocMeeting(string command) + { + string requestID = "CreateAdHocMeeting"; + DateTime now = DateTime.Now.AddMinutes(1); + + now.AddSeconds(-now.Second); + + // Assume 1 hour meeting if possible + DateTime dtEnd = now.AddHours(1); + + // Check if room is available for 1 hour before next meeting + if (NextMeeting != null) + { + var roomAvailable = NextMeeting.dtEnd.Subtract(dtEnd); + + if (roomAvailable.TotalMinutes < 60) + { + /// Room not available for full hour, book until next meeting starts + dtEnd = NextMeeting.dtEnd; + } + } + + string createMeetingRequest = + "" + + string.Format("{0}", requestID) + + string.Format("{0}", RoomGuid) + + "" + + string.Format("{0}", now.ToString("s")) + + string.Format("{0}", dtEnd.ToString("s")) + + "AdHoc Meeting" + + "Room User" + + "" + + "" + + ""; + + Debug.Console(1, this, "Sending CreateMeeting Request: \n{0}", createMeetingRequest); + + FusionRoom.ExtenderRoomViewSchedulingDataReservedSigs.CreateMeeting.StringValue = createMeetingRequest; + + } + + /// + /// Event handler method for Device Extender sig changes + /// + /// + /// void ExtenderFusionRoomDataReservedSigs_DeviceExtenderSigChange(DeviceExtender currentDeviceExtender, SigEventArgs args) { Debug.Console(1, this, "Event: {0}\n Sig: {1}\nFusionResponse:\n{2}", args.Event, args.Sig.Name, args.Sig.StringValue); @@ -396,28 +476,80 @@ namespace PepperDash.Essentials.Fusion { try { - ActionResponse actionResponse = new ActionResponse(); + //ActionResponse actionResponse = new ActionResponse(); - TextReader reader = new StringReader(args.Sig.StringValue); - - actionResponse = CrestronXMLSerialization.DeSerializeObject(reader); + //TextReader reader = new StringReader(args.Sig.StringValue); - if (actionResponse.RequestID == "InitialPushRequest") + //actionResponse = CrestronXMLSerialization.DeSerializeObject(reader); + + //if (actionResponse != null) + //{ + // if (actionResponse.RequestID == "InitialPushRequest") + // { + // if (actionResponse.Parameters != null) + // { + // var tempParam = actionResponse.Parameters.FirstOrDefault(p => p.ID.Equals("Registered")); + + XmlDocument message = new XmlDocument(); + + message.LoadXml(args.Sig.StringValue); + + var actionResponse = message["ActionResponse"]; + + if (actionResponse != null) { - var tempParam = actionResponse.Parameters.FirstOrDefault(p => p.ID.Equals("Registered")); + var requestID = actionResponse["RequestID"]; - if (tempParam != null) + if (requestID.InnerText == "InitialPushRequest") { - if (tempParam.Value = 1) - IsRegisteredForSchedulePushNotifications = true; - else + if (actionResponse["ActionID"].InnerText == "RegisterPushModel") { - IsRegisteredForSchedulePushNotifications = false; + var parameters = actionResponse["Parameters"]; + + foreach (XmlElement parameter in parameters) + { + if (parameter.HasAttributes) + { + var attributes = parameter.Attributes; + + if (attributes["ID"].Value == "Registered") + { + var isRegistered = Int32.Parse(attributes["Value"].Value); + + if (isRegistered == 1) + { + IsRegisteredForSchedulePushNotifications = true; + + if (PollTimer != null && !PollTimer.Disposed) + { + PollTimer.Stop(); + PollTimer.Dispose(); + } + + PushNotificationTimer = new CTimer(RequestFullRoomSchedule, null, PushNotificationTimeout, PushNotificationTimeout); + + PushNotificationTimer.Reset(PushNotificationTimeout, PushNotificationTimeout); + } + else if (isRegistered == 0) + { + IsRegisteredForSchedulePushNotifications = false; + + if (PushNotificationTimer != null && !PushNotificationTimer.Disposed) + { + PushNotificationTimer.Stop(); + PushNotificationTimer.Dispose(); + } + + PollTimer = new CTimer(RequestFullRoomSchedule, null, SchedulePollInterval, SchedulePollInterval); + + PollTimer.Reset(SchedulePollInterval, SchedulePollInterval); + } + } + } + } } } } - - } catch (Exception e) { @@ -426,9 +558,14 @@ namespace PepperDash.Essentials.Fusion } } + /// + /// Event handler method for Device Extender sig changes + /// + /// + /// void FusionRoomSchedule_DeviceExtenderSigChange(DeviceExtender currentDeviceExtender, SigEventArgs args) { - Debug.Console(1, this, "Event: {0}\n Sig: {1}\nFusionResponse:\n{2}", args.Event, args.Sig.Name, args.Sig.StringValue); + Debug.Console(1, this, "Scehdule Response Event: {0}\n Sig: {1}\nFusionResponse:\n{2}", args.Event, args.Sig.Name, args.Sig.StringValue); if (args.Sig == FusionRoom.ExtenderRoomViewSchedulingDataReservedSigs.ScheduleResponse) @@ -441,22 +578,27 @@ namespace PepperDash.Essentials.Fusion message.LoadXml(args.Sig.StringValue); - var scheuldResponse = message["ScheduleRespones"]; + var response = message["ScheduleResponse"]; - if (scheuldResponse != null) + if (response != null) { // Check for push notification - if (scheuldResponse["RequestID"].InnerText == "RVRequest") + if (response["RequestID"].InnerText == "RVRequest") { - var action = scheuldResponse["Action"]; + var action = response["Action"]; - if (action.InnerText.IndexOf("RequestSchedule") > -1) + if (action.OuterXml.IndexOf("RequestSchedule") > -1) { - RequestFullRoomSchedule("PushScheduleRefresh"); + PushNotificationTimer.Reset(PushNotificationTimeout, PushNotificationTimeout); } } else // Not a push notification { + CurrentSchedule = new RoomSchedule(); // Clear Current Schedule + CurrentMeeting = null; // Clear Current Meeting + NextMeeting = null; // Clear Next Meeting + + bool isNextMeeting = false; foreach (XmlElement element in message.FirstChild.ChildNodes) { @@ -483,15 +625,33 @@ namespace PepperDash.Essentials.Fusion tempEvent = CrestronXMLSerialization.DeSerializeObject(reader); scheduleResponse.Events.Add(tempEvent); + + // Check is this is the current event + if (tempEvent.dtStart <= DateTime.Now && tempEvent.dtEnd >= DateTime.Now) + { + CurrentMeeting = tempEvent; // Set Current Meeting + isNextMeeting = true; // Flag that next element is next meeting + } + + if (isNextMeeting) + { + NextMeeting = tempEvent; // Set Next Meeting + isNextMeeting = false; + } + + CurrentSchedule.Meetings.Add(tempEvent); } } + + PrintTodaysSchedule(); + + if (!IsRegisteredForSchedulePushNotifications) + PollTimer.Reset(SchedulePollInterval, SchedulePollInterval); } } - CurrentSchedule = scheduleResponse; - - PrintTodaysSchedule(); + } catch (Exception e) @@ -499,22 +659,26 @@ namespace PepperDash.Essentials.Fusion Debug.Console(1, this, "Error parsing ScheduleResponse: {0}", e); } } + else if (args.Sig == FusionRoom.ExtenderRoomViewSchedulingDataReservedSigs.CreateResponse) + { + Debug.Console(1, this, "Create Meeting Response Event: {0}\n Sig: {1}\nFusionResponse:\n{2}", args.Event, args.Sig.Name, args.Sig.StringValue); + } + } void PrintTodaysSchedule() { - if (CurrentSchedule.Events.Count > 0) + if (CurrentSchedule.Meetings.Count > 0) { Debug.Console(1, this, "Today's Schedule for '{0}'\n", Room.Name); - foreach (Event e in CurrentSchedule.Events) + foreach (Event e in CurrentSchedule.Meetings) { Debug.Console(1, this, "Subject: {0}", e.Subject); Debug.Console(1, this, "Organizer: {0}", e.Organizer); Debug.Console(1, this, "MeetingID: {0}", e.MeetingID); Debug.Console(1, this, "Start Time: {0}", e.dtStart); Debug.Console(1, this, "End Time: {0}", e.dtEnd); - var duration = e.dtEnd.Subtract(e.dtStart); Debug.Console(1, this, "Duration: {0}\n", e.DurationInMinutes); } } @@ -945,12 +1109,21 @@ namespace PepperDash.Essentials.Fusion } } + //*************************************************************************************************** + + public class RoomSchedule + { + public List Meetings { get; set; } + + public RoomSchedule() + { + Meetings = new List(); + } + } + //**************************************************************************************************** // Helper Classes for XML API - - - /// /// All the data needed for a full schedule request in a room /// diff --git a/Essentials/PepperDashEssentials/PepperDashEssentials.csproj b/Essentials/PepperDashEssentials/PepperDashEssentials.csproj index 645eb06b..00ef6d37 100644 --- a/Essentials/PepperDashEssentials/PepperDashEssentials.csproj +++ b/Essentials/PepperDashEssentials/PepperDashEssentials.csproj @@ -134,6 +134,7 @@ + diff --git a/Essentials/PepperDashEssentials/PepperDashEssentials.projectinfo b/Essentials/PepperDashEssentials/PepperDashEssentials.projectinfo index f1d15bf47fc68567a8c23d6fbfcba85228d7a061..bec487cda98475a47e508ce68f87a2da32f87c98 100644 GIT binary patch delta 1229 zcmV;;1Ty>14$lsdwi*X-_Vym#-+#1sZ~W=~`#bkOeYm~z>7$(;vCbR;TJPS&{d<_( z4r#hH`8L6#&nD*wlTXj5yVHl~=h?x*z1e>D>B9%R(|mvW@YBiOj9SX9Y#xNtc0-Hj z)if)AHm6_{j|ruo=Bs=;%a>E?>!U~CGo-#BlKP~RLIQA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