anchor.diff:  -spec event(Event :: term()) -> no_return().
   %% ====================================================================
   event(init) ->
  +    ?info("Init!!!!!"),
       case gr_adapter:get_user_spaces(gui_ctx:get_access_token()) of
           {ok, SpaceIds} ->
  +            ?info("Spaces: ~p", [SpaceIds]),
               gui_jq:wire(#api{name = "createSpace", tag = "createSpace"}, false),
               gui_jq:wire(#api{name = "joinSpace", tag = "joinSpace"}, false),
               gui_jq:wire(#api{name = "leaveSpace", tag = "leaveSpace"}, false),
  
positive.code: event({leave_space, SpaceName, SpaceId, RowId, OptionId}) ->
      Message = <<"Are you sure you want to leave Space:<br><b>", SpaceName/binary, " ( ", SpaceId/binary, " ) </b>?">>,
      Script = <<"leaveSpace(['", SpaceName/binary, "','", SpaceId/binary, "','", RowId/binary, "','", OptionId/binary, "']);">>,
      confirm_popup(Message, Script);
  
  event({delete_space, SpaceName, SpaceId, RowId, OptionId}) ->
      Message = <<"Are you sure you want to delete Space:<br><b>", SpaceName/binary, " ( ", SpaceId/binary, " ) </b>?">>,
      Script = <<"deleteSpace(['", SpaceName/binary, "','", SpaceId/binary, "','", RowId/binary, "','", OptionId/binary, "']);">>,
      confirm_popup(Message, Script);
  
  event({spaces_table_collapse, OptionId}) ->
      get(?COMET_PID) ! spaces_table_collapse,
  
negative.code:                 NewState =
                      case gr_adapter:leave_space(SpaceId, gui_ctx:get_access_token()) of
                          ok ->
                              message(<<"ok_message">>, <<"Space: <b>", SpaceName/binary, "</b> left successfully.">>),
                              gui_jq:remove(RowId),
                              case SpaceRows of
                                  [{SpaceId, _}, {NextSpaceId, NextSpaceRow} | RestSpaceRows] ->
  