unit Unit3;

interface

uses
  System.SysUtils, System.Classes, JS, Web, WEBLib.Graphics, WEBLib.Controls,  System.StrUtils,  System.Types,
  WEBLib.Forms, WEBLib.Dialogs, Vcl.Controls, Vcl.StdCtrls, WEBLib.StdCtrls;

type
  TForm3 = class(TWebForm)
    WebButton1: TWebButton;
    WebButton2: TWebButton;
    Token1Result: TWebMemo;
    Token2Result: TWebMemo;
    procedure WebButton1Click(Sender: TObject);
    procedure WebButton2Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form3: TForm3;

implementation

{$R *.dfm}
  const
  Token1Str = 'eyJraWQiOiJRckZjOGdwMzlIWmM4dkxvMHBiQUxRPT0iLCJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdF9oYXNoIjoiNjExS2RfTnppSGpnem5nTG1wUWZUdyIsInN1YiI6ImRmODcxNTY0LTQ1NDctNDA4Zi04NDI2LWYxYWFkMzZjY2M5YiIsImF1ZCI6ImZhMjAwNTEzLWExMTEtNDcxNS1hOWRhLTBhZTAxYTQzODA1NyIsImVtYWlsX3ZlcmlmaWVkIjp0cnVlLCJpc3MiOiJodHRwczovL2lkLmVudmlyb3NpbS5jb20iLCJuYW1lIjoiUm9iZXJ0IERvw7FhdGUiLCJleHAiOjE3ODA2Nzk3NDIsImdpdmVuX25hbWUiOiJSb2JlcnQiLCJpYXQiOjE3ODA2NzYxNDIsIm5vbmNlIjoiWUFqUlpxVV83MzdxNUswS2MzZHotRjBlNmNFa3ZXdHBTNXp1WHRwMjFfOCIsImZhbWlseV9uYW1lIjoiRG_DsWF0ZSIsImVtYWlsIjoid2Fsa2VycmxAZ21haWwuY29tIn0.ktN59ywSMJHVK9enpJIfQZ4kdsUmD8C7IogTFiQ4HLvW6dAUXBGy-Ah5nBQjAYkpYyA5bypSflaauF2ZAF2vMF242UPx21jMZktFSc084_VwhXKUCu8LcSW-XlNAe6u83IcccZBlmUYQbvb5Mbk2RMLoIJKG9C0mzL6xTgH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mFtZSI6IldhbGtlciIsImVtYWlsIjoid2Fsa2VycmxAZ21haWwuY29tIn0.jPPLQM-Hm8s7SS7nU_U2pgWSmj9NWS4mOm3MiyYvkct4P5xegx9mJStfi0hkkvHbPvi5B9HGnH-TyRIB858cTkyKM1BVOKnErVRJp9_1xKGsjkHZMQCtdXy7YqpvJvketVFw5r2E7mSeN50YrrA0_xDQDsfsm6fqpdnELubimxWtnO-0CkDSnWpyWyHN6MFZlSK-TSPvcNmLoOGCeU-BOtnaujAlieLzg__N1OBlIBbdr9tO5jkqukEoATH7PJIijHPcZz79pDutdCRJYxZR6hsdSuD2dMk8JNPD-lGD6QWQhT6dqoJI0R11KJ71VW0wP7fki60hixcrMuiKqDMIHm05ruWvwd4at0jFrGvvu0iQKQ6GCdO7y_M9TQ3mfoMXGQSDpWCOxGBJpuRyblLRXDl9mAWwY-8T6mqf-21-JyOJIpVZGJkwRgEQheVfqOM5SctPNtiBEwQdlfM8loRgXqJvgKvd0hlPWodk3DkvCiuhFSGf4UxrC0VegWLaVpqgi6TgZRN1gnAc0cmZcHvywtZjKKWfC-LdKph6fwBj_Ud5juUQ-3s0g0_RdAWRbcvy2gGzOocRsgnaKjsKrOvO8Xo043QaeFwF3igKwDAsokz4s6hfENkxlnqnQh5iHb-6Ifdt5aLUU6L4ebx_mmdb6A3yGwoTT-ODARBgd5_kH7c';

procedure TForm3.WebButton1Click(Sender: TObject);
var
  Parts: TStringDynArray;
begin
  Parts := SplitString(Token1Str, '.');
  Token1Result.lines.text := TJSJson.parseObject(window.atob(Parts[1])).Tostring;
end;

procedure TForm3.WebButton2Click(Sender: TObject);
var
  Parts: TStringDynArray;
begin
  Parts := SplitString(Token2Str, '.');
  Token2Result.lines.text := TJSJson.parseObject(window.atob(Parts[1])).Tostring;
end;

end.
